Ok i got a few questions when a client connects (winamp) what are the incoming headers icecast looks for to signify what type(ogg or mp3) of stream the client is requesting? example (for shoutcast winamp sends icy-metadata:1) shoutcast server then recognizes its a player capable of streaming media so it sends the icy-metaint:8192 to winamp, along with a slew of other icy headers. o here is my dilema example php code fwrite($sp,"GET /my_mp3 HTTP/1.0\nUser-Agent:Secret stuff alpha\nicy-metadata:1\n\n");//works with winamp when requested via php script but fwrite($sp,"GET /example.ogg HTTP/1.0\nUser-Agent:Secret stuff alpha\n\n"); //will not work in winamp when requested via php script diff highlighted in blue. any ideas./help would be appreaciated. <p><p>Dave St John Mediacast1 Administration <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-dev-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.
> clear as mud ?Thick in it LOL Ok since you discussed how clients handle mp3, what about ogg vorbis? winamp is just supposed to recognize the .ogg extension? like i said before the mp3 works with that code, but ogg mounts just sit there, doing nothing. <p>Dave St John Mediacast1 Administration ----- Original Message ----- From: "oddsock" <oddsock@oddsock.org> To: <icecast-dev@xiph.org> Sent: Thursday, December 04, 2003 8:00 AM Subject: Re: [icecast-dev] Ogg response headers <p>> icecast doesn't look at the headers at all, they look only at the> mountpoint...so in your case, it will look up /my_mp3 or /example.ogg and > serve that stream. Icecast WILL send a Content-type in the response > headers to the client, but most media players don't actually determine > stream types off the Content-type (I think the defunct winamp3 did), but > rather by file extension..So in the case of winamp, it would assume that > /my_mp3 was a MP3 stream (winamp figures that if there is no extenstion, > then the stream MUST be mp3, since that is the only true stream.. :P ) > > the icy-metadata:1 is a client request header that tells icecast that if > the requested mountpoint is an MP3 stream, then this request header is an > indication to icecast that the client supports the > "shoutcast-in-the-stream-metadata". If icecast gets a request for an MP3 > stream, and doesn't see that in the request header, then it will NOT send > out metadata for mp3 streams. as far as I know, most mp3 streamingclients> (winamp, foobar, xmms) do send this in the request header to icecast.. > > clear as mud ? > > oddsock > At 12:17 AM 12/4/2003 -0700, you wrote: > >Ok i got a few questions > >when a client connects (winamp) what are the incoming headers icecast > >looks for to signify what type(ogg or mp3) of stream the client isrequesting?> > > >example > >(for shoutcast winamp sends icy-metadata:1) > >shoutcast server then recognizes its a player capable of streaming media > >so it sends the icy-metaint:8192 to winamp, along with a slew of othericy> >headers. > > > >so here is my dilema > >example php code > >fwrite($sp,"GET /my_mp3 HTTP/1.0\nUser-Agent:Secret stuff > >alpha\nicy-metadata:1\n\n");//works with winamp when requested via phpscript> >but > >fwrite($sp,"GET /example.ogg HTTP/1.0\nUser-Agent:Secret stuff > >alpha\n\n"); //will not work in winamp when requested via php script > > > >diff highlighted in blue. > > > >any ideas./help would be appreaciated. > > > > > > > >Dave St John > >Mediacast1 Administration > > --- >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-dev-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-dev-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.s. Please don't ever send HTML mail to this or any other mailing list.roger that, outlook has its way of deciding for you sometimes :/ <p>> URL ends with ".ogg". If your script ends with ".php" (as it probably does), Since i got the mp3 part to work, myabe ill try adding .ogg to be parsed by php in the apache config, since it the winamp request ends up hanging. thanks for the tips, if and when i get it working ill post the results as well as links to the script download. Dave St John Mediacast1 Administration ----- Original Message ----- From: "Michael Smith" <msmith@xiph.org> To: <icecast-dev@xiph.org> Sent: Thursday, December 04, 2003 5:52 PM Subject: Re: [icecast-dev] Ogg response headers <p>> On Thursday 04 December 2003 18:17, Dave St John wrote:> > Ok i got a few questions > > when a client connects (winamp) what are the incoming headers icecastlooks> > for to signify what type(ogg or mp3) of stream the client is requesting? > > > > It does not. When the incoming client request is received, icecast choosesa> source to send based on the request URI. Icecast sends a Content-Typeheader> in response, so the client knows what type of stream it is requesting.Before> this, the client doesn't actually _know_ what sort of stream it'srequesting.> > > example > > (for shoutcast winamp sends icy-metadata:1) > > Winamp sends that to mean "I want mp3 inline metadata if you support it",but> this does not imply anything about the requested stream format. > > > > so here is my dilema > > example php code > > fwrite($sp,"GET /my_mp3 HTTP/1.0\nUser-Agent:Secret stuff > > alpha\nicy-metadata:1\n\n");//works with winamp when requested via php > > script but > > fwrite($sp,"GET /example.ogg HTTP/1.0\nUser-Agent:Secret stuffalpha\n\n");> > //will not work in winamp when requested via php script > > Winamp is buggy - it doesn't read the content-type header returned fromthe> server. Instead, it invokes the ogg decoder if (and only if) the requested> URL ends with ".ogg". If your script ends with ".php" (as it probablydoes),> it'll default to the mp3 decoder. > > Mike > > > p.s. Please don't ever send HTML mail to this or any other mailing list. > > --- >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-dev-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-dev-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 everybody, Assorgia and me, we have worked on the Flash client for Icecast2. We got successful results with: -Windows (Netscape, Mozilla, CompuServe, or Opera) -Macintosh and Linux(Netscape, Internet Explorer for Macintosh, Safari, AOL, Opera, or CompuServe) For Windows (Internet Explorer or AOL) some headers sent by Icecast2 are missing. These headers are sent by Icecast1 but NOT Icecast2 (it is the reason why it always works with Icecast1). These necessary headers are: -Cache-Control: no-cache -Pragma: no-cache -Connection: keep-alive -Content-Length: 54000000 We SUCCESSFULLY imported a live stream into Flash on Windows/IE using a PHP script that forwards these headers with the live stream to the Flash animation. We used this PHP script only for testing purposes. Now that we identified the exact problem, we would like to force Icecast2 to send these headers to the client because it would avoid passing through the PHP script (which is less reliable, slower the connection and uses more CPU). It is why I am contacting the dev-list today. Can anybody advise us the best solution to force Icecast2 to send these headers to the browser? Should we build a patch or simply change some source codes and compile the modified source? Thank you very much in advance, MAX <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-dev-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.
icecast doesn't look at the headers at all, they look only at the mountpoint...so in your case, it will look up /my_mp3 or /example.ogg and serve that stream. Icecast WILL send a Content-type in the response headers to the client, but most media players don't actually determine stream types off the Content-type (I think the defunct winamp3 did), but rather by file extension..So in the case of winamp, it would assume that /my_mp3 was a MP3 stream (winamp figures that if there is no extenstion, then the stream MUST be mp3, since that is the only true stream.. :P ) the icy-metadata:1 is a client request header that tells icecast that if the requested mountpoint is an MP3 stream, then this request header is an indication to icecast that the client supports the "shoutcast-in-the-stream-metadata". If icecast gets a request for an MP3 stream, and doesn't see that in the request header, then it will NOT send out metadata for mp3 streams. as far as I know, most mp3 streaming clients (winamp, foobar, xmms) do send this in the request header to icecast.. clear as mud ? oddsock At 12:17 AM 12/4/2003 -0700, you wrote:>Ok i got a few questions >when a client connects (winamp) what are the incoming headers icecast >looks for to signify what type(ogg or mp3) of stream the client is requesting? > >example >(for shoutcast winamp sends icy-metadata:1) >shoutcast server then recognizes its a player capable of streaming media >so it sends the icy-metaint:8192 to winamp, along with a slew of other icy >headers. > >so here is my dilema >example php code >fwrite($sp,"GET /my_mp3 HTTP/1.0\nUser-Agent:Secret stuff >alpha\nicy-metadata:1\n\n");//works with winamp when requested via php script >but >fwrite($sp,"GET /example.ogg HTTP/1.0\nUser-Agent:Secret stuff >alpha\n\n"); //will not work in winamp when requested via php script > >diff highlighted in blue. > >any ideas./help would be appreaciated. > > > >Dave St John >Mediacast1 Administration--- >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-dev-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 Thursday 04 December 2003 18:17, Dave St John wrote:> Ok i got a few questions > when a client connects (winamp) what are the incoming headers icecast looks > for to signify what type(ogg or mp3) of stream the client is requesting? >It does not. When the incoming client request is received, icecast chooses a source to send based on the request URI. Icecast sends a Content-Type header in response, so the client knows what type of stream it is requesting. Before this, the client doesn't actually _know_ what sort of stream it's requesting.> example > (for shoutcast winamp sends icy-metadata:1)Winamp sends that to mean "I want mp3 inline metadata if you support it", but this does not imply anything about the requested stream format. <p>> so here is my dilema> example php code > fwrite($sp,"GET /my_mp3 HTTP/1.0\nUser-Agent:Secret stuff > alpha\nicy-metadata:1\n\n");//works with winamp when requested via php > script but > fwrite($sp,"GET /example.ogg HTTP/1.0\nUser-Agent:Secret stuff alpha\n\n"); > //will not work in winamp when requested via php scriptWinamp is buggy - it doesn't read the content-type header returned from the server. Instead, it invokes the ogg decoder if (and only if) the requested URL ends with ".ogg". If your script ends with ".php" (as it probably does), it'll default to the mp3 decoder. Mike <p>p.s. Please don't ever send HTML mail to this or any other mailing list. --- >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-dev-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.