How to configure an Icecast2 server
Contents
SERVER radio.dyne.org
Vatti a leggere gli appunti su come si entra e le password di streaming, hai un howto nella home del tuo portatile, dioporco
Fallback structure
We have different mountpoints, for streaming and listening.
radiocybernet-archive.mp3, 24/7 streaming of all our archive since 1997
rcyblive.mp3, streaming point from a base station, usually a PC
rcybcell.mp3, streaming point from a cellular phone!
radiocybernet.mp3, THIS IS THE MOUNT POINT FOR LISTENERS: THEY CONNECT HERE TO LISTEN!
rcyb.mp3, this is an OLD MOUNTPOINT for users. Here it is for historical purposes, because many old links on internet connect here.
So, rcyb.mp3, the old link, falls back on radiocybernet.mp3, the correct listening link. He falls back on rcybcell.mp3, if exist - it means that somebody is streaming from the street, it's a sort of emergency live broadcast so it has priority. If cellular phone stream is not online, it falls back over rcyblive.mp3, that is a source coming from a base station, usually a studio, a PC, whatever. If this also is not working, it falls back on radiocybernet-archive.mp3, that is the historical 24/7 streaming of everything we did since 1997. (If the historical streaming is not working, WELL, SOMETHING IS REALLY FUCKED UP)
Basic & fallback configuration
You just have to set up icecast.xml as usual, and add those things after the <relay> section (don't touch the relay shit, you usually don't need them):
<!-- settaggi mount per radiocybernet e suo fallback FUNZIOOOOONAAAAAAAAAAAAAAAAAAAHHHHH!!!!!!! --> <!-- Historical 24/7 radio cybernet archive used as fallback --> <mount> <mount-name>/radiocybernet-archive.mp3</mount-name> <hidden>0</hidden> </mount> <!-- mountpoint of any fixed streaming point (a pc) --> <mount> <mount-name>/rcyblive.mp3</mount-name> <username>xxxxxxxxxxxx</username> <password>yyyyyyy</password> <intro>./announce-radiocybernet.mp3</intro> <fallback-mount>/radiocybernet-archive.mp3</fallback-mount> <hidden>0</hidden> </mount> <!-- Mountpoint for live streaming from a cellular phone! fallback to fixed streaming mountpoint above. --> <mount> <mount-name>/rcybcell.mp3</mount-name> <username>qqqqqqqqqqq</username> <password>wwwwwwwwwwwww</password> <intro>./announce-radiocybernet.mp3</intro> <fallback-mount>/rcyblive.mp3</fallback-mount> <hidden>0</hidden> </mount> <!-- MAIN MOUNTPOINT FOR LISTENERS. This goes to cellular phone streaming, if exist. if not, falls back to PC mountpoint, if exist. If not, fallback to 24/7 historical streaming. --> <mount> <mount-name>/radiocybernet.mp3</mount-name> <intro>./announce-radiocybernet.mp3</intro> <fallback-mount>/rcybcell.mp3</fallback-mount> <!-- <fallback-override>1</fallback-override> a che cazzo serve PORCODIO NON SI CAPISCE DIOCANE --> <hidden>0</hidden> </mount> <!-- For historical reasons, a lot of internet links point to this old mountpoint. --> <mount> <mount-name>/rcyb.mp3</mount-name> <intro>./announce-radiocybernet.mp3</intro> <fallback-mount>/radiocybernet.mp3</fallback-mount> <hidden>1</hidden> </mount> <!-- mountpoint for trasformatorio.mp3 with fallback. Fallback come from zaverio.com (asbesto) using liquidsoap --> <mount> <mount-name>/trasformatorio-archives.mp3</mount-name> <hidden>0</hidden> </mount> <mount> <mount-name>/trasformatorio.mp3</mount-name> <fallback-mount>/trasformatorio-archives.mp3</fallback-mount> <fallback-override>1</fallback-override> <hidden>0</hidden> </mount>
TODO
- check the connected users problem (see below)
Icecast web page tweaks
To add a "CLICK HERE TO LISTEN" link and an embedded player for EVERY format (mp3, ogg, etc) instead of ogg only!
Edit status.xsl:
<ul class="mountlist"> <!-- LINK PER ASCOLTO SU QUALSIASI MOUNTPOINT, CRISTAZZO --> <li><a class="play" href="{@mount}">CLICK HERE TO LISTEN</a></li> <li><a class="play" href="{@mount}.m3u">M3U</a></li> <li><a class="play" href="{@mount}.xspf">XSPF</a></li> </ul> </xsl:otherwise> </xsl:choose> </div> </div> <div class="mountcont"> <!-- FANCULO AL CONTROLLO SE E' SOLO UN CAZZO DI FILE .OGG DI MERDA <xsl:if test="server_type and ((server_type = 'application/ogg') or (server_type = 'audio/ogg') or (server_type = 'application/mp3') or (server_type = 'audio/mp3'))"> --> <div class="audioplayer"> <audio controls="controls" preload="none"> <source src="{@mount}" type="{server_type}" /> </audio> </div> <!-- FANCULOOOOO!!! PLAYERS PER TUTTI!!! </xsl:if> -->
Paths and intro files, mp3 etc.
Path configuration for the internal icecast2 web server:
<webroot>/usr/share/icecast2/web</webroot>
if chroot is not configured (look at the end of icecast.xml), then you place your mp3 files there!
root@irc2:/etc/icecast2# cd /usr/share/icecast2/web/ root@irc2:/usr/share/icecast2/web# ls . icecast.png status-json.xsl xml2json.xslt .. icecast.png.old status.xsl announce-radiocybernet.mp3 key.png style.css auth.xsl server_version.xsl tunein.png root@irc2:/usr/share/icecast2/web#
Graphics is also here, for tweaking.
announce-radiocybernet.mp3 is an intro file, you set it in a <mount> section, for example:
<intro>./announce-radiocybernet.mp3</intro>
look up!
Problems
connected users don't show in icecast server info page. they show on the last fallback but sometime don't. This seem to be related to hidden mountpoints! People on icecast IRC channel says this is "normal".
- Fallback work only if all streams use the same bitrate (e.g. 128kbps)!!! If not, fallback hangs / slow down / fuck up.