Problem with either audio or Video freezing

334 views
Skip to first unread message

Emil Georgiev

unread,
May 30, 2012, 6:36:41 AM5/30/12
to c-rtmp...@googlegroups.com
Hello, 

I have a working UDP ffmpeg transport stream, using it with crtmp and for most of the time it is working fine. However at some point either the sound stops and the video keeps runing fine, or the sound is running and the video freezes on a single frame(when the page is refreshed the frame changes to more current one but still frozen on a single frame). It happens randomly, usually after the stream has been working for more than 24 hours. There is no problem with the ffmpeg encoder, the crtmp server also thinks everything is ok - no errors, nothing at all - it looks like it's running perfectly. Except the stream is not - there is either no sound or no video. Restarting the crtmp server fixes the problem for another day or two, until it happens again.

here's the ffmpeg syntax we're using:
ffmpeg -i udp://127.0.0.1:20000 -pass 1 -vcodec libx264 -b 500000 -s 320x180 -g 50 -threads 0 -acodec libfaac -ab 96000 -ar 48000 -ac 2 -async 1 -f mpegts udp://127.0.0.1:10000?pkt_size=1316 -v verbose

C++ RTMP Server

unread,
May 30, 2012, 7:14:46 AM5/30/12
to c-rtmp...@googlegroups.com
Hi Emil,

Can you please also record that stream in a TS file on disk? That should not be that big at you current bitrate (around 15GB). After that, we can "replay" that file through crtmpserver and identify the problem.

Thank you
> You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> To post to this group, send email to c-rtmp...@googlegroups.com
> To unsubscribe from this group, send email to
> c-rtmp-serve...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/c-rtmp-server?hl=en

------
C++ RTMP Server
Web: http://www.rtmpd.com




Emil Georgiev

unread,
May 30, 2012, 9:17:34 AM5/30/12
to c-rtmp...@googlegroups.com
Hey, Andrei, thanks for replying!

Could you please be more specific about how to record the stream? 

Thank you. 
:)


On Wednesday, May 30, 2012 2:14:46 PM UTC+3, Eugen-Andrei Gavriloaie wrote:
Hi Emil,

Can you please also record that stream in a TS file on disk? That should not be that big at you current bitrate (around 15GB). After that, we can "replay" that file through crtmpserver and identify the problem.

Thank you

On May 30, 2012, at 1:36 PM, Emil Georgiev wrote:

> Hello,
>
> I have a working UDP ffmpeg transport stream, using it with crtmp and for most of the time it is working fine. However at some point either the sound stops and the video keeps runing fine, or the sound is running and the video freezes on a single frame(when the page is refreshed the frame changes to more current one but still frozen on a single frame). It happens randomly, usually after the stream has been working for more than 24 hours. There is no problem with the ffmpeg encoder, the crtmp server also thinks everything is ok - no errors, nothing at all - it looks like it's running perfectly. Except the stream is not - there is either no sound or no video. Restarting the crtmp server fixes the problem for another day or two, until it happens again.
>
> here's the ffmpeg syntax we're using:
> ffmpeg -i udp://127.0.0.1:20000 -pass 1 -vcodec libx264 -b 500000 -s 320x180 -g 50 -threads 0 -acodec libfaac -ab 96000 -ar 48000 -ac 2 -async 1 -f mpegts udp://127.0.0.1:10000?pkt_size=1316 -v verbose
>
> You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> To post to this group, send email to c-rtmp...@googlegroups.com
> To unsubscribe from this group, send email to

C++ RTMP Server

unread,
May 30, 2012, 10:37:37 AM5/30/12
to c-rtmp...@googlegroups.com
Hi,

You should multicast it like this:

ffmpeg -i udp://127.0.0.1:20000 .... -f mpegts udp://239.0.1.2:10000?pkt_size=1316 -v verbose

Point crtmpserver to that new address:port instead of 127.0.0.1 and at the same time point another tool to the same address:port to record it. I suggest netcat. There are many tools out there, I'm sure

Best regards,
Andrei

On May 30, 2012, at 4:17 PM, Emil Georgiev wrote:

> Hey, Andrei, thanks for replying!
>
> Could you please be more specific about how to record the stream?
>
> Thank you.
> :)
>
> On Wednesday, May 30, 2012 2:14:46 PM UTC+3, Eugen-Andrei Gavriloaie wrote:
> Hi Emil,
>
> Can you please also record that stream in a TS file on disk? That should not be that big at you current bitrate (around 15GB). After that, we can "replay" that file through crtmpserver and identify the problem.
>
> Thank you
>
> On May 30, 2012, at 1:36 PM, Emil Georgiev wrote:
>
> > Hello,
> >
> > I have a working UDP ffmpeg transport stream, using it with crtmp and for most of the time it is working fine. However at some point either the sound stops and the video keeps runing fine, or the sound is running and the video freezes on a single frame(when the page is refreshed the frame changes to more current one but still frozen on a single frame). It happens randomly, usually after the stream has been working for more than 24 hours. There is no problem with the ffmpeg encoder, the crtmp server also thinks everything is ok - no errors, nothing at all - it looks like it's running perfectly. Except the stream is not - there is either no sound or no video. Restarting the crtmp server fixes the problem for another day or two, until it happens again.
> >
> > here's the ffmpeg syntax we're using:
> > ffmpeg -i udp://127.0.0.1:20000 -pass 1 -vcodec libx264 -b 500000 -s 320x180 -g 50 -threads 0 -acodec libfaac -ab 96000 -ar 48000 -ac 2 -async 1 -f mpegts udp://127.0.0.1:10000?pkt_size=1316 -v verbose
> >
> > You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> > To post to this group, send email to c-rtmp...@googlegroups.com
> > To unsubscribe from this group, send email to
> > c-rtmp-serve...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/c-rtmp-server?hl=en
>
> ------
> C++ RTMP Server
> Web: http://www.rtmpd.com
>
>
>
>
>
> You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> To post to this group, send email to c-rtmp...@googlegroups.com
> To unsubscribe from this group, send email to
> c-rtmp-serve...@googlegroups.com

Dan

unread,
May 30, 2012, 11:37:41 AM5/30/12
to c-rtmp...@googlegroups.com
Andrei:

Perhaps this is not related to this discussion - and sorry to jump in here, but I guess I never realized one could do this. That is, to just use netcat to dump out a file from a UDP stream.

...so I gave it a try with this:
 nc -ul 60032 > output.mp4

...and the file plays on my desktop (via VLC), but not thru RTMPd. Of course RTMPd can't find the atom type and metadata.  

Any ideas on a way to make this a file that RTMPd can play back (other than running it thru ffmpeg)?

Thanks !

--dan


On Wednesday, May 30, 2012 9:37:37 AM UTC-5, Eugen-Andrei Gavriloaie wrote:
Hi,

You should multicast it like this:

ffmpeg -i udp://127.0.0.1:20000 .... -f mpegts udp://239.0.1.2:10000?pkt_size=1316 -v verbose

Point crtmpserver to that new address:port instead of 127.0.0.1 and at the same time point another tool to the same address:port to record it. I suggest netcat. There are many tools out there, I'm sure

Best regards,
Andrei

On May 30, 2012, at 4:17 PM, Emil Georgiev wrote:

