[ogg-dev] Does ogg segments include more than one Vorbis frame
Johnslion Woo
johnslion at gmail.com
Mon Apr 8 19:34:47 PDT 2013
Hi, Ralph:
That's really helpful, thank you very much!
Best Regards,
Johnslion
On Tue, Apr 9, 2013 at 12:18 AM, Ralph Giles <giles at thaumas.net> wrote:
> On 13-04-08 4:34 AM, Johnslion Woo wrote:
>
> > Does anybody know is it allowed for the OGG segment including more
> > than one Vorbis frame? Or should I consider about that?
>
> Vorbis frames (packets) are split into ogg segments, not the other way
> around. If the packet is < 255 bytes, it just goes in a single segment
> by itself.
>
> So if you have a sequence of packets with lengths of 24, 156, 720 and
> 203 bytes, those would be divided and packed into segments of length:
>
> 24, 156, 255,255,210, 203
>
> You know where the boundaries between the packets are because they're
> where the segment length values in the lacing table are less than 255.
>
> The point of segmentation is it provides a sort of unary encoding of the
> packet boundaries. You can pack up to 255 segments into an ogg page, and
> use the lacing table to find the boundaries. This design gives a good
> tradeoff between header overhead and read complexity.
>
> Does that answer your question?
>
> -r
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/ogg-dev/attachments/20130409/706bc1b0/attachment.htm
More information about the ogg-dev
mailing list