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:
Adrian Shum 2022-10-22 02:14:49 +08:00 committed by GitHub
parent b50c44e854
commit 7c18dcda7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 27 additions and 38 deletions

View file

@ -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 {