[FFmpeg-user] NVENC regressions in FFmpeg 7: More than 1000 frames duplicated

Dennis Mungai dmngaie at gmail.com
Thu May 9 17:55:51 EEST 2024


Testing the various NVENC wrappers, specifically hevc_nvenc in FFmpeg 7
results in the spurious warning above

Sample command:

ffmpeg -threads:v 1 -hwaccel nvdec -hwaccel_output_format cuda
-init_hw_device cuda=cuda:0 -filter_hw_device cuda -extra_hw_frames 3
-nostdin -ignore_unknown -thread_queue_size 5120 -analyzeduration 20000000
-f mpegts -scan_all_pmts 1 -merge_pmt_versions 1 -i "udp://IP:PORT"
-map '[v0]' -fps_mode 1 -c:v hevc_nvenc -no-scenecut 1 -keyint_min 100
-bf:v 3 -b_ref_mode:v each -g:v 100 -r:v 50 -i_qfactor 0.75 -b_qfactor 1.1
-aspect 16:9 -b:v 2500k -minrate 2500k -maxrate 2500k -bufsize 2500k
-profile:v main -preset p3 -tune:v hq -rc:v cbr -cbr:v 1 -gpu:v 0 -tag:v
hvc1 -map '[a11]' -metadata:s:a:0 language= -async 1 -acodec libfdk_aac -ar
48000 -ac 2 -ab 192k -flags -global_header+cgop -f mpegts -mpegts_start_pid
100 -pcr_period 20 -pat_period 0.1

Results in:

 [vost#0:0/hevc_nvenc @ 0x55b3a90c1c40] More than 1000 frames
duplicated92.3kbits/s dup=999 drop=0 speed=1.59x

The video output stream is also unplayable, frozen in a single image/frame.

The same command runs perfectly well on ffmpeg 6.x with no spurious
warnings on frame duplication and with perfect playback.



More information about the ffmpeg-user mailing list