Differences between revisions 1 and 2
Revision 1 as of 2020-03-16 15:46:49
Size: 7024
Editor: asbesto
Comment:
Revision 2 as of 2020-03-16 16:40:06
Size: 7931
Editor: asbesto
Comment:
Deletions are marked like this. Additions are marked like this.
Line 80: Line 80:
        <intro>./announce-radiocybernet.mp3</intro>         <intro>./announce-radiocybernet.mp3</intro> <!-- look down for intro / path details -->
Line 89: Line 89:
Line 94: Line 93:
Line 145: Line 143:
== Paths and intro files, mp3 etc. ==
Line 146: Line 145:
=== Problems === 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 ==

How to configure an Icecast2 server

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 LISTENING LINK FOR USERS: THEY CONNECT HERE

  • rcyb.mp3, this is an OLD listening link for users. Here it is for historical purposes, because of many old links on internet.

rcyb.mp3, the old link, falls back on radiocybernet.mp3, the correct listening link. He falls back on rcybcell.mp3, if exist - somebody is streaming from the street, it's a sort of emergency live broadcast so it has priority...if cell stream is not online, it falls back over rcyblive.mp3, that is a streaming coming from a base station. 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 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!!!!!!! -->

<!-- Questo e' lo stream storico 24/7 di radio cybernet
     usato come fallback!!! parte da zaverio.com (asbesto)
     ed usa liquidsoap. -->
<mount>
        <mount-name>/radiocybernet-archive.mp3</mount-name>
        <hidden>0</hidden>
</mount>

<!-- questo e' il mountpoint dove si dovrebbe strimmare
     in diretta!!!!! In modo che chi ascolta da quello sotto
     (radiocybernet se non c'e' diretta da cellulare, altrimenti
     ascoltera' rcybcell.mp3 se c'e' trasmissione dal telefono)
     va in fallback qui, e se non c'e' la diretta, qui va in
     fallback sugli archivi. -->
<mount>
        <mount-name>/rcyblive.mp3</mount-name>
        <intro>./announce-radiocybernet.mp3</intro>
        <fallback-mount>/radiocybernet-archive.mp3</fallback-mount>
        <fallback-override>1</fallback-override>
        <hidden>1</hidden>
</mount>

<!-- Mountpoint per streaming improvviso dal CELLULARE, in
     emergenza! Ascoltatori su radiocybernet.mp3 ascoltano questo
     stream; se questo non c'e', ascoltano rcyblive.mp3, che e'
     una normale trasmissione da casa in diretta; se non c'e',
     ascoltano l'archivio storico. SE NON C'E' VAFFANCULO PORCODDIO -->
<mount>
        <mount-name>/rcybcell.mp3</mount-name>
        <intro>./announce-radiocybernet.mp3</intro>
        <fallback-mount>/rcyblive.mp3</fallback-mount>
        <fallback-override>1</fallback-override>
        <hidden>1</hidden>
</mount>

<!-- Questo stream e' dove gli ascoltatori si ATTACCANO AL CAZZO
     E ASCOLTANO la trasmissione LIVE, SE C'E', ALTRIMENTI
     FELLA SU SEMPREONLINE! NON SI STRIMMA QUI SOPRA
     LO STREAM VA FATTO SU rcyblive.mp3 se si e' da casa o computer
     oppure rcybcell.mp3 se si e' da telefono! -->
<mount>
        <mount-name>/radiocybernet.mp3</mount-name>
        <intro>./announce-radiocybernet.mp3</intro>
        <fallback-mount>/rcybcell.mp3</fallback-mount>
        <fallback-override>1</fallback-override>
        <hidden>0</hidden>
</mount>

<!-- questo per compatibilita' col passato, punta
     a quello nuovo (radiocybernet) che punta al fallback. -->
<mount>
        <mount-name>/rcyb.mp3</mount-name>
        <intro>./announce-radiocybernet.mp3</intro> <!-- look down for intro / path details -->
        <fallback-mount>/radiocybernet.mp3</fallback-mount>
        <fallback-override>1</fallback-override>
        <hidden>1</hidden>
</mount>

<!-- mountpoint di trasformatorio.mp3 con fallback.
     lo stream di fallback parte da zaverio.com (asbesto)
     ed e' fatto con 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

  • Add passwords to streaming points, live and cell?
  • 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!
  • Fallback work only if all streams use the same bitrate (e.g. 128kbps)!!! If not, fallback hangs / slow down / fuck up.


CategoryMuseo

IcecastServer (last edited 2023-12-08 13:45:04 by asbesto)