[theora] Indexing Ogg files for faster seeking

Chris Pearce chris at pearce.org.nz
Sun Nov 8 14:06:01 PST 2009

On 11/9/2009 10:37 AM, Gregory Maxwell wrote:
> On Sun, Nov 8, 2009 at 4:29 PM, Chris Pearce<chris at pearce.org.nz>  wrote:
>> Yeah, for some reason that's beyond me at the moment, we can't get the
>> duration of that file. I wonder if we could get timing information when
>> running in --two-pass mode and get the duration that way?
> If it goes back to write the index, why can't it just measure the duration?
> It very very much shouldn't depend on the input container duration
> being accurate. This will fail.
Yes, I worry about this failing. I'm just using the duration to decide 
how much space to allocate at the start of the file for the index.

> If you're just using it decide how big to make, then it should be okay
> to make a reasonable guess if you can't measure it. No?
What information can I reliably use to make a reasonable guess? 
Particularly in the non --two-pass case? In that test.mpg file that 
Jason provided, we don't appear to even get a bitrate for the incoming 
video stream.

Chris P.

More information about the theora mailing list