Allow configuration of ffmpeg args (#3216)

* Allow configuration of ffmpeg args
* Add UI settings for ffmpeg config
* Add changelog entry
* Add documentation in manual
This commit is contained in:
WithoutPants
2023-01-27 11:31:11 +11:00
committed by GitHub
parent a36b895e4b
commit b67abb89ff
20 changed files with 204 additions and 26 deletions

View File

@@ -144,11 +144,17 @@ type TranscodeStreamOptions struct {
// in some videos where the audio codec is not supported by ffmpeg
// ffmpeg fails if you try to transcode the audio
VideoOnly bool
// arguments added before the input argument
ExtraInputArgs []string
// arguments added before the output argument
ExtraOutputArgs []string
}
func (o TranscodeStreamOptions) getStreamArgs() Args {
var args Args
args = append(args, "-hide_banner")
args = append(args, o.ExtraInputArgs...)
args = args.LogLevel(LogLevelError)
if o.StartTime != 0 {
@@ -184,6 +190,8 @@ func (o TranscodeStreamOptions) getStreamArgs() Args {
"-ac", "2",
)
args = append(args, o.ExtraOutputArgs...)
args = args.Format(o.Codec.format)
args = args.Output("pipe:")