feat(ffmpeg): select frame by duration and float position (#40)
* seek duration private * feat(ffmpeg): select frame by duration and float position
This commit is contained in:
parent
b50c44e854
commit
7c18dcda7a
38 changed files with 27 additions and 38 deletions
10
processor.go
10
processor.go
|
|
@ -125,16 +125,6 @@ func (p *Processor) Process(ctx context.Context, in *imagor.Blob, params imagorp
|
|||
bands = 4
|
||||
}
|
||||
}
|
||||
case "seek":
|
||||
if ts, e := time.ParseDuration(filter.Args); e == nil {
|
||||
if err = av.SeekDuration(ts); err != nil {
|
||||
return
|
||||
}
|
||||
} else if f, e := strconv.ParseFloat(filter.Args, 64); e == nil {
|
||||
if err = av.SeekPosition(f); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
case "frame":
|
||||
if ts, e := time.ParseDuration(filter.Args); e == nil {
|
||||
if err = av.SelectDuration(ts); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue