[Red5] Red5: audio and video out of sync resolved!

Oleg Kolokolov scanwork1 at gmail.com
Sat Nov 24 04:50:20 PST 2007


Hello Red5 community,

It is more like a suggestion for the Red5 developers.
We noticed while working with Red5 on our project (www.blipback.com) that
when recording on a slow connection you may get a recorded FLV where audio
and video are out sync badly.

When such FLV is played back (no matter streamed from some remote location
or downloaded and played locally)
it looks like audio goes normally but video is very slow and out of sync and
sometimes can even stuck for quite a time.

We checked and figured out that in the incoming stream in
such cases mostly audio packets arrive in the beginning
and then video packets arrive with a huge delay.
And the problem (as we understand it) is that Red5 just saves this
incoming stream in this same order.

So when Flash plays back such FLV it gets the packets in the same order.
So what it has - mostly audio packets in the beginning and plays back
them normally but has no video packets to
display and waits until they arrive so we see a frozen first frame or the
last that arrived.

This can be resolved on the client side (Flash
player made so that it can resolve this) but for this the whole stream must
be downloaded first. We think in this case Flash player does this reordering
of the packets in memory and then plays it back. But this reordering takes
time. That's bad because you must first wait until the stream is
downloaded and then until it is processed in Flash
player (which looks like hanging for a while).

What we made in blipBack.com is modification of Red5 to reorder incoming
packets in real time and save FLV already fully prepared to playback.
May be it makes sense to add this modification to next rev of Red5?

I wonder does Adobe Media Server do this? Seems so ...

Regards,
Oleg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20071124/d70bd173/attachment.html 


More information about the Red5 mailing list