[Icecast] Replicate stream on webserver

oddsock oddsock
Tue Jul 6 18:46:16 PDT 2004

<20040706174733.3156B104109 at smtp3.oregonstate.edu>
Message-ID: < at www.oddsock.org>

At 12:47 PM 7/6/2004, you wrote:
>Hi Geoff,
>First, thank you very much for understanding my message; I posted a thread
>on phpbuilder but nobody really understood what my end goal was... It looks
>like they don't really know what streaming is...
>So you think it's just impossible to do? I am still convinced that PHP or
>Perl are powerful enough to handle it but I will have to search a little
>more. I know how to open sockets on my webserver but the problem is that if
>20 persons run the same script, 20 different sockets are opened which
>doesn't change anything to my bandwidth problem. For the moment, I don't
>know how to fix that problem. Any idea?

a long long time ago I started developing something like this, primarily
just to prove to someone specifically that it COULD be done.  And yes, it
can be done.  I did it in PHP and the general approach was to have a
controller that was responsible for pulling the stream from your server (it
was shoutcast in this case) and then creating a local circular buffer in
the form of a file.  Listeners would connect to a special php script which
would read through the circular buffer and send the data to the
listener.  Remembering more about it, I think the controller php script
would accept a custom source client which made it so I didn't need the
Shoutcast server at all.  And, in fact, that was the reason why I wrote the
oddcast DSP source client (because I couldn't make the existing Shoutcast
DSP communicate with my PHP script).

It did in fact work, although had a few caveats :
1. (most importantly) It was against the TOS for all hosting
providers.  While they specifically didn't mention that you couldn't do
this type of thing, it was clearly against their policy.
2. It required a specialized listener client (I wrote a winamp input plugin
to handle the listener part of it)
3. It proved my point that it could be done, although it really was a bad
idea for many reasons, most specifically #1.  As soon as a host finds out
your doing something like this (and they will), all your efforts to set
something up like this will be for nothing.
4. In case your wondering, I no longer have any of the code for this...


More information about the Icecast mailing list