[icecast-dev] Ogg response headers
msmith at xiph.org
Thu Dec 4 16:52:11 PST 2003
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.
> (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 script
Winamp 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.
<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 at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Icecast-dev