> 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.
At 06:16 PM 12/4/2003 -0700, you wrote:> > 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.you might want to experiment with the Content-Disposition header as I use this header to serve m3u files from a php script... e.g. header("Content-type: audio/m3u"); if (preg_match("/MSIE 5.5/", $HTTP_USER_AGENT)) { header("Content-Disposition: filename=\"listen.m3u\""); } else { #header("Content-Disposition: attachment; filename=\"listen.m3u\""); header("Content-Disposition: inline; filename=\"listen.m3u\""); } This works with IE, not entirely sure if this technique will work within winamp, but my guess is no, it might need a URL that ends in .ogg....as a shot in the dark you could also try : http://server/yourscripty.php?dummy=/bleh.ogg oddsock>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.
> This works with IE, not entirely sure if this technique will work within > winamp, but my guess is no, it might need a URL that ends in .ogg....as a > shot in the dark you could also try : > http://server/yourscripty.php?dummy=/bleh.ogg<p>I'd be extremely surprised if the Content-Disposition approach worked with winamp - the problems with winamp are far too deep for it to even be relevant. The dummy URL parameter I _would_ expect to work, on the other hand but obviously this would need some testing. 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-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.
yeup already gave that one a shot, even tried sending custom headers for winamp and hackin source.c in icecast to no avail <p><p><p>Dave St John Mediacast1 Administration ----- Original Message ----- From: "oddsock" <oddsock@oddsock.org> To: <icecast-dev@xiph.org> Sent: Thursday, December 04, 2003 8:26 PM Subject: Re: [icecast-dev] Ogg response headers <p>> At 06:16 PM 12/4/2003 -0700, you wrote:> > > 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 parsedby> >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. > > you might want to experiment with the Content-Disposition header as I use > this header to serve m3u files from a php script... > > e.g. > > header("Content-type: audio/m3u"); > if (preg_match("/MSIE 5.5/", $HTTP_USER_AGENT)) { > header("Content-Disposition: filename=\"listen.m3u\""); > } > else { > #header("Content-Disposition: attachment;filename=\"listen.m3u\"");> header("Content-Disposition: inline; filename=\"listen.m3u\""); > } > > This works with IE, not entirely sure if this technique will work within > winamp, but my guess is no, it might need a URL that ends in .ogg....as a > shot in the dark you could also try : > http://server/yourscripty.php?dummy=/bleh.ogg > > oddsock > >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.