Hi Leo, Like you, I know think the problem doesn't come from the headers with Icecast. Shoutcast needs some header information before accepting to send the stream but not Icecast. The flash animation doesn't work with Icecast either. I tried adding the mp3 extension to my live stream and to serve a static mp3 through Icecast but I had the same results. Serving a static mp3 through apache works perfectly, even in embedded mode. By analyzing the logs, I noticed the animation, even when embedded, could access the stream and Icecast, actually sends the stream to the player but it doesn't play anything. The standalone player and the flash plugin (needed to run an embedded animation) are exactly the same. However, the standalone player doesn't have all security features that the plugin has. I guess the plugin can't play the stream for security reasons: there might be a cross-domain issue, or the plugin consider the mp3 is corrupted because it is streamed. I am now reading all papers I got about flash security. I tried to apply all solutions advised by macromedia but it still doesn't work for the moment. I did all tests with a 58k bit rate but I'll now try to import a 24K bit rate Thanks for advising, MAX -----Original Message----- From: owner-icecast@xiph.org [mailto:owner-icecast@xiph.org] On Behalf Of Leo Currie Sent: Monday, December 01, 2003 12:23 PM To: icecast@xiph.org Subject: Re: [icecast] Icecast in Macromedia Flash Hi - Ok, I don't pretend to have answers for you, sorry, but here are some thoughts: [snip]> HERE IS THE PROBLEM: the code above works perfectly in a standalone swffile> but not when the swf is embedded into a webpage.So you have to assume that there is some difference between the embedded player and the standalone player. <p>>> I analyzed the logs of my icecast server to understand what is happening: > > When I run the swf in standalone mode (not embedded), the ACCESS log is: > 192.168.0.3 - - [27/Nov/2003:04:37:46 Romance Standard Time] "GET/mystream> HTTP/1.1" 200 246535 "(null)" "http://192.168.0.4:37/mystream" 13712368. > > When I run the webpage in which the swf is embedded in, I can see the swf > contacts the server but no stream is played. The ACCESS log is: > 192.168.0.3 - - [27/Nov/2003:04:42:58 Romance Standard Time] "GET/mystream> HTTP/1.1" 200 328981 "(null)" "-" 13712464 > > I both case, the ERROR log is: > [.]Client connected > [.]Source found for client > [.[Client added > > It means the swf, even when embedded, can access the stream (but itdoesn't> play anything). Anyway, I noticed the only difference between the twoACCESS> logs is the "http://192.168.0.4:37/mystream" (in first log) instead of "-" > (in second log) that appears behind "(null)". Please not that I made other > tests with Winamp and the habitual information that appears behind"(null)"> is "-".Ok, but this isn't really significant. The first version (standalone) is reporting the referring address, the second isn't. Also, for some reason, the user-agent reported the first time is the stream address, but this won't affect anything.> > I thought the problem might come from the headers that Icecast need to > receive from regular players (Winamp,.) before sending the stream becauseI> think my Flash animation doesn't send any header information when embeddedI'm sure Icecast (unlike Shoutcast) doesn't care what user-agent string is provided. If the stand-alone player works without modified headers, this can't be the problem.> into a webpage (headers information is send by the browser instead). For > this reason I tried to use a php script that sends hardcoded header > information (Content-type: audio/mpeg; GET <path of the stream> HTTP/1.1; > protocol: \"http\") to the server. Then I call the URL of this script into > my flash code instead of the URL of the stream. The php script is: > <?php > $streamname = "192.168.0.4"; // put in whatever stream you want to play > $port = "37"; // put in the port of the stream > $path = "/mystream"; // put in any extra path, this is usually just a / > header("Content-type: audio/mpeg"); > $sock = fsockopen($streamname,$port); > fputs($sock, "GET $path HTTP/1.1\n"); > fputs($sock, "protocol: \"http\"\n"); > fputs($sock, "Connection: close\n\n"); > fpassthru($sock); > ?> > I still have the same problem even with the script: I can listen to the > stream when I run the swf in standalone mode but NOT when it is embedded > into a webpage. I also analyzed the access logs of Icecast when I call theHere's a thought. Perhaps the embedded player is missing the relevant codec (MP3 decoder) to play the stream? Have you tried including a short, static MP3 at the start of the animation? My hopeful guess is that the embedded version is being 'compiled' without the MP3 decoder. If you force the encoder to be included (by adding a short static mp3 file at the start) it might know what to do with the stream once it gets it. Maybe even simply adding '.mp3' to the end of the mountpoint name (do this in the source client configuration) will force it to work. Of course, I'm probably completely wrong. Have you tried using the player to listen to Shoutcast streams? How about static mp3's served from Apache? Or maybe there is a limitation in the embedded player on content bitrate? What if you use it to 'tune-in' to low bitrate servers? Hope you get it working - I agree it would be nice to add Flash to the list of supported clients. Leo --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered. <p>--- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Tuesday 02 December 2003 04:33, Ralph Giles wrote:> On Mon, Dec 01, 2003 at 03:56:09PM +0100, Macsym wrote: > > Serving a static mp3 through apache works perfectly, even in embedded > > mode. > > If streaming from apache works, but streaming from icecast doesn't, could > the difference be the interleaved metadata? That's one difference between > the two. >Ralph, We only send the metadata if the client explicitly asks for it - however, it's possible that the flash client a) IS asking for it, but b) is incompatible with how icecast2 implements it (as far as I know, we do it right - could be a flash bug if so) Mike --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Hi Assorgia, Thanks for the flash animation. I think Icecast1 might be the solution. I am just a little bit scared by the message "Note that icecast 1 is deprecated and unsupported, and may possibly induce nausea in small children, hair loss in men, and estrogen fluctuations in women" that appears on the download page. I have a nice blond hair of "Principe Azzuro" that I don't want to lose! Just kidding. Anyway, I am trying a little more with Icecast2 but if it turns impossible (what I don't believe for the moment), I would switch to Icecast1. I listened to the volleyball stream yesterday; the quality was very nice and I did not imagine it was only 16Ko! By the way, what version of Icecast1 are you running and on what OS? What is your flash version 5, 6 or 7? Thanks for everything, MAX _____ From: owner-icecast@xiph.org [mailto:owner-icecast@xiph.org] On Behalf Of assorgia@tin.it Sent: Monday, December 01, 2003 6:57 PM To: icecast@xiph.org Subject: RE: [icecast] Icecast in Macromedia Flash Here's my experience: 1- loading sounds from other domains does not infringe the Flash security policy. Loading other movies or variables or even XML files does, but this is not our case. 2- As a fact flash does not undertand every "bit rate/sample rate" combination. I cant' find the page where I got this information by now, but I've spent some time before finding the right sample rate. Now i'm working with 16 kbps 22.050 Khz and it sounds good. 3- MOST IMPORTANT It all works fine with icecast 1.3, even in embedded mode. Problems arise with icecast 2.0. Something MUST have changed in the way icecast broadcasts audio streams between the two versions. ---> http://www.sardegnaoggi.it/downloads/myplayer.zip <---- Here you can download a little player (4Kb) embedded on a web page. You can use it to listen to KSL radio (hope Kerry doesn't mind) which is running an icecast 1.3 server. Please note that, when run in stand-alone mode, flash can't return the amount of downloaded bytes, even if the stream plays well. Maybe this is an hint on what's going wrong, but not for me. Have fun. --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered. <p><p>--- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Mon, Dec 01, 2003 at 03:56:09PM +0100, Macsym wrote:> Serving a static mp3 through apache works perfectly, even in embedded mode.If streaming from apache works, but streaming from icecast doesn't, could the difference be the interleaved metadata? That's one difference between the two. -r --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Hi Ralph, What do you mean by "interleaved metadata"? I think the difference for Flash between an Icecast stream and an Apache stream is the fact that Flash can know the size of the mp3 before playing it with Apache. When Flash connects to an Icecast stream (even when static), I think it doesn't know the total size of the file it is going to play because ICECAST handles the transmission of the mp3 in cache. Also, I just read flash when embedded doesn't allow to store more than 100K of data on the user's hard drive. There might be an exception for media files (this limitation is targeted to cookies), but if not, 100K represents less than 2 seconds in case of a 58K stream. It's definitely a SMALL margin that could involve stability issues... One of the reason why Flash can play an Icecast1 stream and not Icecast2 might be the difference between how is handled the cache between the two versions. Cheers, MAX <p>-----Original Message----- From: owner-icecast@xiph.org [mailto:owner-icecast@xiph.org] On Behalf Of Ralph Giles Sent: Monday, December 01, 2003 6:34 PM To: icecast@xiph.org Subject: Re: [icecast] Icecast in Macromedia Flash On Mon, Dec 01, 2003 at 03:56:09PM +0100, Macsym wrote:> Serving a static mp3 through apache works perfectly, even in embeddedmode. If streaming from apache works, but streaming from icecast doesn't, could the difference be the interleaved metadata? That's one difference between the two. -r --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered. <p>--- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
the interleaved metadata is only sent by clients requesting it (icy-metadata: 1 in the request header) and by default is not sent...if you are receieving metadata in a stream that you don't expect to, you'll most likely just hear blips in the stream.. oddsock At 05:33 PM 12/1/2003 +0000, you wrote:>On Mon, Dec 01, 2003 at 03:56:09PM +0100, Macsym wrote: > > > Serving a static mp3 through apache works perfectly, even in embedded mode. > >If streaming from apache works, but streaming from icecast doesn't, could >the difference be the >interleaved metadata? That's one difference between the two. > > -r >--- >8 ---- >List archives: http://www.xiph.org/archives/ >icecast project homepage: http://www.icecast.org/ >To unsubscribe from this list, send a message to 'icecast-request@xiph.org' >containing only the word 'unsubscribe' in the body. No subject is needed. >Unsubscribe messages sent to the list will be ignored/filtered.--- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
<?xml version="1.0" ?> <head> <title></title> </head> <body> <div align="left"><font face="Arial"><span style="font-size:10pt">Here's my experience:</span></font></div> <div align="left"><br/> </div> <div align="left"><font face="Arial"><span style="font-size:10pt">1- loading sounds from other domains does not infringe the Flash security policy. Loading other movies or variables or even XML files does, but this is not our case.</span></font></div> <div align="left"><br/> </div> <div align="left"><font face="Arial"><span style="font-size:10pt">2- As a fact flash does not undertand every "bit rate/sample rate" combination.</span></font></div> <div align="left"><font face="Arial"><span style="font-size:10pt">I cant' find the page where I got this information by now, but I've spent some time before finding the right sample rate. Now i'm working with 16 kbps 22.050 Khz and it sounds good.</span></font></div> <div align="left"><br/> </div> <div align="left"><font face="Arial"><span style="font-size:10pt">3- MOST IMPORTANT</span></font></div> <div align="left"><font face="Arial"><span style="font-size:10pt">It all works fine with icecast 1.3, even in embedded mode. Problems arise with icecast 2.0. Something MUST have changed in the way icecast broadcasts audio streams between the two versions.</span></font></div> <div align="left"><br/> </div> <div align="left"><font face="Arial"><span style="font-size:10pt">---> http://www.sardegnaoggi.it/downloads/myplayer.zip  <----</span></font></div> <div align="left"><font face="Arial"><span style="font-size:10pt">Here you can download a little player (4Kb) embedded on a web page. You can use it to listen to KSL radio (hope Kerry doesn't mind) which is running an icecast 1.3 server.</span></font></div> <div align="left"><br/> </div> <div align="left"><font face="Arial"><span style="font-size:10pt">Please note that, when run in stand-alone mode, flash can't return the amount of downloaded bytes, even if the stream plays well. Maybe this is an hint on what's going wrong, but not for me.</span></font></div> <div align="left"><br/> </div> <div align="left"><font face="Arial"><span style="font-size:10pt">Have fun.</span></font></div> </body> --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Hi, There has been much around discussing, how to get icecast2 working with a flash player embedded to a webpage. Another question by me, even if it's a bit offtopic: Is there some pre-coded flash player available that can play shoutcast streams? -- CU und wech... Daniel This is Linux Country. If you listen carefully, you can hear Windows reboot. --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.