Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Verify NVENC patch

Jump to bottom
Jai Luthra edited this page Dec 11, 2025 * 6 revisions

From @lars18th and @reloxx13

Linux

Run the patch tester script:

tools/patch-tester/patch-tester.sh

Or alternatively directly run the following ffmpeg command:

ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda \
-f lavfi -i testsrc -t 50 \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 1M -f null - \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 2M -f null - \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 3M -f null - \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 4M -f null - \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 5M -f null - \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 6M -f null - \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 7M -f null - \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 8M -f null - \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 9M -f null - \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 10M -f null - \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 11M -f null - \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 12M -f null - \
-vf hwupload -c:a copy -c:v h264_nvenc -b:v 13M -f null -

This only requires to have installed a recent ffmpeg version compiled with nvenc enabled. Almost all distributions have it now.

Windows

Download FFmpeg from: https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z

Then run the patch tester BAT or PowerShell script found in the win/tools/patch-tester directory.

Or alternatively manually run the following command:

ffmpeg.exe -y -hwaccel cuda -hwaccel_output_format cuda ^
-f lavfi -i testsrc -t 50 ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 1M -f null - ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 2M -f null - ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 3M -f null - ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 4M -f null - ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 5M -f null - ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 6M -f null - ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 7M -f null - ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 8M -f null - ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 9M -f null - ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 10M -f null - ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 11M -f null - ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 12M -f null - ^
-vf hwupload -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 13M -f null -

Output

If you get a message like:

[h264_nvenc @ 0x55fc31535fc0] OpenEncodeSessionEx failed: out of memory (10): (no details)
Error initializing output stream 3:0 -- Error while opening encoder for output stream #3:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

Then the patch has failed.

But if the ffmpeg starts to work and shows:

frame= 560 fps=329 q=8.0 Lq=8.0 q=8.0 q=8.0 size=N/A time=00:00:22.40 bitrate=N/A speed=13.2x

Then... Congratulations! The patch works.

Clone this wiki locally