2

I am new to use libogg and libspeex. After digging into ogg RFC and libogg doc , the relation of ogg page and packet make me confused.

What I understand is :
an Ogg File for speex = OggPage * (* means multi items)
OggPage = HEADER + OggSegment *
OggPacket = OggSegment *

Each OggPacket has no maximum size, so one OggPacket can place into more than one OggPage. But when I use libogg, ogg_stream_packetin can only fill one page at most. So if the OggPacket is large than two OggPages, how does ogg_stream_packetin work?

Yanjun
  • 95
  • 5
  • You can safely ignore the segment bits... libogg handles that for you. Just remember that pages are the fundamental storage unit of the Ogg format (and as such have a fixed maximum size) while packets are the fundamental streaming storage unit for the codec (and have effectively unlimited size). They won't always line up nicely (packets can span across two or more pages). – ioctlLR Jul 08 '16 at 20:42

0 Answers0