[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


Hello,

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"
-filter_complex
"[0:v]bwdif_cuda,scale_cuda=format=yuv420p[video];movie=/mnt/LOGOS/logoChannel3_%d.png,loop=loop=-1:size=1:start=0,format=yuva420p,hwupload[logo];[video][logo]overlay_cuda=x=0:y=0:repeatlast=1[overlay];[overlay]split=1[s0];[s0]scale_cuda=3840:2160:format=yuv420p[v0];[0:a]channelmap=map=0|1:channel_layout=stereo[a1];[a1]asplit=1[a11]"
-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
"udp://x.x.x.x:X.x.x.x?pkt_size=1316&ttl=0"


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.

BR,

Dennis.


More information about the ffmpeg-user mailing list