[ogg-dev] Seeking to granules in discontinuous streams

Conrad Parker conrad at metadecks.org
Thu Feb 7 01:07:40 PST 2008

On 06/02/2008, ogg.k.ogg.k at googlemail.com <ogg.k.ogg.k at googlemail.com> wrote:
> Hi,
> I have a question about seeking. In fact, it's more or less a kind
> of rambling and thinking aloud, circling around a question.


No particular answers, but I can at least point out that the way
things were designed for CMML was to work with the existing Ogg
seeking algorithm. The idea is that a generic seeking routine can work
on any Ogg file, as long as it knows the granulepos->time mapping for
the logical bitstreams in the file. That's why all the
timestamp-related info is crammed into granulepos rather than being
placed in packet data, where it is no longer visible in the

Assumptions about seeking in Ogg:

which quotes from a mail from Monty in 2002 explaining the seek algorithm.

Ralph's recent talk at LCA, "Seeking is hard: Ogg design internals":

Hope that clarifies things a little bit. The answer may simply be that
what you want to do isn't possible within the existing Ogg container +
seek algorithm.


More information about the ogg-dev mailing list