From e729574937623680cdec5a9e4b786d7681a57d57 Mon Sep 17 00:00:00 2001 From: dvdan <47903696+dsummer@users.noreply.github.com> Date: Sat, 14 Nov 2026 04:33:30 -0500 Subject: [PATCH] tools: patch-tester: fix for newer FFmpeg and make it terminate (#1144) - Replace -vsync 0 with per-output -fps_mode passthrough (requires FFmpeg 5.1 or newer). - Limit the input with testsrc=d=50 instead of "-t 50" after -i, which only limited the first output so the other encodes never terminated. - Allow selecting the ffmpeg binary through the FFMPEG variable. --- tools/patch-tester/patch-tester.sh | 31 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/tools/patch-tester/patch-tester.sh b/tools/patch-tester/patch-tester.sh index 464b722..e980725 100755 --- a/tools/patch-tester/patch-tester.sh +++ b/tools/patch-tester/patch-tester.sh @@ -1,19 +1,20 @@ #!/usr/bin/env bash -ffmpeg -y -vsync 0 \ +# Set FFMPEG to use an ffmpeg build that is not on PATH. +"${FFMPEG:-ffmpeg}" -y \ -hwaccel cuda -hwaccel_output_format cuda \ - -f lavfi -i testsrc -t 50 \ + -f lavfi -i testsrc=d=50 \ \ - -c:a copy -c:v h264_nvenc -b:v 1M -f null - \ - -c:a copy -c:v h264_nvenc -b:v 2M -f null - \ - -c:a copy -c:v h264_nvenc -b:v 3M -f null - \ - -c:a copy -c:v h264_nvenc -b:v 4M -f null - \ - -c:a copy -c:v h264_nvenc -b:v 5M -f null - \ - -c:a copy -c:v h264_nvenc -b:v 6M -f null - \ - -c:a copy -c:v h264_nvenc -b:v 7M -f null - \ - -c:a copy -c:v h264_nvenc -b:v 8M -f null - \ - -c:a copy -c:v h264_nvenc -b:v 9M -f null - \ - -c:a copy -c:v h264_nvenc -b:v 10M -f null - \ - -c:a copy -c:v h264_nvenc -b:v 11M -f null - \ - -c:a copy -c:v h264_nvenc -b:v 12M -f null - \ - -c:a copy -c:v h264_nvenc -b:v 13M -f null - + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 1M -f null - \ + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 2M -f null - \ + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 3M -f null - \ + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 4M -f null - \ + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 5M -f null - \ + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 6M -f null - \ + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 7M -f null - \ + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 8M -f null - \ + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 9M -f null - \ + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 10M -f null - \ + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 11M -f null - \ + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 12M -f null - \ + -fps_mode passthrough -c:a copy -c:v h264_nvenc -b:v 13M -f null -