Hello, I'm using a flash player. First It didn't work with icecast 2. The blocking difference between icecast 1 and icecast 2 is that icecast 2 don't send the Content-Length header. So, I made a small PHP proxy and now Flash works very well with icecast 2. Other solution is to add this header in the icecast 2 source code and compile it, but I don't have time to test. My proxy.php file : <? Header("Content-Length: 54000000\n"); $fp=fopen("http://www.myradio.com:8000/mountpoint.mp3","r"); while(!feof($fp)) print($line=fread($fp,2000)); fclose($fp); ?>>From flash I call proxy.php instead of mountpoint.mp3Hope this help, Sincerly, -- Ika Selon Ian Andrew Bell <hello@ianbell.com>:> Doesn't work so well on Mozilla or anything other than IEWin... and I'm > worried about using lots of extra software. > > Thanks for the suggestion tho. > > -Ian. > > On 18-Oct-04, at 6:46 AM, illiminable wrote: > > > Alternatively you can just script the window media player control, and > > bind it to your stream, that should work just fine, assuming you have > > my directshow filters installed. > > > > Zen. > > ----- Original Message ----- From: "Michael Smith" <msmith@xiph.org> > > To: "Ian Andrew Bell" <hello@ianbell.com>; "icecast" <icecast@xiph.org> > > Sent: Monday, October 18, 2004 9:29 AM > > Subject: Re: [Icecast] ICECast in Flash / IEWin > > > > > >> On Sunday 17 October 2004 07:16, Ian Andrew Bell wrote: > >>> I'd like to resurrect this orphaned thread: > >>> > >>> http://lists.xiph.org/pipermail/icecast/2003-December/006139.html > >>> > >>> We're using the embedded flash player for listeners of > >>> pulverradio.com > >>> and can't use 2.2 for relaying from our encoders. Apparently we can > >>> use Icecast v1.3 > >>> > >>> Although this is clearly a problem caused by ActiveX and Microsoft > >>> boneheads that is a mountain that may prove difficult to heave in a > >>> timely manner. > >>> > >>> The fact that it can work with 1.3 indicates that there may have been > >>> some behaviour in the old version that was improved upon for 2.x ... > >>> perhaps future versions of Icecast could have a configuration flag to > >>> deprecate 2.x behaviour to 1.3's styling for headers (which in my > >>> limited understanding is where the problem lies), simply as a work > >>> around for the problem that would still allow us to use the cool new > >>> relaying features of 2.0 in our implementation. > >> > >> If we knew what the problem was (that causes flash to fail with 2.0), > >> we'd be > >> happy to add such a flag (or perhaps just change it to always work > >> that way, > >> depending on what the problem was). > >> > >> However, since nobody managed to figure out what the problem was (and > >> some of > >> the developers, such as myself, don't have a system where this > >> problem can be > >> reproduced), we can't really do much until someone does. > >>>
Not to nit-pick too much, but consider fpassthru() instead of that ugly-looking loop? http://us2.php.net/manual/en/function.fpassthru.php ~> $fp=fopen("http://www.myradio.com:8000/mountpoint.mp3","r"); > while(!feof($fp)) print($line=fread($fp,2000)); > fclose($fp); > ?>
On Tuesday 02 November 2004 03:13, Ika OSCAOS wrote:> Hello, > > I'm using a flash player. First It didn't work with icecast 2. The blocking > difference between icecast 1 and icecast 2 is that icecast 2 don't send the > Content-Length header. >We don't sent a content-length header because there's no way to know the content length in advance - it's a stream, after all!> So, I made a small PHP proxy and now Flash works very well with icecast 2. > Other solution is to add this header in the icecast 2 source code and > compile it, but I don't have time to test.Whilst you're welcome to do something like this, it would be very inappropriate for the normal icecast sources to do this - it's giving deliberately wrong information that WILL cause problems. Mike
Hello, Michael Smith <msmith@xiph.org>:> > We don't sent a content-length header because there's no way to know the > content length in advance - it's a stream, after all!I kown this, after more than 1 hour the flash player stop to play. But during 1 hour It's possible to listen music, better than hearing nothing.> > So, I made a small PHP proxy and now Flash works very well with icecast 2. > > Other solution is to add this header in the icecast 2 source code and > > compile it, but I don't have time to test. > > Whilst you're welcome to do something like this, it would be very > inappropriate for the normal icecast sources to do this - it's giving > deliberately wrong information that WILL cause problems.I'm agree with you it's not an appropriate solution, but it works. So can you give me the appropriate solution, I will replace my proxy as soon as you explain me how listener can listen my radio with flash players. Thank you, -- Ika
On 2-Nov-04, at 5:55 PM, Michael Smith wrote:> We don't sent a content-length header because there's no way to know > the > content length in advance - it's a stream, after all!Well, you COULD do this but choosing not to when there seems to be a lot of call to add one doesn't seem to be a great answer.> Whilst you're welcome to do something like this, it would be very > inappropriate for the normal icecast sources to do this - it's giving > deliberately wrong information that WILL cause problems.Commercial stations would want this anyway since they: A) Don't want to have unauthorized sources repeating their signal (and thereby depriving them of vital listener stats) B) Probably want to kick off listeners every few hours so you're not paying $$ to your bandwidth supplier for folks who are AFK for a whole weekend Seems to me like you could kill two birds with one stone by adding a config feature to predefine the content-length header in that: 1) You'd solve the whole streaming to Flash within ActiveX thing, and 2) You'd give streamers the ability to kick listeners every once in a while (which can't be that bad) -Ian.