Re: Time in video file

Gregory Maxwell <[email protected]> Tue, 15 Mar 2011 15:05:50 -0400
Newsgroups gmane.comp.multimedia.ogg.theora.devel
Message-ID <[email protected]>
On Tue, Mar 15, 2011 at 1:54 PM, Richard Watts <[email protected]> wrote:
>  Pacing is generally done by a more accurate clock delivered around the side
> (e.g. via Ogg's granulepos - which is a completely abstract value that can mean
> anything you like, but in practice tends to be a timestamp in ms).

Richard, I'm sorry to be rude. But what planet are you writing to us from?

The granpos in ogg isn't a "completely abstract value that can mean
anything you like", it's a codec specific value which must map to
times and be monotonically increasing.  The actual mapping is codec
specific, and in theora the granpos maps to a frame counter, not a
timestamp in ms. (Except insofar as you can convert a counter at fixed
frame rate into times).

This is all well defined in the Theora spec.

In order to generate a VFR theora file at a minimum you will need to
stuff the stream with zero byte packets for the skipped frames (of
course, libtheora will do this for you if you just keep feeding
duplicates. If you do this yourself you'll break the granpos
accounting and rate control).  Otherwise frames will be displayed at
the wrong time, especially in any case where multiple frames are
contained on the same ogg page.
_______________________________________________
theora-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/theora-dev