RTMP stream framerate continually drops

Issues involving a Windows version of FFmpeg. Do not post general usage questions here.

RTMP stream framerate continually drops

Postby Pyriel0 » Fri Aug 03, 2012 4:29 pm

I have been trying to stream online through ffmpeg but I am having this problem. The frame rate drops from 30 down to 11 within 1-2 minutes. The audio is fine and does not skip at any time. I can use the exact same settings, with output set to save in .mp4 to the hard drive, and it works perfect.

c:\ffmpeg\bin>ffmpeg -re -rtbufsize 100000k -i "f:\xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-pix_fmt yuv420p -s hd720 -vcodec libx264 -preset medium -b:v 2400k -maxrate 240
0k -bufsize 600k -acodec libmp3lame -ac 2 -b:a 128k -ar 44100 -f flv "rtmp://liv
e-dfw.justin.tv/app/xxxxxxxxxxxxxxxxxxxxx flashver=FME/2.5 (compatible; FMSc 1.0
)"

I have already tried removing the -re and setting the output to -r 30. I also tried setting -g 300 and -keyint_min 30 to see if Iframes would somehow fix it. No errors or frame drops are shown.

Somehow only the video encoding is getting messed up when it is set for -f flv output. This happens for both dshow desktop capture input and file input. My cpu is an Intel 3770K at 4.4GHz and can easily handle the load. Internet upload is 3Mb so the bitrate is well within this.

Thanks for reading. Hopefully someone here knows how to fix this because I am stumped. No idea why it will save to the hard drive just fine but not stream when its well within the cable bandwidth.
Pyriel0
 
Posts: 15
Joined: Fri Aug 03, 2012 1:52 pm

Re: RTMP stream framerate continually drops

Postby rogerdpack » Fri Aug 03, 2012 6:18 pm

what's your complete uncut console output?
-r
rogerdpack
 
Posts: 1292
Joined: Fri Aug 05, 2011 9:56 pm

Re: RTMP stream framerate continually drops

Postby Pyriel0 » Fri Aug 03, 2012 6:59 pm

I just did a 2 minute run with -report on. Attaching the report file because its quite a bit of text.

I forgot to mention my ram usage is around 1 GB higher when attempting to stream than when it records to the hard drive.
Attachments
ffmpeg-report out.rar
(49.15 KiB) Downloaded 87 times
Pyriel0
 
Posts: 15
Joined: Fri Aug 03, 2012 1:52 pm

Re: RTMP stream framerate continually drops

Postby rogerdpack » Fri Aug 03, 2012 7:25 pm

It does appear to be getting slower over time. What if you stream it to rtmp located at "localhost"? Regardless, I'd query the ffmpeg-user group and see if they have any ideas...
rogerdpack
 
Posts: 1292
Joined: Fri Aug 05, 2011 9:56 pm

Re: RTMP stream framerate continually drops

Postby Pyriel0 » Fri Aug 03, 2012 8:13 pm

I'll have to figure out how to do the localhost and try it out. I've only been messing around with ffmpeg for a few days and learning as I go. Thanks for taking a look at it and for the suggestion.
Pyriel0
 
Posts: 15
Joined: Fri Aug 03, 2012 1:52 pm

Re: RTMP stream framerate continually drops

Postby rogerdpack » Fri Aug 03, 2012 8:47 pm

also you may want to try an older build of ffmpeg until the pthreads issue gets resolved:
http://betterlogic.com/roger/2012/08/ff ... rk-around/
rogerdpack
 
Posts: 1292
Joined: Fri Aug 05, 2011 9:56 pm

Re: RTMP stream framerate continually drops

Postby Pyriel0 » Sat Aug 04, 2012 5:11 pm

I just downloaded a 64 bit version to see if it would make a difference. The same thing happens but it keeps taking more and more ram until all (8 GB) is used. I'm thinking this is a buffering problem.

Is there some way to force the output? I'm guessing frames just keep piling up in the buffer waiting for something that never comes, or not very often at least, to send them out.
Pyriel0
 
Posts: 15
Joined: Fri Aug 03, 2012 1:52 pm

Re: RTMP stream framerate continually drops

Postby rogerdpack » Sat Aug 04, 2012 5:27 pm

yeah I'd repost your question to the ffmpeg-user group (or maybe the librtmp group?)
http://lists.mplayerhq.hu/pipermail/rtm ... 01803.html was turned up via a google search, so I wonder if the problem is reproducible in linux...
rogerdpack
 
Posts: 1292
Joined: Fri Aug 05, 2011 9:56 pm

Re: RTMP stream framerate continually drops

Postby Pyriel0 » Sun Aug 05, 2012 9:50 am

The ffmpeg irc and I did some troubleshooting of this last night.

It works with the output at -f flv udp and with -f flv - > NUL. It only does not work for rtmp so we are thinking its a problem with the librtmp.
Pyriel0
 
Posts: 15
Joined: Fri Aug 03, 2012 1:52 pm

Re: RTMP stream framerate continually drops

Postby Defiancefew » Mon Aug 06, 2012 1:31 pm

ive got the same issue.

is there any build that dont have this problem?
Defiancefew
 
Posts: 9
Joined: Mon Aug 06, 2012 1:20 pm

Next

Return to Usage Issues

Who is online

Users browsing this forum: Bing [Bot] and 1 guest