mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
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:
@@ -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:")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user