[MPlayer-users] Re: [MEncoder] Synchonization lost when using Vorbis in a OGM

Jonathan Rogers jonner at teegra.net
Thu Jun 19 00:37:47 CEST 2003


Moritz Bunkus wrote:
> Not true for OGM, sadly. The FPS is stored in the header, and the
> granulepos is - surprise, surprise - the frame number, and not the
> timestamp of the video frame. This can be seen in ogminfo's output:
> 
> (ogminfo.c) v1:    7155 bytes granulepos:        220 pno:        222
> start:       9134.12ms  end:       9175.83ms sync_ok  hdrlen: 0 
> 
> If the AVI contains a dropped frame then ogmmerge tries to mimic OggDS'
> behaviour and sets the previous packet's length to the appropriate
> number of frames. I don't have an example at the moment, but you can
> exec 'ogminfo -v -v myfile.ogm | grep v1: | grep duration' to see these
> packets.

Thanks for your great tools and insight, Moritz. I tried looking for the 
"duration" packets and the movies with good sync seem to have far fewer 
of them than the one with bad sync. Do you have any idea why mplayer has 
trouble keeping sync or how to work around it? When the sync is off, 
mplayer knows that it is, but has trouble correcting it. Mplayer is able 
to keep sync when playing the encoded AVI and vorbis audio from the OGG 
using the "-audiofile" trick, so it definitely seems that the problem 
relates to video encoded in OGG. As I said before, Xine plays it with 
good sync.

I've also tried making a Matroska movie with mkvmerge from the original 
AVI and OGG. The resulting MKV has similar sync problems when played 
with mplayer, but it reports good sync the whole time. Perhaps mkvmerge 
isn't doing anything to deal with the dropped frames?

Jonathan Rogers



More information about the MPlayer-users mailing list