Streaming with icecast - SteamLUG/steamlug.org GitHub Wiki

Prerequisites

  • ices
    • emerge -av net-misc/ices in Gentoo
    • apt-get install ices in Debian/Ubuntu

Streaming

  • Save the code block in the bottom as ices.xml
  • Change the <password> directive accordingly.
  • Setup microphone loop via PulseAudio [FIXME]
  • Execute ices ices.xml in a terminal
  • Stream will now start and be available at http://live.steamlug.org:8000/stream.m3u
<?xml version="1.0"?>
<ices>

    <!-- run in background  -->
    <background>0</background>
    <!-- where logs go. -->
    <logpath>.</logpath>
    <logfile>ices.log</logfile>
    <!-- size in kilobytes -->
    <logsize>2048</logsize>
    <!-- 1=error, 2=warn, 3=infoa ,4=debug -->
    <loglevel>4</loglevel>
    <!-- logfile is ignored if this is set to 1 -->
    <consolelog>0</consolelog>

    <!-- optional filename to write process id to -->
    <!-- <pidfile>/home/ices/ices.pid</pidfile> -->

    <stream>
        <!-- metadata used for stream listing -->
        <metadata>
            <name>SteamLUG Cast Live Stream</name>
			<genre>Linux, Gaming, Podcast</genre>
            <description>SteamLUG Cast is a casual, fortnightly live audiocast held on the SteamLUG Mumble server which aims to provide interesting news and discussion for the SteamLUG and broader Linux gaming communities.</description>
			<url>https://steamlug.org/cast</url>
        </metadata>

        <!--    Input module.

            This example uses the 'oss' module. It takes input from the
            OSS audio device (e.g. line-in), and processes it for live
            encoding.  -->
        <input>
            <module>alsa</module>
            <param name="rate">44100</param>
            <param name="channels">2</param>
			<param name="device">pulse</param>
            <!-- Read metadata (from stdin by default, or -->
            <!-- filename defined below (if the latter, only on SIGUSR1) -->
            <param name="metadata">0</param>
            <param name="metadatafilename">test</param>
        </input>

        <!--    Stream instance.

            You may have one or more instances here.  This allows you to
            send the same input data to one or more servers (or to different
            mountpoints on the same server). Each of them can have different
            parameters. This is primarily useful for a) relaying to multiple
            independent servers, and b) encoding/reencoding to multiple
            bitrates.

            If one instance fails (for example, the associated server goes
            down, etc), the others will continue to function correctly.
            This example defines a single instance doing live encoding at
            low bitrate.  -->

        <instance>
            <!--    Server details.

                You define hostname and port for the server here, along
                with the source password and mountpoint.  -->

            <hostname>steamlug.org</hostname>
            <port>8000</port>
            <password>YOUSHOULDKNOWTHIS</password>
            <mount>/stream</mount>
            <yp>1</yp>   <!-- allow stream to be advertised on YP, default 0 -->

            <!--    Live encoding/reencoding:

                channels and samplerate currently MUST match the channels
                and samplerate given in the parameters to the oss input
                module above or the remsaple/downmix section below.  -->

            <encode>  
                <quality>10</quality>
                <samplerate>44100</samplerate>
                <channels>2</channels>
            </encode>

            <!-- stereo->mono downmixing, enabled by setting this to 1 -->
            <downmix>1</downmix>

            <!-- resampling.
            
                Set to the frequency (in Hz) you wish to resample to, -->
             
<!--            <resample>
                <in-rate>44100</in-rate>
                <out-rate>22050</out-rate>
            </resample> -->
        </instance>

    </stream>
</ices>
⚠️ **GitHub.com Fallback** ⚠️