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

Fix hwCanFullHWTranscode not detecting no filter errors #4934

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

NodudeWasTaken
Copy link
Contributor

@NodudeWasTaken NodudeWasTaken commented Jun 5, 2024

A discord user experienced an error where full hardware transcoding didnt work without a filter (which wasn't tested, we always used a scale filter before).
This patch passes the requested resolution from the current transcode down to the tester, such that we test it with a filter if it needs one, or without a filter if it doesnt.

Note that the specific issue was:

ffmpeg error when running command <E:\stash\stash windows\ffmpeg.exe -hide_banner -v error -hwaccel_device 0 -hwaccel cuda -hwaccel_output_format cuda -extra_hw_frames 5 -i \path to movies\movies.mkv -c:v h264_nvenc -rc vbr -cq 15 -movflags frag_keyframe+empty_moov -ac 2 -f mp4 pipe:>: [h264_nvenc @ 0000022c1947be40] Provided device doesn't support required NVENC features

[vost#0:0/h264_nvenc @ 0000022c1947bb80] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.

Error while filtering: Function not implemented

[out#0/mp4 @ 0000022c19479580] Nothing was written into output file, because at least one of its streams received no packets.

Which usually indicates a driver/ffmpeg incompatibility, but nevertheless we shouldn't error out because of it.
It could also indicate 10 bit input file-hell, which is a rabbit hole of its own (which we could handle with scale_cuda=format=nv12 on some versions of ffmpeg, or simply fall back on no accelerated decode)

@NodudeWasTaken NodudeWasTaken changed the title Fix hw transcoding not working without a filter Fix hwCanFullHWTranscode not detecting no filter errors Jun 5, 2024
@WithoutPants WithoutPants added bug Something isn't working labels Jun 6, 2024
@WithoutPants WithoutPants merged commit 124ea60 into stashapp:develop Jun 6, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants