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? Cheers, Macsym -----Original Message----- From: icecast-bounces@xiph.org [mailto:icecast-bounces@xiph.org] On Behalf Of Geoff Shang Sent: Saturday, July 03, 2004 6:14 AM To: icecast@xiph.org Subject: Re: [Icecast] Replicate stream on webserver Hi: Your problem is that you're going to want only one listening process but many serving processes, otherwise it's not going to achieve anything. So to explain further, when someone connects to your hosting provider, you'll want them to connect to the stream which is already being pulled from your box, not start another instance which connects to your box. Basically what you want is a server, like icecast. You might be able to hack something together, but to my mind, you'd only be re-inventing icecast or something like it, so why bother? I realise you'll need to get your hosting company to install icecast, but there's really no other way to get around it that I can think of. Geoff. _______________________________________________ Icecast mailing list Icecast@xiph.org http://lists.xiph.org/mailman/listinfo/icecast
<20040706174733.3156B104109@smtp3.oregonstate.edu> Message-ID: <6.0.1.1.2.20040706203353.039e8038@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... oddsock
MacSym 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?Hi MacSym, there's another problem: most ISPs kill CGI scripts (or PHP scripts) after a few seconds. But if your PHP script would replicate the stream, it would have to run as long as the stream runs. Have a few hundred page hits, and you have a few hundred processes on the server, and your ISP kills you. Maybe it's easier to find a hoster with icecast or another streaming server... Chris
Hi: Your problem is that you're going to want only one listening process but many serving processes, otherwise it's not going to achieve anything. So to explain further, when someone connects to your hosting provider, you'll want them to connect to the stream which is already being pulled from your box, not start another instance which connects to your box. Basically what you want is a server, like icecast. You might be able to hack something together, but to my mind, you'd only be re-inventing icecast or something like it, so why bother? I realise you'll need to get your hosting company to install icecast, but there's really no other way to get around it that I can think of. Geoff.