| View previous topic :: View next topic |
| Author |
Message |
andyb2000
Joined: 06 Aug 2006 Posts: 5 Location: North-East, UK
|
Posted: Thu Aug 10, 2006 6:46 am Post subject: Stream listener-on-connect |
|
|
Hi All,
Have done a search and couldn't see any discussions on this. I'd like to do a bit more reporting when clients connect, etc.
Ideally i'm going to log to MySQL but for the moment, launching an external script is ideal (keeps the MySQL overhead out of Icecast2).
Is there a way, when a listener connects to launch a script and pass:
IP address, mountpoint and any client info icecast2 sees?
I'm looking at the source, and think I can hack something into the source, but wanted to check if this is possible/anyone already has a patch!
Cheers guys. _________________ Andy
http://www.thebmwz3.co.uk/ |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Aug 10, 2006 3:12 pm Post subject: |
|
|
Use the url listener authentication. You may allow anyone to connect, but allows you to get those details into something external.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Thu Aug 10, 2006 9:25 pm Post subject: |
|
|
I haven't researched it completely; but using URL Authentication seems to bork Windows Media clients on my mp3 streams. It seems unable to deal with the slight delay.
It's not Icecast's fault; but it is something to watch out for... |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Aug 10, 2006 10:18 pm Post subject: |
|
|
You might have to return a valid listener response first, and leave the actual sql work to continue in the background. And yes, WMP does seem to have problems.
karl. |
|
| Back to top |
|
 |
andyb2000
Joined: 06 Aug 2006 Posts: 5 Location: North-East, UK
|
Posted: Fri Aug 11, 2006 7:01 am Post subject: |
|
|
I setup the auth on both my streams, ogg and mp3 and both seem to work fine via winamp and windows media player without issues.
One issue I'm having though is the listener_remove because this is not passing back an IP or identifier, so tying up which listener_add relates to which listener_remove.
I'm going to do further tests today to dump all env variables to see if there is anything I'm missing. _________________ Andy
http://www.thebmwz3.co.uk/ |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Aug 11, 2006 4:15 pm Post subject: How you can do this... |
|
|
THere is another way , is to parse to access log to find when someone connects.
This can be parsed at regular times..
Also if you want o colect the infomation from the who connected list.
I not looked into the logs really close yet, mainly i can get the infomation i need by capturing the client list on a cron. and posting this to the mysql.
I been working on a program to control multible serves and gaver stat on each. and finging taht using authication will balk alot, even with a fast turn around. I would return a valid user at the very start of the script and still have dropage on client side.
so with playing with both way i seetle down to a granuality of about 5 min on clients and use log parsing to see how many atemped connectiosn there was.
With my current set up i poll 4 icecast servers for mount information and client information once ever 5 min and able at any time report back who is connected and how many conectiosn there is.
for retime connections use the log, it more reliable and does not crunch the client. for polled use the clinent list(eitehr html or xml) |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Aug 11, 2006 8:16 pm Post subject: |
|
|
| andyb2000 wrote: |
I setup the auth on both my streams, ogg and mp3 and both seem to work fine via winamp and windows media player without issues.
One issue I'm having though is the listener_remove because this is not passing back an IP or identifier, so tying up which listener_add relates to which listener_remove.
I'm going to do further tests today to dump all env variables to see if there is anything I'm missing. |
The problem with wmp maybe fixed in some version but I don't have any information on that. With both listener_add and listener_remove the client= param can be used for reference.
karl. |
|
| Back to top |
|
 |
|