> Hey, Andrei, thanks for replying!
>
> Could you please be more specific about how to record the stream?
>
> Thank you.
> :)
>
> On Wednesday, May 30, 2012 2:14:46 PM UTC+3, Eugen-Andrei Gavriloaie wrote:
> Hi Emil,
>
> Can you please also record that stream in a TS file on disk? That should not be that big at you current bitrate (around 15GB). After that, we can "replay" that file through crtmpserver and identify the problem.
>
> Thank you
>
> On May 30, 2012, at 1:36 PM, Emil Georgiev wrote:
>
> > Hello,
> >
> > I have a working UDP ffmpeg transport stream, using it with crtmp and for most of the time it is working fine. However at some point either the sound stops and the video keeps runing fine, or the sound is running and the video freezes on a single frame(when the page is refreshed the frame changes to more current one but still frozen on a single frame). It happens randomly, usually after the stream has been working for more than 24 hours. There is no problem with the ffmpeg encoder, the crtmp server also thinks everything is ok - no errors, nothing at all - it looks like it's running perfectly. Except the stream is not - there is either no sound or no video. Restarting the crtmp server fixes the problem for another day or two, until it happens again.
> >
> > here's the ffmpeg syntax we're using:
> > ffmpeg -i udp://127.0.0.1:20000 -pass 1 -vcodec libx264 -b 500000 -s 320x180 -g 50 -threads 0 -acodec libfaac -ab 96000 -ar 48000 -ac 2 -async 1 -f mpegts udp://127.0.0.1:10000?pkt_size=1316 -v verbose
> >
> > You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> > To post to this group, send email to c-rtmp...@googlegroups.com
> > To unsubscribe from this group, send email to
> > For more options, visit this group at
> > http://groups.google.com/group/c-rtmp-server?hl=en
>
> ------
> C++ RTMP Server
> Web: http://www.rtmpd.com
>
>
>
>
>
> You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> To post to this group, send email to c-rtmp...@googlegroups.com
> To unsubscribe from this group, send email to

C++ RTMP Server

unread,
May 30, 2012, 11:44:23 AM5/30/12
to c-rtmp...@googlegroups.com
It will never work, because that is not an mp4. That is a ts file.

People keep using VLC for tests. That is very wrong! As explained countless times before, VLC is very powerful and will gracefully accept many many things fixing the problems behind the sceens. This defeats the purpose of the tests itself, because no errors are reported :)

Cheers,
Andrei
> > > c-rtmp-serve...@googlegroups.com
> > > For more options, visit this group at
> > > http://groups.google.com/group/c-rtmp-server?hl=en
> >
> > ------
> > C++ RTMP Server
> > Web: http://www.rtmpd.com
> >
> >
> >
> >
> >
> > You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> > To post to this group, send email to c-rtmp...@googlegroups.com
> > To unsubscribe from this group, send email to
> > c-rtmp-serve...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/c-rtmp-server?hl=en
>
> ------
> C++ RTMP Server
> Web: http://www.rtmpd.com
>
>
>
>
>
> You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> To post to this group, send email to c-rtmp...@googlegroups.com
> To unsubscribe from this group, send email to
> c-rtmp-serve...@googlegroups.com

Emil Georgiev

unread,
Jun 4, 2012, 7:27:19 AM6/4/12
to c-rtmp...@googlegroups.com
Hi, Andrei.
Here's what happens, when I start multicasting - http://pastebin.com/MhzEFeLX  
The stream starts and after a little while the crtmp server starts using a hell lot of ram(about1.5GB out of 4) and crashes with this error: 
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)

C++ RTMP Server

unread,
Jun 4, 2012, 9:09:26 AM6/4/12
to c-rtmp...@googlegroups.com
Hi,

I would need the following pieces of information:

1. what crtmpserver revision number are you using
2. aperating system name, version and architecture (e.g. CentOS 6.2 64 bit)
3. your test3.ts file

Best regards,
Andrei

Emil Georgiev

unread,
Jun 5, 2012, 3:57:02 AM6/5/12
to c-rtmp...@googlegroups.com
Hi Andrei,

1. crtmp server version - 0.768
2. It's Ubuntu 12.04 LTS x86
3. I sent you the link to the TS file privately. 

On Monday, June 4, 2012 4:09:26 PM UTC+3, Eugen-Andrei Gavriloaie wrote:
Hi,

Reply all
Reply to author
Forward
0 new messages