Skip to main content
Skip table of contents

Schedule message playing in RetailPlayer using Icecast server

Using Icecast server, enabled/disabled through a script running on chron job, it's possible to schedule a stream played on RetailPlayer.

Configuring such stream on the URL of a Channel and the normal stream as Fallback URL, you can have a message played with interval, interrupting the main stream.

See below the configuration on the RetailPlayer portal.


Icecast server can be configured to stream a file when the listener is connected.

You can configure the message file that must be scheduled as fallback-mount, and, with a script running on chron job (1 minutes on this example), start and stop Icecast (in 15 secs in this example).

The stream is currently working, with "PLEASE KEEP DISTANCE" message (Corona advert), on:

http://streaming.eu.barix.com:8888/barix


Here the mount point configuration on Icecast server:

<mount>
<mount-name>/barix</mount-name>
<username>xxxx</username>
<password>xxxx</password>
<max-listeners>100</max-listeners>
<max-listener-duration>3600</max-listener-duration>
<dump-file></dump-file>
<intro></intro>
<fallback-mount>/message.mp3</fallback-mount>
<charset>ISO8859-1</charset>
<public>1</public>
<stream-name>My audio stream</stream-name>
<stream-description>My audio description</stream-description>
<stream-url>http://some.place.com</stream-url>
<genre>classical</genre>
<bitrate>64</bitrate>
<type>application/ogg</type>
<subtype>vorbis</subtype>
<hidden>1</hidden>
<burst-size>65536</burst-size>
<mp3-metadata-interval>4096</mp3-metadata-interval>
<!--
<authentication type="xxxxxx">
<option name="filename" value="myauth"/>
<option name="allow_duplicate_users" value="0"/>
</authentication>
-->
<on-connect>/home/icecast/bin/source-start</on-connect>
<on-disconnect>/home/icecast/bin/source-end</on-disconnect>
</mount>


Here the script:

#!/bin/bash
/etc/init.d/icecast2 start
sleep 15
/etc/init.d/icecast2 stop


Here crontab -e configuration:

*/1 * * * * /etc/cron.d/mess.h

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.