[ogg-dev] frame length

Ralph Giles
2009-04-01T01:37:52Z

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