[theora-dev] a new proposal
Matt Zimmerman
mdz at debian.org
Wed Feb 25 23:14:32 PST 2004
On Thu, Feb 26, 2004 at 04:24:59PM +1100, Michael Smith wrote:
> On Thursday 26 February 2004 16:14, Matt Zimmerman wrote:
> > On Wed, Feb 25, 2004 at 11:57:04PM -0500, Monty wrote:
> > > ...sigh. And the confusion spreads like wildfire. We already have
> > > perfect sync, Matt.
> >
> > Do you mind explaining briefly? As of November, it was my understanding
> > that Ogg could only hold media streams with One True Rate which held
> > perfectly forever---no dropped frames, no DSP drift, etc. Did things
> > change since then, or does the state of the art still deal only with
> > absolutely perfect streams?
> >
>
> Ogg stamps each page (not quite per-packet, but per-packet stamps can be
> calculated) with a "granulepos". This has a unique mapping to a time value
> (which is codec dependent, but that doesn't really matter).
But it doesn't have an accurate mapping to a time value, and that leads to
the heart of the issue. granulepos maps to a something like a sample number
or a frame number, right?
> So, given a known codec (e.g. "vorbis, at 44.1kHz"), and any page (pages
> are typically no more than 4 kB - so these granulepos timestamps come
> along pretty often)), you can trivially calculate an exact time offset for
> that data.
>
> This has always been part of the ogg specification - it hasn't changed.
> Ogg has never had any sync problems.
What if, instead of this hypothetical vorbis stream at 44.1kHz, I am
recording from a PC sound card, so I have one which floats between, say
44000 and 44200. Or I'm recording video, and every once in a while,
something happens and I drop a frame. Such is life. Since the rate isn't
constant for the entire stream, granulepos doesn't let you calculate an
exact time offset. It'll be off by a small percentage.
This probably doesn't present a significant problem for most Vorbis streams,
which tend to be a few minutes long, and nobody really cares about the exact
time offset anyway because they aren't synched to anything. But in a video
stream, after, say, an hour or two, that drift adds up to a time
differential which is significant for A/V synchronization.
> Much of the discussion is happening on IRC (irc.freenode.net, #theora),
> and bits of the logs are in cvs to help explain things. If you want full
> logs, ask - someone should be able to send them to you.
I used to
--
- mdz
--- >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.
More information about the Theora-dev
mailing list