[vorbis-dev] Re: [vorbis] packetizing an ogg stream

Michael Smith msmith at labyrinth.net.au
Thu Aug 16 19:11:52 PDT 2001



At 05:21 PM 8/16/01 +0200, you wrote:
>On 2001.08.16 16:56:03 +0200 rillian wrote:
>> On Wednesday, August 15, 2001, at 04:31 , Jeroen Vreeken wrote:
>> 
>> > I am looking for some pointers on how to packetize an ogg stream.
>> > My idea is to use udp packets for transport, so I would need a way that
>> > would minimalize the impact of lost packets.

There's one easy way to do this: split at the ogg page level. Each ogg
page contains a checksum, etc. - so if it gets corrupted, it'll be 
detected. If the page is dropped, it'll be detected and the decoder will
work fine. Also, you'll be able to use players unmodified.

However, each page is about 4 kB, which is probably too high. vorbis packets
are therefore the ideal thing to send - they're typically (other than the
header packets - those MUST get through, or nothing can be decoded) anywhere
from 3 to a few hundred bytes.

You do, however, need some extra information along with the vorbis packets,
since you're dropping what ogg provides. You'll need sequence numbers of
some sort, probably start/end of stream indicators, etc. Nothing too hard.
All of this is directly or indirectly provided by RTP, which is why using
the draft rtp spec was suggested. RTP doesn't guarantee delivery, but vorbis
can deal with that - the packet which is dropped will just (obviously) cause
a short dropout in the audio.

Michael

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list