[vorbis] Slow stream opening (Was Re: Average Bitrate Calculation)
volsung at asu.edu
volsung at asu.edu
Wed Oct 3 09:13:09 PDT 2001
On Wed, 3 Oct 2001, Jay Sprenkle wrote:
> > 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.
> > 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.)
> Any editing is MUCH nicer if you can seek without having to decompress the
> stream all along the way. On variable rate streams where you can't
> calculate a position it would be nice if precalculated positions in the
> stream were available. When editing you could seek to the closest
> precalculated position then decode a much smaller amount of data to seek
> to the exact position you want.
Ogg packets actually have a field called granule_pos which the encoder fills
with a codec specific index _allowing_ you to seek through a stream without
decoding. The vorbis codec sets granule_pos to the sample number (if I
remember correctly). So the problem you describe has already been solved.
The opening delay is described above is due to seeking through the file, not
decoding anything at the vorbis level.
--- >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