Icecast & IceS

Icecast is a streaming media project released as free software maintained by the Xiph.org Foundation. It also refers specifically to the server program which is part of the project. [...] It uses external programs, called "source clients", to originate the streams, and the Icecast project includes a source client program known as IceS. (Source: Wikipedia)

Note
Icecast & IceS have already been added to the PHP Installer and this guide should only be consulted if you want to learn how to set them up manually.

So you want to change your e-TRAYz into a radio station which streams your MP3s to the network for your PC or Xtreamer? Easy job! The Xtreamer can handle MP3 radio stations and two ipkg packages, namely "icecast" and "ices0" will do the rest.


Install packages

Login as "root" and type:

/opt/bin/ipkg update
/opt/bin/ipkg install icecast
/opt/bin/ipkg install ices0

Create playlist

The playlist.txt is a plain textfile containing full paths to MP3 files. Let's assume you have your MP3 files in the e-TRAYz public folder "Music(iTunes)" which is there by default. You can trigger a search for MP3 files and write the results directly into the playlist.txt with this command:

find /home/Public/Music\(iTunes\)/ | grep .mp3 > /home/Public/playlist.txt
This command will search ALL your MP3s and put them together into ONE playlist file. Optionally you can edit the playlist.txt file afterwards to remove MP3s which should not be "aired" on radio.

Configure streaming server

/opt/bin/mcedit /opt/etc/icecast.xml

In this config file you should at least edit the following values:

<source-password>CHOOSE_PASSWORD</source-password>
<port>CHOOSE_PORT</port>

Remember the password and the port for later. Now you need to create a directory for logfiles and make it writable:

mkdir /opt/var
mkdir /opt/var/log
mkdir /opt/var/log/icecast
chmod 777 /opt/var/log/icecast

Et voilà... the server is ready to serve:

sudo -u sysadmin icecast -b -c /opt/etc/icecast.xml

Configure broadcasting client

sudo -u sysadmin mkdir /home/sysadmin/.ices
cp /opt/etc/ices.conf.dist /opt/etc/ices.conf
/opt/bin/mcedit /opt/etc/ices.conf

Here you should at least edit the values like this:

<File>/home/Public/playlist.txt</File>
<Background>1</Background>
<BaseDirectory>/home/sysadmin/.ices</BaseDirectory>
<Port>PORT_YOU_CHOSE_BEFORE</Port>
<Password>PASSWORD_YOU_CHOSE_BEFORE</Password>

Now let's start the client:

sudo -u sysadmin ices -B

Create .plsx playlist file for Xtreamer

At this point your stream is available in the network and you could listen to it with Winamp for instance (open Winamp, hit CTRL+L, enter the URL http://<your e-TRAYz IP>:<PORT>/ices and you're good to go). But you want to listen to it on your Xtreamer? Then you need a .plsx file which can be opened by Xtreamer.

Basically the content of that file looks like this:

[playlist]
File1=http://<your e-TRAYz IP>:<PORT>/ices
Title1=e-TRAYz Radio
NumberOfEntries=1
Length1=-1
Version=2

Save it (preferably in the "MyRadio" folder on your internal HDD) with .plsx extension to any place which can be accessed by your Xtreamer and enjoy your own radio stream powered by e-TRAYz.