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:
@@ -21,6 +21,11 @@ type TranscodeOptions struct {
|
||||
|
||||
// Verbosity is the logging verbosity. Defaults to LogLevelError if not set.
|
||||
Verbosity ffmpeg.LogLevel
|
||||
|
||||
// arguments added before the input argument
|
||||
ExtraInputArgs []string
|
||||
// arguments added before the output argument
|
||||
ExtraOutputArgs []string
|
||||
}
|
||||
|
||||
func (o *TranscodeOptions) setDefaults() {
|
||||
@@ -59,6 +64,7 @@ func Transcode(input string, options TranscodeOptions) ffmpeg.Args {
|
||||
|
||||
var args ffmpeg.Args
|
||||
args = args.LogLevel(options.Verbosity).Overwrite()
|
||||
args = append(args, options.ExtraInputArgs...)
|
||||
|
||||
if options.XError {
|
||||
args = args.XError()
|
||||
@@ -92,6 +98,8 @@ func Transcode(input string, options TranscodeOptions) ffmpeg.Args {
|
||||
}
|
||||
args = args.AppendArgs(options.AudioArgs)
|
||||
|
||||
args = append(args, options.ExtraOutputArgs...)
|
||||
|
||||
args = args.Format(options.Format)
|
||||
args = args.Output(options.OutputPath)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user