Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: hevc_qsv puts custom main options (e.g. '-hwaccel qsv') in the wrong place #421

Open
jecorn opened this issue Jun 21, 2024 · 0 comments
Labels
status:awaiting-triage type:bug Something isn't working

Comments

@jecorn
Copy link

jecorn commented Jun 21, 2024

Describe the Bug

I noticed that the hevc_vaapi plugin (0.0.5) includes the -hwaccel vaapi option. But the hevc_qsv plugin omits -hwaccel qsv and has no checkbox to enable it.
I tried to add -hwaccel qsv to the 'Custom Main Options" section of the own ffmpeg params. The docs state that these should be injected before the input

ffmpeg \
    -hide_banner \
    -loglevel info \
    <CUSTOM MAIN OPTIONS HERE> \
    -i /library/TEST_FILE.mkv \
    <CUSTOM ADVANCED OPTIONS HERE> \
    -map 0:v:0 \
    -map 0:a:0 \
    -map 0:a:1 \
    -c:v:0 hevc_qsv \
    <CUSTOM VIDEO OPTIONS HERE> \
    -c:a:0 copy \
    -c:a:1 copy \
    -y /path/to/output/video.mkv 

However, I found that it was instead injected after the input, rendering the ffmpeg command line invalid:
ffmpeg -hide_banner -loglevel info -init_hw_device qsv=hw -filter_hw_device hw -i /library/TV Shows/MyVideo.mkv -hwaccel qsv -strict -2 -max_muxing_queue_size 2048 -map 0:v:0 -map 0:a:0 -map 0:a:1 -map 0:s:0 -map 0:s:1 -map 0:t:0 -map 0:t:1 -map 0:t:2 -c:v:0 hevc_qsv -preset slow -tune film -global_quality 23 -look_ahead 1 -c:a:0 copy -c:a:1 copy -c:s:0 copy -c:s:1 copy -c:t:0 copy -c:t:1 copy -c:t:2 copy -y /tmp/unmanic/unmanic_file_conversion-sqxde-1718615082/MyVideo.mkv

Steps to Reproduce

  1. Load the hevc_qsv plugin
  2. Add an option to the "custom main options"
  3. start encoding

Expected Behavior

Option is added before input, but they instead go after the input

Screenshots

image

Relevant Settings

No response

Version

0.2.7~d14f498

Platform

Ubuntu 20.04, Docker

Relevant log output

Option hwaccel (use HW accelerated decoding) cannot be applied to output url /tmp/unmanic/unmanic_file_conversion-crsun-1718615080/MyMovie.mkv -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.

Error parsing options for output file /tmp/unmanic/unmanic_file_conversion-crsun-1718615080/MyMovie.mkv.
@jecorn jecorn added status:awaiting-triage type:bug Something isn't working labels Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:awaiting-triage type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant