[vorbis-dev] UDP streaming vorbis

Beni Cherniavsky cben at users.sf.net
Wed Sep 10 10:19:00 PDT 2003



eross+vorbis-dev at disc.ucn.cl wrote on 2003-09-10:

> Hello..
>
> I've searching the mailing lists archives for udp streaming, but i
> only found some references to using rtp, but it doesnt answer all my
> questions..,
>
> I'm trying to implement a vorbis client/server for doing streaming
> over udp. Currently, using the examples in the vorbis source code I
> managed to make it work. (BTW, im using multicast, and it works
> fine).

Are you sure you want to use UDP?  It'll sort-of-work for a LAN (I
guess that's how you tested it) but it will break horribly in the
large.  In particular, consider that the order of packets can change.
I'm not sure what guarantees RTP gives but UDP sounds like really
saking for trouble.

> The problem is that the clients must connect from the begining of
> the stream, or they will not recieve the first packets and complain
> about the stream not being ogg/vorbis.
>
Vorbis requires the first packets, not only to nkow it's Vorbis but
also because they contain a lot of info necessary for decoding the
rest.  All streaming schemes include some way to recieve the headers
when you connect and the data from the point you connected.

> In some post, someone told that he was re-transmitting these packets every
> N seconds.
>
> Is there some alternative to this ? I'd like to make a client that can
> connect in any time to the server.
>
If you use multicast, all clients get the same bits (or corrupted
subsets of them).  So you can't send the headers with UDP, excpet for
the scheme of re-sending every X seconds.  It has an inconveneint
joining latency (unless X is very small but then you waste
considerable bandwidth) but for really heavy multicast it's the most
scalable way...

If you don't want it, you need to have a separate (ideally - TCP)
connection to the server for fetching the last headers.  Then you get
the data over UDP from the point when you joined.  I believe it's the
way Vorbis-over-RTP works, read its spec for more info.

> Thanks in advance for any idea.
>


-- 
Beni Cherniavsky <cben at users.sf.net>
--- >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