[gst-devel] Streaming Lip Sync

Thomas Vander Stichele thomas at apestaart.org
Thu Aug 11 01:28:24 CEST 2005


Hi,


> An update on this situation - the cause of the timestamps going out of sync in 
> MPlayer was the streaming server hitting the limits of its processing power. 
> I've now reduced the audio sampling rate and replaced deinterlace with 
> ffdeinterlace and the problem has gone away, so that solves that one (which 
> also explains why it happened when the video started moving - moving video 
> being harder to encode!) Although it does highlight that if GStreamer hits 
> the limit of the processor then it will break the stream until it's next 
> restarted.

Oh, damn, yeah that's the most obvious reason, I wonder why I forgot
about that.  Theora can easily start taking more than twice as much CPU
when encoding moving images over relatively still.  So if you're
normally running at 70%, and then it tries to pull 140% but tops out at
100% it builds up a big backlog of to-be-encoded frames very quickly,
and it takes quite a long time to process them again once the video
settles down again.  In practice we recommend that if you're doing
Flumotion+Theora, you make sure that normal-state stays below 50%.

> However, that hasn't got me any further with lip sync, since I'm now having 
> roughly the same problem as I was when using V4l2. The video leads the audio 
> by just under a second. I tried leaving the stream running for a couple of 
> hours to see if it drifted out more, but when I came back and checked it, it 
> was *in* sync, which just confused me even more.

There is a hacked-up component you can try for flumotion, but let's take
that to the flumotion list.  There are some design things that need to
be solved to get two separate sources (in this case, a tv card and a
soundcard) to sync properly which we're going to address in the
future ...

> If anyone has any flashes of inspriation as to why this might be, as ever I'd 
> love to hear them, but I'm swaying more and more towards the whole DV idea.

 ... but for a short-term solution, the DV option is definately the most
straightforward way to have good sync.

Thomas


Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
When you're on the outside baby and you can't get in
I will show you
you're so much better than you know
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/







More information about the gstreamer-devel mailing list