[vorbis] Slow stream opening (Was Re: Average Bitrate Calculation)
xiphmont at xiph.org
Wed Oct 3 08:28:25 PDT 2001
On Wed, Oct 03, 2001 at 08:57:58AM -0000, Alen Ladavac wrote:
> > > It is very
> > > inefficient to be jumping around thousands of files to obtain the length
> > > (duration) of a playlist when the length of a song could simply be
> > > at the beginning of the file after encoding.
> > On average, Ogg seeks three-four times at open.
> While we're at it... On my testcase, it proved that opening an ogg stream
> using vorbisfile takes significantly (and I mean _really_ noticeably
> significantly) longer than opening an mp3 stream using amp11lib. It turns
> out that the problem is in the stream's seekability. If I don't provide the
> seeking callback, the thing works like a charm.
Vorbisfile will not try to parse stream structure in a non-seekable
stream. Doing things this way is perfectly valid, and a good trick.
You just won't know total stream length or average bitrate.
Everything will still work.
> I guess it is impossible to fix that for a VBR stream, right?
> (It's not like I need seeking anyway, but maybe someone will.)
All streams are VBR, even when they aren't :-) Ogg/Vorbis is never
CBR, even if an encoder mostly fakes it. Vorbisfile is slower at a
full open than a non-seekable open, but it shouldn't be absurd...
Could you send me the file presenting all the trouble?
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis