refactor(ffmpeg): use r_frame_rate for FPS (#41)
* refactor(ffmepg): use r_frame_rate for FPS * reset golden * fix * test: update golden files
This commit is contained in:
parent
fe92e79efc
commit
654251e693
48 changed files with 60 additions and 65 deletions
19
processor.go
19
processor.go
|
|
@ -114,6 +114,15 @@ func (p *Processor) Process(ctx context.Context, in *imagor.Blob, params imagorp
|
|||
return
|
||||
}
|
||||
defer av.Close()
|
||||
meta := av.Metadata()
|
||||
if params.Meta {
|
||||
out = imagor.NewBlobFromJsonMarshal(Metadata{
|
||||
Format: strings.TrimPrefix(mime.Extension(), "."),
|
||||
ContentType: mime.String(),
|
||||
Metadata: meta,
|
||||
})
|
||||
return
|
||||
}
|
||||
bands := 3
|
||||
for _, filter := range params.Filters {
|
||||
switch filter.Name {
|
||||
|
|
@ -148,15 +157,7 @@ func (p *Processor) Process(ctx context.Context, in *imagor.Blob, params imagorp
|
|||
}
|
||||
}
|
||||
}
|
||||
meta := av.Metadata()
|
||||
if params.Meta {
|
||||
out = imagor.NewBlobFromJsonMarshal(Metadata{
|
||||
Format: strings.TrimPrefix(mime.Extension(), "."),
|
||||
ContentType: mime.String(),
|
||||
Metadata: meta,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
switch meta.Orientation {
|
||||
case 3:
|
||||
filters = append(filters, imagorpath.Filter{Name: "orient", Args: "180"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue