[vorbis] Joining a stream part way through?

Stan Seibert volsung at mailsnare.net
Sat Oct 18 07:04:36 PDT 2003



On Sat, 2003-10-18 at 08:52, Andrew Brampton wrote:
> I haven't looked how Icecast does it, but if it works by sending the first
> header in the file then that will mess up with p2p plans....
> I don't really want to be spending a lot of my time working this out, if it
> all fails I can just send raw PCM data over my p2p network since I'm able to
> join that stream anytime, but I thought using ogg would be cooler, and more
> practical in a real environment.

Icecast does it by caching the first three Vorbis packets (which are the
header packets) and tacking them onto the beginning of the stream. 
These 3 packets are mandatory for being able to decode an Ogg Vorbis
file.  You can then pickup the stream at any point after them.

Just making your app cache the header packets for the current stream and
sending them to new clients shouldn't be too hard.  Even if you switch
to PCM, you still have to tell the clients what the sample format is
before you send them the audio.  Vorbis is just a "little" more data
than that.  :)


---
Stan Seibert

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