[theora-dev] Keyframe seeking in Ogg and spec

Tabuleiro beta at tabuleiro.com
Mon Sep 16 15:52:45 PDT 2002

> Apologies, short nerves. In other places, I've had to explain this
I understand. The fact that English is not my native language can also add
some noise to any discussion...

> In the simpler scheme, yes, it's an absolute frame number, and a
> timestamp could be substituted.  We're currently going for option 3 to
> simplify finding keyframes.  It's still straight arithmetic, though.

OK. I guess for VP3 you will choose between frame numbers/frame rate at the
header, or timestamps. Either way works for me. So you will use 32 bits of
the granulepos field for this, and the remaining 32 bits for state
encoding/keyframe identification, right?
I guess this makes my other concern moot (trying to add an index table of
keyframes), since it will be trivial to seek to the next and prev keyframe
from any given time, by simply parsing the granulepos.  Since VP3 does not
have B frames you could simply store the number of frames since the last
keyframe (if using frame numbers), or the time delta since the last keyframe
(current timestamp - delta will give you the timestamp to seek to the
previous keyframe.) Clean and easy.

> > I did not understand this, could you please clarify? If you are
> > something over a modem connection for example, how would you tell the
> > duration of the video at start?
> Do you need to know the total time?  If you do, you could ask
> out-of-band.  Most people listening to a true stream don't care.

I find it useful for some applications, and is part of the API of other
streaming solutions.  For example if you know that a video clip has 6
minutes you could possibly ask the player to stream to position
This duration field could be a simple 32bit value in the header, following
the dimensions of the video. But I guess it is something that can be treated
by another layer (a broadcaster server that parses the Ogg file and exposes
it to remote players), since there are other problems involved when you seek
in the network, and maybe this is outside the scope of what Ogg provides.


--- >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