[theora] Indexing Ogg files for faster seeking
silviapfeiffer1 at gmail.com
Thu Sep 24 01:21:16 PDT 2009
On Thu, Sep 24, 2009 at 3:49 AM, Conrad Parker <conrad at metadecks.org> wrote:
> 2009/9/23 Chris Pearce <chris at pearce.org.nz>:
>> 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.
> another advantage of having separate indices is that it can be
> possible to rip tracks out and recalculate their keyframe index. So I
> think one index packet per media track would be useful. Perhaps you
> could just add it to the skeleton track, rather than introducing a new
> track type.
I think that is a great idea. Having it in skeleton would make a lot
of sense and doesn't require adding more random metadata tracks to Ogg
More information about the theora