Dave St John
2004-Aug-06 14:57 UTC
[icecast-dev] icecast2 ogg vorbis client request headers
That seems it may work, however the server adds the client (php proxy script in this case) and does not disconnect it, however winamp does not recieve any audio, just sits there saying BUFFERING I know its related to the amount of bytes read into the header or something in that area as my tests with shoutcast nsv resulted in the same fashion. the main goal of this is for subscription authentication, sure you can use a web based from to login to a server, however it shows up in winamp or any other player for that matter with the link to the server url and mount, which leavs a vulneralbility for listeners to spread the server around to other listeners etc.... When a php script is used, it shows up in winamp etc... as a link to a php script and does not show the actual link to server ip and port/mount. Sure anyone can use netstat to get an incoming ip and port however netstat doesnt reveal a mount point and if the webcaster hides there status.xsl files or renames them to something inconspicuous then it creates a nice subscription based system (albeit not 100% hackable as its a frontend, but very effective). like i said i got the mp3 nailed down, ogg just needs work, Any help would be appreciated and i can provide access to the members area for testing as well as an icecast2 server. <p>Dave St John Mediacast1 Administration Need Support ? http://mediacast1.com/helpdesk ----- Original Message ----- From: "oddsock" <oddsock@oddsock.org> To: <icecast-dev@xiph.org> Sent: Thursday, April 01, 2004 9:37 PM Subject: Re: [icecast-dev] icecast2 ogg vorbis client request headers <p>> I imagine something to the effect of (a completely untested and hack-ish> way to do it): > $count = 0; > while (!feof($sp)) { > $str = fread($sp,1); > if ($count == 0) { > if ($str == "\r") { > $count = 1; > continue; > } > } > if ($count == 1) { > if ($str == "\n") { > $count = 2; > continue; > } > } > if ($count == 2) { > if ($str == "\r") { > $count = 3; > continue; > } > } > if ($count == 3) { > if ($str == "\n") { > $count = 4; > continue; > } > } > if ($count == 4) { > break; > } > } > // now your at the end of the header > while (!feof($sp)) { > $str = fread($sp,4096); > // Write data (in $str to client (listener in this case) - not > sure how you do this... > } > > At 10:26 PM 4/1/2004, you wrote: > >So instead set it from 4096 bytes to 0 and increment till it reaches the > >end? > >show me an example please. > > > > > >Dave St John > >Mediacast1 Administration > > > >Need Support ? > >http://mediacast1.com/helpdesk > >----- Original Message ----- > >From: "oddsock" <oddsock@oddsock.org> > >To: <icecast-dev@xiph.org> > >Sent: Thursday, April 01, 2004 9:15 PM > >Subject: Re: [icecast-dev] icecast2 ogg vorbis client request headers > > > > > > > At 08:54 PM 4/1/2004, you wrote: > > > >Well the code itself is what i took from tom peppers sc proxy scriptand> > > >incorperated our own auth system for icecast2 > > > >i know i got it close with ogg and it seems to be when i tweak the > > > >$str.=fread($sp,4096); > > > >bit amount, i get different results, 4096 works fine for mp3 onicecast2> >and > > > >shoutcast, but im assuimg maybe there is more or less to read from > > > >the ogg headers?? if so what would be the correct amount? > > > > > > the correct amount would vary depending on what your http responseheaders> > > look like. > > > > > > don't read a flat 4096 amount, this will (as Mike said) most likelyread> >in > > > part of the vorbis headers, and since your throwing away this 4096bytes,> > > you are throwing away part of the vorbis headers, which are requiredto be> > > sent first in a vorbis stream. > > > > > > so instead of reading 4096, just read a byte at a time until you get a > > > character series "\r\n\r\n"...then you know your at the end of thehttp> > > header and you won't be thowing away vorbis critical data.. > > > > > > oddsock > > > > > > > > > --- >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 isneeded.> > > Unsubscribe messages sent to the list will be ignored/filtered. > > > > > > > > >--- >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 isneeded.> >Unsubscribe messages sent to the list will be ignored/filtered. > > > --- >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
> the main goal of this is for subscription authentication, sure you can use > a web based from to login > to a server, however it shows up in winamp or any other player for that > matter with the link to the server url and mount, > which leavs a vulneralbility for listeners to spread the server around to > other listeners etc....You may be interested in icecast2-cvs (well... I guess that's "icecast2-svn" now we've done the conversion). It has a new feature for user authentication - you can set it up per-mountpoint, and it uses a file like apache's htpasswd for authenticating users. This isn't properly documented yet, though. Let me know if you want more details. 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
hmmm. never heard of svn so we can no longer use cvs?>Let me know if you want more details.Absolutely, spill the beans im all ears :) <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 10:29 PM Subject: Re: [icecast-dev] icecast2 ogg vorbis client request headers <p>> > the main goal of this is for subscription authentication, sure you can use> > a web based from to login > > to a server, however it shows up in winamp or any other player for that > > matter with the link to the server url and mount, > > which leavs a vulneralbility for listeners to spread the server aroundto> > other listeners etc.... > > You may be interested in icecast2-cvs (well... I guess that's"icecast2-svn"> now we've done the conversion). It has a new feature for userauthentication> - you can set it up per-mountpoint, and it uses a file like apache'shtpasswd> for authenticating users. > > This isn't properly documented yet, though. Let me know if you want more > details. > > 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.
Dave St John
2004-Aug-06 14:57 UTC
[icecast-dev] icecast2 ogg vorbis client request headers
btw what is the latest dev version in question on svn.xiph.org, is it http://svn.xiph.org/icecast/tags/icecast_beta2/ ?? <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 10:29 PM Subject: Re: [icecast-dev] icecast2 ogg vorbis client request headers <p>> > the main goal of this is for subscription authentication, sure you can use> > a web based from to login > > to a server, however it shows up in winamp or any other player for that > > matter with the link to the server url and mount, > > which leavs a vulneralbility for listeners to spread the server aroundto> > other listeners etc.... > > You may be interested in icecast2-cvs (well... I guess that's"icecast2-svn"> now we've done the conversion). It has a new feature for userauthentication> - you can set it up per-mountpoint, and it uses a file like apache'shtpasswd> for authenticating users. > > This isn't properly documented yet, though. Let me know if you want more > details. > > 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.
Geoff Shang
2004-Aug-06 14:57 UTC
[icecast-dev] icecast2 ogg vorbis client request headers
On Thu, 1 Apr 2004, Dave St John wrote:> That seems it may work, however the server adds the client (php proxy script > in this case) > and does not disconnect it, however winamp does not recieve any audio, just > sits there saying BUFFERINGDumb question maybe, but are you sending winamp the correct mMIME type? Geoff. --- >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
I have tried that, but not sure if i am doing that right. in connection.c starting line 847 i believe, it sends this bytes = sock_write(client->con->sock, "HTTP/1.0 200 OK\r\n" "Content-Type: audio/x-mpegurl\r\n\r\n" "http://%s:%d%s\r\n", host, port, sourceuri ); i cant be sure tho if its being sent at all, what is the myme type for ogg vorbis? <p>Dave St John Mediacast1 Administration Need Support ? http://mediacast1.com/helpdesk ----- Original Message ----- From: "Geoff Shang" <gshang@pacific.net.au> To: <icecast-dev@xiph.org> Sent: Friday, April 02, 2004 1:40 AM Subject: Re: [icecast-dev] icecast2 ogg vorbis client request headers <p>> On Thu, 1 Apr 2004, Dave St John wrote:> > > That seems it may work, however the server adds the client (php proxyscript> > in this case) > > and does not disconnect it, however winamp does not recieve any audio,just> > sits there saying BUFFERING > > Dumb question maybe, but are you sending winamp the correct mMIME type? > > Geoff. > > --- >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.