[FFmpeg-trac] #1604(undetermined:new): Rtmp streaming fps continually drops

FFmpeg trac at avcodec.org
Sun Aug 5 15:42:54 CEST 2012


#1604: Rtmp streaming fps continually drops
-------------------------------------+-------------------------------------
             Reporter:  Pyriel0      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  unspecified  |  undetermined
             Keywords:  rtmp         |               Resolution:
  framerate                          |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by burek):

 In the following examples, piping of 2 ffmpeg processes was used to
 distinguish which process exhibits the memory exhaustion bug.


 == Examples that exhibit 8GB memory exhaustion: ==

 1: All-in-one cmd line:
 {{{
 ffmpeg -re -i "f:\xxx" -pix_fmt yuv420p -s hd720 -vcodec libx264 -preset
 medium -b:v 2400k -maxrate 2400k -bufsize 600k -acodec libmp3lame -ac 2
 -b:a 128k -ar 44100 -f flv rtmp://live-dfw.justin.tv/app/xxx"
 }}}

 2: Split into 2 processes, first one encodes the stuff, the second one
 streams it. What is strange is that 1st process, that does the encoding,
 exhibits the bug with high ram memory usage, but it was expected that 2nd
 process would do so, because of rtmp. I can only guess that second process
 does not read data from pipe fast enough, which causes the first process
 to suffocate the available ram memory:
 {{{
 ffmpeg -re -i "f:\xxx" -pix_fmt yuv420p -s hd720 -vcodec libx264 -preset
 medium -b:v 2400k -maxrate 2400k -bufsize 600k -acodec libmp3lame -ac 2
 -b:a 128k -ar 44100 -f flv - | ffmpeg -f flv -i - -c copy -f flv "rtmp
 ://live-dfw.justin.tv/app/xxx"
 }}}

 == Examples that DON'T exhibit 8GB memory exhaustion: ==

 1: Output to DEV/NULL using flv file format:
 {{{
 ffmpeg -re -i "f:\xxx" -pix_fmt yuv420p -s hd720 -vcodec libx264 -preset
 medium -b:v 2400k -maxrate 2400k -bufsize 600k -acodec libmp3lame -ac 2
 -b:a 128k -ar 44100 -y -f flv - > NUL
 }}}

 2: Output using udp instead of rtmp:
 {{{
 ffmpeg -re -i "f:\xxx" -pix_fmt yuv420p -s hd720 -vcodec libx264 -preset
 medium -b:v 2400k -maxrate 2400k -bufsize 600k -acodec libmp3lame -ac 2
 -b:a 128k -ar 44100 -f flv - | ffmpeg -f flv -i - -c:copy -f flv
 udp://127.0.0.1:12345
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1604#comment:5>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list