[vorbis-dev] timestamping / latency

Olaf Matthes
Fri, 09 Jan 2004 02:08:45 -0000

Hi there,

for a streaming application developed for a project at the Society for
Arts and Technology Montreal, Canada, we would need to know the exact
delay of our ogg/vorbis streams.

It seems there are several factors that make up the total delay I get.
Is there a way to find out how large the delay introduced by the encoder
and decoder is? Or in other words, how many unprocessed samples the
enocder / decoder has stored internally?

One idea that came up to determine latency was to add timestamping
information, but since I would have to add this data into the ogg stream
it would not go through the encoder and decoder and thus have a
different latency than audio signals.

Has anybody tried compressing SMPTE time code tracks with ogg/vorbis?
Since this is audio data it would take the same route as my audio signal
and thus have the same latency. But will a timecode signal survive the
compression? And what about channel separation?

Since we're trying to get the shortest latency possible another problem
came up: in general it seems that the larger the bitrate the lower the
latency (i.e. the decoder starts earlier to output some audio data).
However, due to the VBR encoding even high bitrate streams might have
low bitrates when there is only silence to be transmitted. Is there a
way to completely disable VBR encoding in vorbis and use CBR instead?
I've tried to flush the encoder like mad to get some ogg pages out of it
but this still doesn't raise the bitrate to a signifficant value.

Any help is very appreciated!

best,
Olaf