[theora] Indexing Ogg files for faster seeking

Michael Dale mdale at wikimedia.org
Sun Jan 24 17:23:29 PST 2010


Chris Pearce wrote:
> I think we should remove the checksums, and simply delta and 
> variable-byte encode the offsets and timestamps. We can consider an 
> index invalid if:
>
>   1. The segment/link length doesn't match the length stored in the
>      fishead packet, or
>   2. After a seek to a keypoint's offset, we don't land on a page
>      boundary, or
>   3. The first keyframe we decode after seeking to a keypoint doesn't
>      have the same presentation time as stored in the index.
>
> Does that sound reasonable?

I like the idea of drooping the checksums. Should make the index small 
and keep implementation simple by avoiding redundancy checks. ie If 
somehow your checksum matched and the presentation time did not then you 
would have to fallback to bisection search anyway. If your checksum did 
not match but the presentation time was what you wanted would you still 
fallback to bisection search to get back to where you started?

Either way the index can be detected as invalid but its not useful to 
the client that is trying to do the seek.

--michael


More information about the theora mailing list