[Icecast] source switching using two servers.

Stephen Jones smj at cirr.com
Sun Aug 2 23:22:56 UTC 2015


Hello, 

I'm trying to get some automated stream switching between a handful of sources on a private icecast server to one public icecast server relaying one of the sources depending on the time of day, updated by a script.
The private server is for the handful of sources to test their stream, monitor and such.

both the private and public icecast config files are fairly straight forward. 

The private one has mounts that look like this:

<mount type="normal">
	<mount-name>/robot</mount-name>
	<username>robot</username>
	<password></password>
	<max-listeners>3</max-listeners>
	<charset>utf-8</charset>
</mount>

<mount type="normal">
	<mount-name>/dj1</mount-name>
	<username>dj1</username>
	<password></password>
	<max-listeners>3</max-listeners>
	<fallback-mount>/robot</fallback-mount>
	<fallback-override>1</fallback-override>
</mount>
	
<mount type="normal">
	<mount-name>/dj2</mount-name>
	<username>dj2</username>
	<password></password>
	<max-listeners>3</max-listeners>
	<fallback-mount>/robot</fallback-mount>
	<fallback-override>1</fallback-override>
</mount>

<mount type="normal">
	<mount-name>/dj3</mount-name>
	<username>dj3</username>
	<password></password>
	<max-listeners>3</max-listeners>
	<fallback-mount>/robot</fallback-mount>
	<fallback-override>1</fallback-override>
</mount>

The public server looks like this:

<relay>
<server>192.94.73.31</server>
<port>8010</port>
<mount>/robot</mount>
<local-mount>/public</local-mount>
<username>relay</username>
<password></password>
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
<on-demand>0</on-demand>
</relay>


That section gets updated by a script where the <mount> is set to whatever stream is up at that particular time.  A kill -HUP is set to the public icecast process and for the most part, this has been working great to switch relayed sources.
However, what seems to happen from time to time is that one of the streams on the private server will be switched to when the robot is streaming even if the <mount> section in the public server is set to robot.  

Is there another way (or a more correct way?) for me to do what I am trying to do?


More information about the Icecast mailing list