[FFmpeg-user] nvenc and parallel process memory leaks?

eKrajnak blazej.krajnak at gmail.com
Sat Dec 12 12:56:46 EET 2020


Hi,

I can confirm, I have the same problem.
Parallel encoding of 7 mpeg-ts streams, using h264_cuvid / h264_nvenc. One
ffmpeg process starts at 300MB of RAM usage, and linearly increase to 1GB in
15min, then OOM killer start to kill processes.


NVIDIA-SMI 455.45.01    Driver Version: 455.45.01    CUDA Version: 11.1

ffmpeg version N-100129-g0c8a0d3a56-patrickz Copyright (c) 2000-2020 the
FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-nonfree --extra-cflags=-I/usr/local/cuda/include
--extra-ldflags=-L/usr/local/cuda/lib64 --disable-shared --enable-static
--enable-pthreads --enable-gpl --enable-nonfree --enable-libass
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
--enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
--enable-filters --enable-openssl --enable-runtime-cpudetect
--extra-version=patrickz
  libavutil      56. 61.100 / 56. 61.100
  libavcodec     58.114.100 / 58.114.100
  libavformat    58. 64.100 / 58. 64.100
  libavdevice    58. 11.103 / 58. 11.103
  libavfilter     7. 91.100 /  7. 91.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100



ffmpeg \
    -re \
    -vsync 0 -hwaccel cuda -hwaccel_output_format cuda \
    -c:v h264_cuvid \
    -i "udp://239.1.152.23:1234?overrun_nonfatal=1&fifo_size=50000000" \
    -map 0 \
    -c copy \
    -copy_unknown \
    -c:0 h264_nvenc \
    -preset p7 \
    -profile:0 high \
    -coder 1 \
    -flags +ildct+ilme \
    -g 120 \
    -keyint_min 120 \
    -streamid 0:0x201 \
    -mpegts_pmt_start_pid 0x200 \
    -mpegts_start_pid 0x203 \
    -mpegts_service_id 112 \
    -mpegts_transport_stream_id 9217 \
    -metadata provider_name="PNAME" \
    -metadata service_name="SNAME" \
    -metadata service_provider="SPNAME" \
    -minrate 5300k \
    -maxrate 5300k \
    -bufsize 600k \
    -muxrate 6000k \
    -f mpegts \
    -pcr_period 30  \
    -b:v 5M \
    "udp://enp2s0@239.1.67.55:1234?pkt_size=1316&bitrate=6000000&dscp=34"




--
Sent from: http://www.ffmpeg-archive.org/


More information about the ffmpeg-user mailing list