Add video codec profiles (#5154)

This commit is contained in:
NodudeWasTaken
2024-08-27 10:03:48 +02:00
committed by GitHub
parent 3089e1ad69
commit ce47efc415
5 changed files with 80 additions and 49 deletions

View File

@@ -24,13 +24,13 @@ func (o *ScreenshotOptions) setDefaults() {
}
type ScreenshotOutputType struct {
codec ffmpeg.VideoCodec
codec *ffmpeg.VideoCodec
format ffmpeg.Format
}
func (t ScreenshotOutputType) Args() []string {
var ret []string
if t.codec != "" {
if t.codec != nil {
ret = append(ret, t.codec.Args()...)
}
if t.format != "" {
@@ -45,7 +45,7 @@ var (
format: "image2",
}
ScreenshotOutputTypeBMP = ScreenshotOutputType{
codec: ffmpeg.VideoCodecBMP,
codec: &ffmpeg.VideoCodecBMP,
format: "rawvideo",
}
)