stash icon indicating copy to clipboard operation
stash copied to clipboard

Allow configuration of ffmpeg args

Open WithoutPants opened this issue 3 years ago • 0 comments

Resolves #2844.

Allows for the configuration of ffmpeg arguments. Adds the following configuration handles:

  • ffmpeg.transcode.input_args
  • ffmpeg.transcode.output_args
  • ffmpeg.live_transcode.input_args
  • ffmpeg.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.

WithoutPants avatar Nov 30 '22 03:11 WithoutPants