Skip to content

Instantly share code, notes, and snippets.

@Lax
Forked from schaerli/Icecast-mp3.md
Created December 9, 2018 03:16
Show Gist options
  • Select an option

  • Save Lax/3d7abd7f59b0357612c7d1a25d9bc5aa to your computer and use it in GitHub Desktop.

Select an option

Save Lax/3d7abd7f59b0357612c7d1a25d9bc5aa to your computer and use it in GitHub Desktop.

This is a quick set-up guide on how to install Icecast for Mp3 and Ogg streaming, sort of online radio. Tested on Debian Wheezy. Probably works on Ubuntu, etc. Icecast is a "server-like". It offers the HTTP URL/port through which end-users can play the media. However, Icecast itself does not serve the files. It must get its input from other "client-like" software. For example, Ices0 sends mp3 input to Icecast and then Icecast delivers to the end user. Similarly, Ices2 sends ogg input to Icecast and then Icecast delivers to the end user.

Set up icecast

Start by installing:

sudo apt-get install icecast2

It will ask for 3 passwords. Give them whatever you want. The stream password is something that will be later needed by Ices, so remember that. The domain name must be the one which you want your users to connect to. Same with port number. After installation, you must manually set the 3 passwords again in /etc/icecast2/icecast.xml. Similarly edit hostname and port in the same file. After that edit /etc/default/icecast2 to enable the daemon and finally:

sudo service icecast2 restart

Then open your web browser to http://hostname:port/. The administrator interface username is admin and password is whatever you set in icecast.xml.

Ogg streaming with Ices2

Start by installing:

sudo apt-get install ices2

Create some directory where you'll store your Oggs for streaming. Copy the sample config. (All commands run as root).

mkdir /var/log/ices
mkdir $HOME/music
cd $HOME/music
cp /usr/share/doc/ices2/examples/ices-playlist.xml .

Now edit these important entries in ices-playlist.xml:

<param name="file">/home/user/music/playlist.txt</param> <!-- The list of oggs will be from this playlist -->

<hostname>localhost</hostname>  <!-- must be localhost, else won't work! -->

References

  1. Setting up Icecast2 on Debian

  2. Streaming MP3s with Icecast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment