[vorbis] Joining a stream part way through?

Andrew Brampton andrew at bramp.freeserve.co.uk
Sat Oct 18 06:52:30 PDT 2003



Hi,
I'm a 3rd year university student in the UK and for my dissertation (Final
Year Project) I'm trying to create a peer to peer streaming network, where a
audio stream gets sent around the network in a p2p fashion hopefully
reducing the load from the source.

I've decided to use ogg vorbis for my stream, and I have successfully
created a small app that can read data from a .ogg file and fire it at the
sound card. Now when I'm finished I plan to have my "server" read the data
from a ogg file and send it over the network where the peers will re-send
and re-assemble it to form a stream.

The problem I'm having is that if a peer would like to join the stream a
minute in. He won't be receiving the ogg file from the beginning by maybe a
few megabytes in. Then when I try to ov_open_callbacks this it returns a
error since the data is invalid.... I found there are tags in the stream
"OggS" to indicate the different pages, however if I start the stream on one
of these tags it returns a OV_EBADHEADER.

Now my question is, how can I allow a client to join the stream at any point
and continue play back from the next available place?

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.

Thanks for any replies
Andrew

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