[gst-devel] Streaming Lip Sync

Thomas Vander Stichele thomas at apestaart.org
Wed Aug 10 01:48:27 CEST 2005


> The latest results are that I've noticed the timestamps of the audio and video 
> that MPlayer displays on the console while it's playing drift out whilst 
> MPlayer is running. This suggests to me that GStreamer thinks the streams are 
> in sync, wheras MPayer is doing the counting and finding that it's getting 
> way more audio than video, and trying to sort out the mess.

Actually, that could indicate a different bug.  The ogg muxer had some
issues in older gst-plugins prereleases and was doing the muxing in the
wrong order.  MPlayer gets confused by this really easily, especially on
live streams.  What version of gst-plugins are you running ? You
definately should be running the latest - 0.8.10, and if you're not,
it's going to mux wrong.

Some other things you should try:
- wget the file over http, and play that file locally.  That will give
mplayer a lot more stuff to base its calculations on, and allows you to
rule out any network issues
- run oggz-validate on this file; this tool is part of liboggz.  It will
allow you to verify that the files are muxed properly.

> ~15:00	Mplayer gives up and starts ignoring the audio! Message: "Too many 
> video packets in the buffer: (4096 in 3939504 bytes)."

This is definately a good indication that the muxing is going wrong.
Let me know first what version of gst-plugins you were running.

> The other interesting thing to note is that the timestamps stay in sync for 
> quite a while after flumotion is started, but then move apart much faster 
> when MPlayer is restarted. I can't think why this might be - perhaps somenody 
> else can.

I'm not entirely sure, but my guess is that that's because timing info
for ogg is only available at the end of decoding a full ogg page.  So at
the start MPlayer is making a guess, and then later corrects.  I've seen
that happen quite a few times.

> It's a real shame I haven't managed to get this working as we'd be, as far as 
> I know, the first TV station broadcasting worldwide in Theora, which would be 
> great for YSTV, GStreamer and Xiph. However this is driving me spare, and we 
> need to have this running soon, so this is really my last appeal for help.

Well, there definately are some other options still that we could help
you with.  By far the easiest solution, if you're worried about keeping
sync, is to just not use v4l.  You can buy a simple Pinnacle DV
converter box which will take in your analog feed, and output DV.  Since
the DV format already has muxed audio and video, you will stay in sync.
We should probably take the rest of this discussion either privately or
on flumotion-devel though.


Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
I took your advice
Bought the microscope
I can't find anything
I wanna see up close
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/

More information about the gstreamer-devel mailing list