[theora] Mapping from granulepos to absolute time

Pushkar Pradhan pradhan.pushkar at gmail.com
Sun Dec 13 12:17:44 PST 2009

I am trying to figure out how theora timestamps map to absolute time values.
This information would be needed to seek by 1 sec, 5 secs etc.
I understand the granulepos is interpreted as Absolute number of key frames
so far | number of frames since last key frame. E.g. 1000|1, 1000|2, ...
How does this map to absolute time in millisecs since the start, I can think
of the following formula:
Total number of frames = Total number of keyframes * Key frame interval +
prediction frames
Total number of millisecs = (Total number of frames / Frame rate) * 1000

Is this correct?
If so, where does the key frame interval come from, I don't think it is in
the Identification or the setup headers.
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/theora/attachments/20091213/316604bc/attachment.htm 

More information about the theora mailing list