Skip to content

win: fix patch-tester - #1099

Open
Bertaz wants to merge 3 commits into
keylase:masterfrom
Bertaz:testerFix
Open

win: fix patch-tester#1099
Bertaz wants to merge 3 commits into
keylase:masterfrom
Bertaz:testerFix

Conversation

@Bertaz

@Bertaz Bertaz commented Jul 30, 2026

Copy link
Copy Markdown

Current command doesn't work. This error is always returned:

[hwupload @ 000001f89307f4c0] A hardware device reference is required to upload frames to.
[AVFilterGraph @ 000001f89303f380] Error initializing filters
Error opening output file -.

Updated ffmpeg command as per documentation ffmpeg.org hwaccel -init_hw_device.
Fixes #892, fixes #1070

updates ffmpeg command as per documentation
@Bertaz
Bertaz marked this pull request as ready for review July 30, 2026 11:43
@Bertaz

Bertaz commented Jul 30, 2026

Copy link
Copy Markdown
Author

On systems with multiple cuda capable GPUs it's possible that -init_hw_device cuda complains, probably best to add cuda:0. I'll test if it gives any problem on my single GPU PC.

Additionally the -t 50 at the end is misplaced, the intention was probably to stop the rendering after 50s. But it only works if placed before the -i input. Even better it should be testsrc=duration=50 as per documentation.

Also testsrc complains on latest ffmpeg, as it gives rgb24 pxfmt to h264_nvenc, which accepts only YUV formats. Should use testsrc2 instead.
Tested and it works on latest, 8.1, 7.1 and self compiled ffmpeg from 2025.

Bertaz added 2 commits August 2, 2026 17:50
Replaces testsrc with testsrc2 for correct pixel format for latest ffmpeg
Fixes position of duration parameter `-t`
Adds cuda:0 to explicitly select the first CUDA device
Uses the duration(d) parameter for the source instead of generic option '-t'
Changes source's duration to 150s (2:30 minutes) so that encoding output is shown longer
@Bertaz

Bertaz commented Aug 2, 2026

Copy link
Copy Markdown
Author

Tested cuda:0 and it works with single GPU systems and multiple GPUs (selecting the first one). It also surfaces the option to select a specific GPU.

Changed to duration for the source input instead of general duration.
Increased video duration to 150 seconds.
50 seconds on beefy computers can be too quick for the user to see the messages. No issue on slower computers as it was infinite before.

Last commit can be dropped it it's unwanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

patch-tester.bat need to be update ?? Question: Does the patch tester script still work ?

1 participant