Allow configuration of ffmpeg args
Resolves #2844.
Allows for the configuration of ffmpeg arguments. Adds the following configuration handles:
ffmpeg.transcode.input_argsffmpeg.transcode.output_argsffmpeg.live_transcode.input_argsffmpeg.live_transcode.output_args
Currently, these aren't exposed in graphql or the UI - these must be entered manually by editing the config.yml file.
For example:
ffmpeg:
transcode:
input_args:
- -foo
output_args:
- -bar
live_transcode:
input_args:
- -baz
output_args:
- -xyz
When live transcoding, this would add -foo before the input parameter, and -bar before the output parameter. During generate operations - sprite, preview, transcode - it adds -baz before the input parameter and -xyz before the output parameter.
This will allow configuring hardware decoding by adding the following to config.yml:
ffmpeg:
transcode:
input_args:
- -hwaccel
- auto
live_transcode:
input_args:
- -hwaccel
- auto
This will not allow hardware accelerated encoding as that requires changing the video codec parameters, which is a separate and more significant change.
I have not yet decided if this should be added to the UI.