[ogg-dev] frame length

Ralph Giles giles at xiph.org
Tue Mar 31 18:37:52 PDT 2009


On Mon, Mar 2, 2009 at 2:03 PM, uans <radmin at eathlink.net> wrote:

> I am new to this forum and also to programming in general. I have desire
> to try to use Ogg as my default streaming encoder.  I have a quick
> question. How does someone determine a frame length in ogg? For example
> if I was to use an mp3 frame, I would try to do something like this:
> frameSz = 144 * BitRate / (SampleRate + Padding). Also is there a
> tutorial on how to correctly use the libraries. The example are a little
> vague.

Vorbis uses a variable frame length, and all the compressed packets
are variable size. As such it requires external framing from the
container to find the packet boundaries. ogg_packet::bytes is the the
only way to tell where the boundaries are.

HTH,
 -r


More information about the ogg-dev mailing list