feat: ffmpeg select specific frame and frame(n) filter
* select frame after process * restrict frame selected * selected frame meta * test: update golden files * available index
This commit is contained in:
parent
4d71837fb8
commit
a4f23c6560
11 changed files with 68 additions and 44 deletions
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/gabriel-vasile/mimetype"
|
||||
"go.uber.org/zap"
|
||||
"io"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
|
@ -127,6 +128,11 @@ func (p *Processor) Process(ctx context.Context, in *imagor.Blob, params imagorp
|
|||
if err = av.ProcessFrames(); err != nil {
|
||||
return
|
||||
}
|
||||
case "frame":
|
||||
n, _ := strconv.Atoi(filter.Args)
|
||||
if err = av.SelectFrame(n); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
meta := av.Metadata()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue