Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Disconnect a source
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
comedown



Joined: 17 Oct 2008
Posts: 18

PostPosted: Mon Oct 27, 2008 3:31 pm    Post subject: Disconnect a source Reply with quote

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
View user's profile Send private message Send e-mail
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Oct 27, 2008 5:58 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
comedown



Joined: 17 Oct 2008
Posts: 18

PostPosted: Tue Oct 28, 2008 3:02 pm    Post subject: Reply with quote

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 Razz

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 Crying or Very sad

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
View user's profile Send private message Send e-mail
comedown



Joined: 17 Oct 2008
Posts: 18

PostPosted: Thu Oct 30, 2008 1:59 pm    Post subject: Reply with quote

UP Very Happy
Back to top
View user's profile Send private message Send e-mail
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Oct 30, 2008 6:34 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
comedown



Joined: 17 Oct 2008
Posts: 18

PostPosted: Thu Oct 30, 2008 7:09 pm    Post subject: Reply with quote

Ok, this is not a big problem.

Can i force stream data to the relay as i do with mount point?
Back to top
View user's profile Send private message Send e-mail
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Oct 30, 2008 7:30 pm    Post subject: Reply with quote

mount definitions apply to relays as they do with source clients

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
comedown



Joined: 17 Oct 2008
Posts: 18

PostPosted: Fri Oct 31, 2008 1:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Oct 31, 2008 2:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
comedown



Joined: 17 Oct 2008
Posts: 18

PostPosted: Fri Oct 31, 2008 3:37 pm    Post subject: Reply with quote

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 Razz

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
View user's profile Send private message Send e-mail
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Oct 31, 2008 4:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
comedown



Joined: 17 Oct 2008
Posts: 18

PostPosted: Fri Oct 31, 2008 4:22 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Oct 31, 2008 4:28 pm    Post subject: Reply with quote

max-listeners is a <mount> setting, not a <relay> setting.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
comedown



Joined: 17 Oct 2008
Posts: 18

PostPosted: Fri Oct 31, 2008 4:32 pm    Post subject: Reply with quote

Yes i know.

So, how can i limit relay's listeners?
Back to top
View user's profile Send private message Send e-mail
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Oct 31, 2008 5:00 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber