[theora-dev] A/V sync in Theora

Dan Miller dan at on2.com
Thu Jun 12 16:50:27 PDT 2003


as you say, Mplayer and other AVI apps slightly adjust framerate *after* the capture is complete.  If this is done correctly, it will work well in most cases.  The exception is if you are capturing off an old analog videotape, where tape stretch can easily make the sync drift up and down.  DVD or broadcast TV capture, or mini-DV type stuff will work fine (because the playback machine has a stable digital clock).
 
Theora will work just as well as AVI.  There are no arbitrary timestamps in AVI or MPEG; there are frame numbers and a global framerate (MPEG doesn't even have the option of a fractional framerate other than drop frame = 23.997).

        -----Original Message----- 
        From: David Kuehling [mailto:dvdkhlng at gmx.de] 
        Sent: Thu 6/12/2003 3:29 PM 
        To: theora-dev at xiph.org 
        Cc: theora-dev at xiph.org 
        Subject: Re: [theora-dev] A/V sync in Theora
        
        

	>>>>> "Ralph" == Ralph Giles <giles at xiph.org> writes:
        
	> I'm surprised you describe this as a problem with DVD though. I didn't
	> think players were smart enough to adjust playback to match an
	> external sync.
        
        What do you mean with "external sync"? 
        
        The way I understand mplayer, mplayer continously calculates the A/V
        delay using either heuristics or any kind of timing information from the
        stream.  It then slighly adjusts playback speed to keep the delay down.
        
        I'm not sure about what Dan said about MPEG2.  Exact time stamps might
        not be required to get A/V sync right.  I'm not concerned about absolut
        correctness in the time domain, just relative A/V delay.  Maybe audio
        fragments in MPEG2 can somehow be related to the frames they belong to,
        either by position in the bitstream or any kind of additional
        information?
        
        Imagine how many people would be annoyed, if the first beta of Theora
        with the first simple transcoders produced desynced output.  How long
        will it take until someone implements a transcoder which is smart enough
        to minimize A/V sync by scanning the source material and adjusting
        numerator/denumerator correctly? 
        
        That technology is also IMO too restricted.  How am I supposed to record
        television flawlessly with Theora?  My sound card usually reports a
        sample rate of 44101 when set to 44100.  But mencoder will still assume
        that the sample rate is 44100, introducing an error that will amount to
        163ms after 2 hours.  I start to notice that something is wrong after
        about 50ms.  I have a Sound Blaster PCI 128 which I would consider quite
        high quality.  What about even cheaper sound cards?  Remember that this
        is the error reported by the sound card, due to limits in the timing
        chip, not taking into account the actual inaccuracy of the timer itself.
        Note also that Linux won't report fractual sample rates.  So the average
        error after 2 hours of recording with 22050 Hz sample rate would as well
        be 163ms, even if the soundcard's timer is perfect.
        
        You cannot tell people that they can use Theora for one thing but not
        another.  Sorry for not having more constructive comments at the moment.
        You won't be willing to throw away the flawed Ogg concept and stick to
        Matroska instead? ;-)
        
        David
        --
        GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg
        Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40
        
        --- >8 ----
        List archives:  http://www.xiph.org/archives/
        Ogg project homepage: http://www.xiph.org/ogg/
        To unsubscribe from this list, send a message to 'theora-dev-request at xiph.org'
        containing only the word 'unsubscribe' in the body.  No subject is needed.
        Unsubscribe messages sent to the list will be ignored/filtered.
        

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 6638 bytes
Desc: winmail.dat
Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20030612/754922d7/winmail.bin


More information about the Theora-dev mailing list