From 03151e791c72f92dcaa3a7fe00dfc7472891baa3 Mon Sep 17 00:00:00 2001 From: Bertaz <44445647+Bertaz@users.noreply.github.com> Date: Wed, 5 Aug 2026 07:27:24 +0200 Subject: [PATCH] win: fix patch-tester (#1099) * win: fix patch-tester updates ffmpeg command as per documentation * win: fix patch-tester ffmpeg command 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 * win: change patch-tester input duration 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 --- win/tools/patch-tester/patch-tester.bat | 2 +- win/tools/patch-tester/patch-tester.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/win/tools/patch-tester/patch-tester.bat b/win/tools/patch-tester/patch-tester.bat index 6e205b9..e1f3ef4 100755 --- a/win/tools/patch-tester/patch-tester.bat +++ b/win/tools/patch-tester/patch-tester.bat @@ -1,6 +1,6 @@ @echo off -ffmpeg.exe -y -hwaccel cuda -hwaccel_output_format cuda -f lavfi -i testsrc -t 50 ^ +ffmpeg.exe -y -init_hw_device cuda:0 -hwaccel cuda -hwaccel_output_format cuda -f lavfi -i testsrc2=d=150 ^ -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 - ^ diff --git a/win/tools/patch-tester/patch-tester.ps1 b/win/tools/patch-tester/patch-tester.ps1 index 181a540..38ed762 100755 --- a/win/tools/patch-tester/patch-tester.ps1 +++ b/win/tools/patch-tester/patch-tester.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -ffmpeg.exe -y -hwaccel cuda -hwaccel_output_format cuda -f lavfi -i testsrc -t 50 ` +ffmpeg.exe -y -init_hw_device cuda:0 -hwaccel cuda -hwaccel_output_format cuda -f lavfi -i testsrc2=d=150 ` -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 - `