How to Make a Radio Stream in Ubuntu
If you want to share your music with the world or just have it available to you over a remote connection, you can create a radio stream with Ubuntu, Icecast2 and Ices2. Icecast2 is a server application for streaming Ogg Vorbis (.ogg) and MP3 (.mp3) files. Ices2 provides the audio stream to the server. Icecast2 and Ices2 are available for Linux, FreeBSD, OpenBSD and Solaris. The binary packages for Ubuntu can be downloaded via the Synaptic Package Manager.
Instructions
-
Configure Icecast2
-
1
Install the Icecast2 software through the Synaptic Package manager or from the command line with the command "sudo apt-get install icecast2 ices2".
-
2
Open a Terminal Window. The Terminal window will be found in the operating system's main "Application" menu, under the "Accessories" submenu. You will be presented with a command prompt where you will type the following commands.
-
-
3
Type the command "sudo gedit /etc/icecast2/icecast.xml" to open the "icecast.xml" file.
-
4
Change the "source-password" and the "admin-password" in the "<authentication>" section. The source-password is the password used to connect to the Icecast2. The admin-password is used by the admin to access the Icecast2 web interface.
-
5
Type "sudo gedit /etc/default/icecast2" to open the Icecast2 file.
-
6
Edit the last line in the file to read "ENABLE=true". Save and close the file.
-
7
Type the command "/etc/init.d/icecast2 start" to start the Icecast2 daemon.
-
8
Open a web browser and type "http://localhost:8000" in the address bar to test the configuration.
Configure Ices2
-
9
Type the command "sudo mkdir /var/log/ices /etc/ices2 /etc/ices2/music" to create the directories needed to run Ices2.
-
10
Type the command "sudo cp /usr/share/doc/ices2/examples/ices-playlist.xml /etc/ices2" to create the default configuration file.
-
11
Type the command "sudo gedit /etc/ices2/ices-playlist.xml" to open the configuration file.
-
12
Change the number "0" to "1" in the "<background>0<background>" section. Edit the "<metadata>...<metadata>" section to reflect your music. Edit the "<param name="file">/etc/ices2/playlist.txt</param>" to reflect the path to your playlist. Edit the "<password>hackme</password>" to reflect the source password from Icecast2.
Add Music
-
13
Type the command "sudo mv example1.ogg example2.ogg /etc/ices2/music" to move your music to the Ices2 music directory.
-
14
Type the command "sudo touch /etc/ices2/playlist.txt" to create the playlist.txt file.
-
15
Type the command "sudo gedit "/etc/ices2/playlist.txt" to open the blank file. Add each song to the playlist, one line per song in the form:
/etc/ices2/music/example1.ogg
/etc/ices2/music/example2.ogg
Save and close the file. -
16
Type the command "sudo ices2 /etc/ices2/ices-playlist.xml" to start the stream.
-
17
Refresh the Icecast2 web page and test your stream by clicking on it.
-
1