[FFmpeg-trac] #5690(undetermined:new): Codec hevc_nvenc (GPU M4000) + HLS memory leak
FFmpeg
trac at avcodec.org
Mon Jul 4 10:37:13 CEST 2016
#5690: Codec hevc_nvenc (GPU M4000) + HLS memory leak
-------------------------------------+-------------------------------------
Reporter: milanc | Type: defect
Status: new | Priority: important
Component: | Version: git-
undetermined | master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
driver: nvidia-358, CUDA 7.5, NVAPI 3.6
Hi, I have problem with hevc_nvenc encoding from DVB-S source into HLS.
More encoding instances (channels) means faster loss of memory.
For example 8xFullHD streams corresponds to loss 5MB/s of RAM.
I try to use valgrind and I see that some cuda 352 libraries are used.
The cuda7.5 package is depended on 352 driver (?) and I can't change it.
{{{
==5808== 341,531 bytes in 109 blocks are possibly lost in loss record
1,631 of 1,655
==5808== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-
amd64-linux.so)
==5808== by 0x1DB5CF1D: ??? (in /usr/lib/x86_64-linux-
gnu/libcuda.so.352.79)
==5808== by 0x1DB0D34C: ??? (in /usr/lib/x86_64-linux-
gnu/libcuda.so.352.79)
==5808== by 0x1DB1E11F: ??? (in /usr/lib/x86_64-linux-
gnu/libcuda.so.352.79)
==5808== by 0x1DB24D25: ??? (in /usr/lib/x86_64-linux-
gnu/libcuda.so.352.79)
==5808== by 0x1DA9EC19: ??? (in /usr/lib/x86_64-linux-
gnu/libcuda.so.352.79)
==5808== by 0x1DA9EECB: ??? (in /usr/lib/x86_64-linux-
gnu/libcuda.so.352.79)
==5808== by 0x1DA82352: ??? (in /usr/lib/x86_64-linux-
gnu/libcuda.so.352.79)
==5808== by 0x1DA50350: cuCtxCreate_v2 (in /usr/lib/x86_64-linux-
gnu/libcuda.so.352.79)
==5808== by 0x472136: ??? (in /usr/local/bin/ffmpeg)
==5808== by 0xAF686D: ??? (in /usr/local/bin/ffmpeg)
==5808== by 0x4A1562: ??? (in /usr/local/bin/ffmpeg)
==5808==
==5808== LEAK SUMMARY:
==5808== definitely lost: 72 bytes in 1 blocks
==5808== indirectly lost: 0 bytes in 0 blocks
==5808== possibly lost: 999,476 bytes in 1,104 blocks
==5808== still reachable: 1,883,507,503 bytes in 11,898 blocks
==5808== suppressed: 0 bytes in 0 blocks
==5808== Reachable blocks (those to which a pointer was found) are not
shown.
==5808== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==5808==
==5808== For counts of detected and suppressed errors, rerun with: -v
==5808== Use --track-origins=yes to see where uninitialised values come
from
==5808== ERROR SUMMARY: 557 errors from 172 contexts (suppressed: 0 from
0)
}}}
{{{
ffmpeg version N-80900-g77eb05a Copyright (c) 2000-2016 the FFmpeg
developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --prefix=/FFMPEG --pkg-config-flags=--static
--bindir=/root/bin --enable-gpl --enable-nonfree --enable-libfdk-aac
--enable-libmp3lame --enable-libx264 --enable-libx265 --enable-nvenc
--enable-libmfx --enable-version3 --enable-pthreads --enable-runtime-
cpudetect --disable-ffserver --enable-libfreetype --enable-filter=drawtext
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Hyper fast Audio and Video encoder
}}}
My command...
{{{
ffmpeg -i "udp://@SOURCE_IP?fifo_size=1000000&overrun_nonfatal=1" -flags
-global_header -map v:0 -c:v hevc_nvenc -b:v 3000k -maxrate 4000k -bufsize
3000k -deinterlace -vf crop=in_w-0:in_h-0,scale=1920:1080,null -keyint_min
30 -g 100 -map a:0 -c:a libfdk_aac -b:a 128k -ar 44100 -ac 2 -hls_time 5
-hls_list_size 6 -hls_base_url http://A.B.C.D/101/ -hls_flags
delete_segments -hls_segment_filename /hls/101/mystream-%08d.ts
/hls/101/mystream.m3u8
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5690>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list