[theora] Indexing Ogg files for faster seeking

Silvia Pfeiffer silviapfeiffer1 at gmail.com
Tue Oct 20 18:58:18 PDT 2009

On Wed, Oct 21, 2009 at 12:38 PM, Chris Pearce <chris at pearce.org.nz> wrote:
> On 21/10/09 13:52, Silvia Pfeiffer wrote:
>> I downloaded the specially compiled Minefield and played with the files a bit.
> Make sure you run each minefield instance with the --no-remote command
> line option, else it might just pop open a new window of an already
> running instance of Firefox, rather than starting a new instance of the
> program.

I'm on the Mac and I think because I have the two apps running from
different directories that's not the case. I definitely have two apps
running and not just 2 windows.

> The index-capable builds dump a whole lot of output to stdout, so if
> you're seeing that, you're running the index-capable build.

hmm - let me run it from a command-line then. :-)

>> I ran http://pearce.org.nz/video/arctic_giant.ogg in current Minefiled
>> (3.7a1pre) and in your special Minefield.
>> Interestingly, I found current Minefield to take longer in loading the
>> file initially, but then being faster in offset seeking.
>> Is this because current Minefiled buffers the whole file first and
>> then seeking is local and fast, while your Minefield does seeking over
>> the network still?
> The buffering behaviour is not changed by the index-seek code. The
> buffered areas show up as a lighter shade of gray in the progress bar,
> and seeking inside buffered video should be almost instantaneous,
> regardless of whether you're seeking in indexed or non-indexed files.
>> I found the same with the comparison in
>> http://pearce.org.nz/video/indexed-seek-demo.html - seeking on the
>> file with the index is slower. I am a bit puzzled. Would you know
>> what's happening?
> That's really weird. Are you running the index-capable build with
> --no-remote? You should see debug output on stdout containing
> "get_seek_point" etc?

Yes, I am seeing the get_seek_point calls as I run it from the
commandline. Now, it's also faster. Strange!

> You also could be suffering from random network latency spikes and
> variances in network caches in between you and my server. I have a
> custom rate limited webserver which I run locally to test performance,
> to eliminate these variables. The index-capable builds seek about 60-70%
> faster in indexed files served from my local server.

That was my experience, too, when it worked. But just sometimes, it
wasn't faster. That would explain it all.

I am very happy with this! I like the way in which you have included
it into skeleton. If you're also happy with it, I would suggest
getting it into liboggz and ffmpeg2theora and helping fix those
players with patches - but who am I to talk and not code. :-)

Great stuff!!


More information about the theora mailing list