Dave St John
2004-Aug-06 14:57 UTC
[icecast-dev] icecast2 ogg vorbis client request headers
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"); ideas?? Dave St John Mediacast1 Administration Need Support ? http://mediacast1.com/helpdesk <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.
Dave St John
2004-Aug-06 14:57 UTC
[icecast-dev] icecast2 ogg vorbis client request headers
> 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@xiph.org> To: <icecast-dev@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 clientrequest> > methods for ogg vorbis, apparently there is a difference bettween theway> > 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\neverywhere> 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, icecastisn'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 wouldbe> 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@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.
Michael Smith
2004-Aug-06 14:57 UTC
[icecast-dev] icecast2 ogg vorbis client request headers
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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Dave St John
2004-Aug-06 14:57 UTC
[icecast-dev] icecast2 ogg vorbis client request headers
This may be of help, im tailing the error log file and im getting these errors [2004-04-01 19:14:35] DBUG source/source_main Client added [2004-04-01 19:14:38] DBUG source/source_main Client had unrecoverable error with new data, probably due to client disconnection [2004-04-01 19:14:38] DBUG source/source_main Client removed <p><p>Dave St John Mediacast1 Administration Need Support ? http://mediacast1.com/helpdesk ----- Original Message ----- From: "Michael Smith" <msmith@xiph.org> To: <icecast-dev@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 clientrequest> > methods for ogg vorbis, apparently there is a difference bettween theway> > 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\neverywhere> 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, icecastisn'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 wouldbe> 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@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.