[FFmpeg-user] ffmpeg Memory usage

Evchev Ruslan r.evchev at 1plus1.tv
Thu Dec 11 17:21:46 CET 2014


Hello dear community!

I am using ffmpeg very long time for converting, streaming post- and preprocessing video/audio. Now I have one big problem. I try to encode some count of udp streams (DVB-S from satellite) using following code (example):
ffmpeg -discard noref -err_detect explode -i udp://@239.200.0.37:1234?overrun_nonfatal=1 -map 0:0 -vcodec mpeg2video -b:v 4000k -bt 4000k -map 0:1 -acodec mp2  -b:a 128k -f segment -segment_list /var/www/stb/stb.m3u8 -segment_time 4 -segment_wrap 10 -segment_format mpegts -segment_list_size 5 /var/www/stb/stb%03d.ts > /dev/null 2>&1 & echo $! > /var/run/stb.pid

All works its fine, but ffmpeg process use free memory (RAM) with 1 MB/16 seconds. It is very critical for me. My server contained 16GB and 10 processes of ffmpeg using all free memory  eventually. I am using some bash scripts for restarting ffmpeg, but it is not my way. Service must work perfectly 24/7.

OS: Ubuntu server 12.04 x86_64
ffmpeg version: ffmpeg version 2.4.git
build on Ubuntu Compilation Guide https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
configure:
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --bindir="$HOME/bin" \
  --enable-gpl \
  --enable-libass \
  --enable-libfdk-aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libtheora \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-nonfree
PATH="$HOME/bin:$PATH" make


Regards, Ruslan Evchev
System administrator of archive system
+380673329769

r.evchev at 1plus1.tv<mailto:r.evchev at 1plus1.tv>


[cid:image001.png at 01D01548.7E639B30]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 20370 bytes
Desc: image001.png
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20141211/155a1783/attachment.png>


More information about the ffmpeg-user mailing list