[icecast-dev] icecast2 ogg vorbis client request headers

Dave St John dstjohn at mediacast1.com
Thu Apr 1 17:04:57 PST 2004



> You must have some other, unrelated, problem, presumably elsewhere in your
> code.
this is what i have, and does work with mp3, but ogg does not want to work.
im testing with winamp, you think that may be the issue?

<p><p>fwrite($fp,"GET /mymp3 HTTP/1.1\nUser-Agent:$HTTP_USER_AGENT\n\n");
for ($i=0; $i<120; $i++) {
  if (feof($sp)) break;
  $str.=fread($sp,4096);
  usleep(200000);
  if (strpos($str,"\r\n\r\n")) break;
}

flush();
echo substr($str,strpos($str,"\r\n\r\n")+4);
flush();

while(!$shutdown_flag) {
  $buf=fread($sp,4096);
  if (feof($sp)) $shutdown_flag=1;
  echo $buf;
  flush();
  usleep(75000);
}

<p>Dave St John
Mediacast1 Administration

Need Support ?
http://mediacast1.com/helpdesk
----- Original Message ----- 
From: "Michael Smith" <msmith at xiph.org>
To: <icecast-dev at xiph.org>
Sent: Thursday, April 01, 2004 5:47 PM
Subject: Re: [icecast-dev] icecast2 ogg vorbis client request headers

<p>> On Friday 02 April 2004 09:28, Dave St John wrote:
> > Can anyone shed some light as to what icecast2 accepts as a client
request
> > methods for ogg vorbis, apparently there is a difference bettween the
way
> > icecast2 handles mp3 and ogg vorbis.
> >
> > php example for mp3 that works
> > fwrite($fp,"GET /mymp3 HTTP/1.1\nUser-Agent:$HTTP_USER_AGENT\n\n");
> >
> > php example for ogg that doesnt work
> > fwrite($fp,"GET /mymnt.ogg HTTP/1.1\nUser-Agent:$HTTP_USER_AGENT\n\n");
> >
>
> These should both work. To be strictly correct, you must use \r\n
everywhere
> you have \n, but icecast isn't picky about that. You also must send some
> required HTTP/1.1 headers, or send in HTTP/1.0 instead. Again, icecast
isn't
> picky. You should have a space between "User-Agent:" and the actual value.
> I'm not sure whether icecast is picky about that, but the behaviour would
be
> server-wide, not format-specific.
>
> You must have some other, unrelated, problem, presumably elsewhere in your
> code.
>
> 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 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.
>

<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 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 mailing list