[vorbis-dev] UDP streaming vorbis

Beni Cherniavsky cben at users.sf.net
Wed Sep 10 11:44:54 PDT 2003



Eric Ross wrote on 2003-09-10:

> Is any way to cache these headers ? I mean, if im going to transmit always
> at some bitrate, always at same quality and so on, can a push into the
> vorbis decoder a fake buffer (premade with real data) and then start
> receiving and decoding the real data  ?
>
Sure, but you must be sure the headers are really the same.  Note that
different versions of oggenc use different headers for same quality
settings.  Some hash (e.g. MD5) over the headers could be used to
compare.  Since it's so small, you could send it many times a second
in the UDP data stream and a joining client would only retrieve the
header by TCP if it has no cached copy with same MD5...

Note also that you'd want to do this only for the third packet and
probably the first (are the codebooks same with different numbers of
channels?).  The second packet contains metadata "comments" which are
obviously different for every file.  However you could already start
playing while you recieve the comments over TCP (feed an empty
comment packet to the decoder, parse the real one separately).


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