| View previous topic :: View next topic |
| Author |
Message |
comedown
Joined: 17 Oct 2008 Posts: 18
|
Posted: Mon Oct 27, 2008 3:31 pm Post subject: Disconnect a source |
|
|
Hi guys,
at the end i decided to use a Win2k3 server for my IceCast2 installation.
Now i have IceCast2 + Winamp + EdCast on my windows vps.
When i'm streaming from the playlist all works fine.
The problem is when i need to stream from my pc. Icecast doesn't allow more than one source for each mountpoint so, before connecting to the server from my pc i need to stop edcast on the server. This works very fine.
But i need to do this automatically, whit the windows scheduler. Practically i need to disconnect the local source (killing the process, banning the source i dont know) to make possible to the remote source to connect.
The only idea i have at the moment is to kill the edcast process and then restart it (it will try to connect to the server every 5 seconds, and it will connect only when i stop streaming from my pc).
Any other advice? Can i disconnect (and reconnect) a source client from IceCast?
I think i can also connect from my pc to another mountpoint and then move listeners to it, but i dont think that's a good idea.
Thanks.
Last edited by comedown on Tue Oct 28, 2008 4:13 pm; edited 1 time in total |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Oct 27, 2008 5:58 pm Post subject: |
|
|
If you don't want to use a fallback to move listeners then use a simple 3 mountpoint setup. An example of this is if you want the a mountpoint to still register on the directory. eg A is what the listeners connect to, B is what one source client connects on and C is what the other source client connects on.
A is a relay of the always on mountpoint eg C
B fallback overrides C
A becomes a copy of C until you connect on B, at which point A become a copy of B. Whether you stop C when B is active is up to you.
karl. |
|
| Back to top |
|
 |
comedown
Joined: 17 Oct 2008 Posts: 18
|
Posted: Tue Oct 28, 2008 3:02 pm Post subject: |
|
|
Thanks KarlH.
I'm sorry for my coninuos questions, but i think i'm working on something that nobody have ever used before. I think i'll write down a tutorial for other users whic wants to create a webradio only with free software in windows (in linux it's the simpliest thing i've ever done).
I can't understand very well your solution. Can you please give me the config.xml file?
Thankyou
Ps: Yesterday evening i've found another solution: i can simply kill the source from the IceCast2 Web Interface and before the playlist source reconnects to the server i can connect from my pc to the mount point. Anyway, that's not a so good idea.
EDIT: Ok i've tried whit this configuration but it doesn't seems to be working.
| Quote: |
<mount>
<mount-name>/live.mp3</mount-name>
<username>source</username>
<password>123456</password>
<fallback-mount>/schedule.mp3</fallback-mount>
<fallback-override>1</fallback-override>
<max-listeners>25</max-listeners>
<charset>ISO8859-1</charset>
<public>1</public>
<stream-name>Live Radio!</stream-name>
<stream-description>La nostra radio, in diretta per te!</stream-description>
<stream-url>http://live.rd.quellidellae.com/</stream-url>
<genre>Indefinito</genre>
<bitrate>128</bitrate>
</mount>
<relay>
<server>127.0.0.1</server>
<port>8000</port>
<mount>/schedule.mp3</mount>
<local-mount>/listen.mp3</local-mount>
<username>source</username>
<password>123456</password>
<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
<on-demand>0</on-demand>
</relay>
<mount>
<mount-name>/schedule.mp3</mount-name>
<username>source</username>
<password>123456</password>
<max-listeners>25</max-listeners>
<charset>ISO8859-1</charset>
<public>1</public>
<stream-name>Live Radio!</stream-name>
<stream-description>La nostra radio, in diretta per te!</stream-description>
<stream-url>http://live.rd.quellidellae.com/</stream-url>
<genre>Indefinito</genre>
<bitrate>128</bitrate>
</mount> |
EDIT:
It was a little error in the configuration file.
Now it works fine.
Now i have another problem
How can i send stream data (name, description website) to the relay? I tried to put these in the realy config but it continues showing default data. Maybe i can make the realy taking datas from the mountpoint it's relaing?
I tried to put them in the config of edcast that's streaming to the schedule.mp3 mountpoint and the relay uses this data (also when schedule.mp3 is streaming live.mp3), but i need to put them in the configuration file and that they can change if listen.mp3 is streaming the live.mp3 mp or the schedule.mp3 mp.
Last edited by comedown on Thu Oct 30, 2008 1:01 pm; edited 1 time in total |
|
| Back to top |
|
 |
