[Vorbis] Use of ogg vorbis for real time audio streaming?

Maik Merten maikmerten
Mon Jul 5 08:33:53 PDT 2004


d00ma3 at tomsmusicpage.org.uk wrote:
> So. My question is: is ogg vorbis (as a whole, bitstream and codec) appropriate
> for such an application? I have studied the documentation, and it seems to me
> that there are several barriers (for example, ogg pages are recommened to be
> 4-8kB, this is 0.5 - 1 sec worth of audio for a 64kbps stream). Could I work
> around these limitations by aggressively setting certain parameters in the
> code, or is this a no-brainer from the outset?

Disclaimer: I?m not a developer.

Latency will be critical. IIRC current Vorbis encodes audio in blocks
sized up to 4096 samples (specification allows block sizes up to 8192 -
in integer powers of two). At 44.1 kHz 4096 samples mean that roughly 92
ms of audio has to be gathered before encoding of the block can start -
not counting overlapping of blocks. Encoding will take some time.
Transport over the internet will introduce additional latency. As you
can see it`s very easy to get an overall latency significantly higher
than 100 ms.

Vorbis minimum block size is 64, so it`s possible to minimize
encoding-latency to usable dimensions. However, very small block sizes
will severly reduce coding efficency and you?ll have to find a workable
tradeoff.

Ogg pages can be smaller than 4-8 kb - increasing overall overhead (but
I don`t think this will be that critical).


More information about the Vorbis mailing list