[theora] Indexing Ogg files for faster seeking

Silvia Pfeiffer silviapfeiffer1 at gmail.com
Sun Oct 11 01:50:49 PDT 2009


On Wed, Sep 23, 2009 at 11:35 AM, Chris Pearce <chris at pearce.org.nz> wrote:
> On 9/22/2009 11:10 PM, j at v2v.cc wrote:
>> would this also work for ogg streams with more than one video, not that
>> this is common, but possible in theory. would in those cases an index
>> not need to reference the track it is indexing?
>
> Currently my index/indexer merges keyframe data from all streams. So if
> you had multiple video streams, and you wanted to seek to time t, the
> index would tell you the offset of the last page which lies before
> *every* streams' last keyframe before t.
>
> If you're only playing one of the video streams, then you may be seeking
> back more than you need to.
>
> We discussed this on #theora yesterday, and most people seemed to favour
> indexing stream individually, or having mulitple indexes which denote
> what stream(s) they index.
>
> A sensible use case is for subtitles. A subtitle track could be embedded
> with its pages spread much further apart than the keyframes for a video
> track. With the streams indexed separately, you could request the pages
> with the subtitles with a separate request/read if they're too far away
> from the A/V pages.

Just while I'm following up on the Ogg Index threads ... Ogg Kate
actually has a mechanism for repeating subtitle packets in Ogg when
they are too far apart. This would stop large back seek operations
needing to take place just for subtitles.

Cheers,
Silvia.


More information about the theora mailing list