comedown
Joined: 17 Oct 2008 Posts: 18
|
Posted: Thu Oct 30, 2008 1:59 pm Post subject: |
|
|
UP  |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Oct 30, 2008 6:34 pm Post subject: |
|
|
The relay doesn't see the new http details over fallback as those only occur at the initial connection. The only way at the moment is to restart the relay connection to get new headers but that won't fit in well to the setup described. In theory the association between the streams could be defined better for local relay case allowing for those http details to be transferred easily but that isn't currently available.
karl. |
|
| Back to top |
|
 |
comedown
Joined: 17 Oct 2008 Posts: 18
|
Posted: Thu Oct 30, 2008 7:09 pm Post subject: |
|
|
Ok, this is not a big problem.
Can i force stream data to the relay as i do with mount point? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Oct 30, 2008 7:30 pm Post subject: |
|
|
mount definitions apply to relays as they do with source clients
karl. |
|
| Back to top |
|
 |
comedown
Joined: 17 Oct 2008 Posts: 18
|
Posted: Fri Oct 31, 2008 1:41 pm Post subject: |
|
|
| So the relay has to take stream name and description from the mp that's relayng, but it seems not to be working... |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Oct 31, 2008 2:26 pm Post subject: |
|
|
As I've already said, the stream name and description that is sent to listeners of the relay is only provided when the relay connects, they don't get any updates mid stream (think http header updates mid-download of a file). The mount settings for those details are for directory and stats and where introduced to deal with inactive on demand relays not as an override of source client content. I've said as well that if the stream name/description is to update then there needs to be a closer tie in but that has issues for directory updates.
karl. |
|
| Back to top |
|
 |
comedown
Joined: 17 Oct 2008 Posts: 18
|
Posted: Fri Oct 31, 2008 3:37 pm Post subject: |
|
|
| Quote: |
| The mount settings for those details are for directory and stats and where introduced to deal with inactive on demand relays not as an override of source client content. |
Ok this wa the missing point
Maybe i haven't understood anything, but i have also a problem whit max_listeners: in the icecast admin page i can see
| Quote: |
| max_listeners unlimited |
Altough in the relay configuration i've added the
| Quote: |
| <max-listeners>25</max-listeners> |
value.
Thanks KarlH.
ComeDown |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Oct 31, 2008 4:20 pm Post subject: |
|
|
The 2 usual reasons for this are typo (that looks ok though) or not defined. The not not defined case could be down a mountpoint name mismatch or commented out <mount> section. loading the xml into a browser should help to identify commented sections.
karl. |
|
| Back to top |
|
 |
comedown
Joined: 17 Oct 2008 Posts: 18
|
Posted: Fri Oct 31, 2008 4:22 pm Post subject: |
|
|
I haven't any mount section for my listen.mp3 relay.
Do i also have to create a mountpoint whit the same name of the relay local-mountpoint? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Oct 31, 2008 4:28 pm Post subject: |
|
|
max-listeners is a <mount> setting, not a <relay> setting.
karl. |
|
| Back to top |
|
 |
comedown
Joined: 17 Oct 2008 Posts: 18
|
Posted: Fri Oct 31, 2008 4:32 pm Post subject: |
|
|
Yes i know.
So, how can i limit relay's listeners? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Oct 31, 2008 5:00 pm Post subject: |
|
|
as I've already said, mount setting apply to both relays and source clients amd ,ac listeners is a mount setting so define a mount section for the local mount for the relay and specify the max listeners in that.
karl. |
|
| Back to top |
|
 |
|