[vorbis] Vorbis over RTP

Roland Parviainen rolle at cdt.luth.se
Mon Nov 20 12:17:47 PST 2000



Marshall Eubanks wrote:
> 
> >
> > I send four different types of packets: data, info, comment and
> > codebook. I dont' care about the size of data packets since they are
> > usually less than 500 bytes, but that's just because I'm lazy :).
> > The other packets are fragmented to about 1400 bytes (1400 + headers)
> > if they are larger than that. The codebook is usually 3 or 4 fragments.
> >
> 
> So the codebook is sent out once per second, as 3 or 4 fragments ? If there is
> 10% packet, then the chances of losing the codebook at ~ 30-40% - i.e., quite good.
> 

Sure, but the probability that you get it in 5 seconds are quite high :)
And even if I didn't fragment it the same problem would probably be
worse, since it would be fragmented in the IP layer and the loss of one
IP fragment means that the whole UDP packet is dropped. If I apply
forward error correction to the fragments I can easily get the 10%
packet loss down to < 1%. (I just tested with 10% packet loss, I
actually takes about 5s until the music starts playing, so I made a good
guess :)

This is just my first implementation, more experimentation is needed...
For instance it is also possible to send the codebook packets on a
separate multicast group, so clients don't have to get all the extra
data when they know the codebook.

> >
> > The payload header also contains a 8 bit id that changes when client
> > have to reset the decoder with a new codebook, so there is no problem
> > with sending e.g. a 128 kbit/s file followed by a 160 kbit/s file,
> > except
> > for a small delay.
> >
> 
> So once you get it, you don't need it again, so if you loose it, you
> can just use the last one ?
>

The receiver er waits until it have the complete codebook and then
initializes the decoder. If the next stream have the same codebook (same
mode, same version of encoder) we can use the old one, otherwise we need
to collect a new one. Just using the old one would be bad, sometimes it
will sound *very* bad :). I know, I tried...

(If the complete stream is created with the same mode with the same
encoder the codebook
can be transmitted out of band to the client instead, e.g as a part of
the session setup. A payload-format specification should cover all these
cases.)

(The source is available in one of the jar-archives, but it might be
hard to read... )
 
//Roland

--- >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-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 mailing list