[theora] Indexing Ogg files for faster seeking
chris at pearce.org.nz
Tue Sep 22 17:35:54 PDT 2009
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.
More information about the theora