[Vorbis] ov_open_callbacks takes so much time to open 210 MB OGG file

xiphmont at xiph.org xiphmont at xiph.org
Sun Dec 16 11:26:32 PST 2012


On Sun, Dec 16, 2012 at 12:12 PM, Pavel Nikitenko <pavnsw at gmail.com> wrote:
> Hi Monty,
>
> Did you have a chance to look on the observed issue with ov_open_callbacks,
> please?

Yes; the file opens properly here using the last few vorbis releases
[630ms in my test--- higher than I'd like, but meh... 52 links].  You
are using the 1.3.3 "Omnipresent" release for both encode and decode?
I also checked using your lightly modified vorbisfile_example.c just in case.

>> It looks something is wrong. Either something with ov_open_callbacks if it
>> is not optimized or the OGG is not generated as it should.

There are some problems in the generated Ogg, but like I said, they
would not cause a problem of this magnitude.  A stock build here
successfully opens, parses and decodes the file.

>> I do not
>> understand much terminology of the OGG file format. The OGG file is
>> generated by appending of new OGG file at the end of previously generated
>> OGG file. If there would be better way, I would use it for sure.

That is the correct way to put two Ogg files together.  However, the
files that are being appended in your Ogg are unfinished fragments;
the streams are not being flushed and closed out before beginning the
next.  In addition, it looks like there is some unencapsulated data
being placed between section (perhaps caused by the same bug).

Eg, the normal way to do this in encoding is to call
vorbis_analysis_wrote with a write length of zero indicating the end
of data.  At that point, the vorbis encoder will flush internal
pending data and a construct a final Ogg end-of-stream page.

Also... are these streams intended to be encoded as quadraphonic?  Two
of the channels in your file are completely unused.

Again, all of this is likely completely unrelated to the lengthy open time.

Monty


More information about the Vorbis mailing list