Problem when configuring vorbisenc to use CBR

Tiago Katcipis katcipis at
Mon Feb 17 13:36:33 PST 2014

On Mon, Feb 17, 2014 at 4:50 PM, Sebastian Dröge
<sebastian at>wrote:

> On Mo, 2014-02-17 at 10:28 -0300, Tiago Katcipis wrote:
> > > [...]
> > >
> > > It seems that the bitrate cant be fixed, but i read that vorbis does
> > > support CBR, am i missing something ?
> Yes I don't think you can use vorbis for your use case. You won't get a
> 100% accurate, constant bitrate that you can use to pre-calculate the
> resulting stream size. Why do you need that btw?

I'm building a audio streaming server that transcodes audio from CODECs not
supported by the browser (the HTML5 audio tag) to a CODEC that is (in this
case, OGG/Vorbis). I'm also doing some watermarking on the audio,
extracting application specific metadata, etc.

I don't want to process the entire file to then provide it to the user, my
hope was to be able to provide the file as it is being transcoded, so if
the user requests a big file it does not have to wait a lot of time to
start listening to the audio.

I implemented a simple server able to handle the Range HTTP requests made
by the browser and everything is fine, but today I'm limited to processing
all the file before starting streaming. If i could predict the file size i
could merge the current server with audio being provided "on the fly".

> Also even if you tell Vorbis to generate a CBR stream, you still have to
> account for the overhead that the Ogg container is going to add.

Yeah i made more tests without oggmux and the error rate is considerably
slower, but it is still not 100% accurate, and i don't know if the
information inserted by oggmux is not variable (it seems odd to me that it
is variable...but I'm not sure).

Thanks for the help Sebastian, someone confirming that it is really not
possible helps a lot (i wasn't sure if i was doing something wrong).

> --
> Sebastian Dröge, Centricular Ltd -
> Expertise, Straight from the Source
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list