Always wanted to set up your own radio station? Well, with the Icecast broadcasting system, you can set up a multi-channel radio station on your home or office network. The best part? You get to pick the tracks.
Streaming music to the server is handled by iceS, the source client. You may remember that you already compiled and installed this component a couple pages back -- now, all that's left is to use it. The first step in doing so is to build a playlist of tracks to be streamed to the server. This playlist is nothing but a plain text file containing absolute paths to the various audio files (OGG and MP3 files, in this case) to be streamed to the server, one per line. Here's what it might look like:
If you have a large collection of audio files, the quickest way to create this file is to pipe the output of ls into a text file, as below:
$ ls -1 /my/files/*.ogg > playlist.txt
Once you've got the playlist created, hand it over to iceS to begin streaming the respective files, like this:
$ /usr/local/icecast/bin/ices -h olympus.local.net -p 8000 -P abcdef -F /tmp/playlist.txt -m 80s -n "Local OGG Stream" -g "80s Stuff" -d "Good ol' pop, rock and jazz" -v -t http & Logfile opened DEBUG: Sending following information to libshout: DEBUG: Stream: 0 DEBUG: Host: olympus.local.net:8000 (protocol: http) DEBUG: Mount: /80s, Password: abcdef DEBUG: Name: Local OGG Stream URL: http://www.icecast.org/ DEBUG: Genre: 80s Stuff Desc: Good ol' pop, rock and jazz DEBUG: Bitrate: 128 Public: 1 DEBUG: Dump file: (null) DEBUG: Initializing playlist handler... DEBUG: Initializing builting playlist handler... DEBUG: Builtin playlist handler serving: /tmp/track11.ogg DEBUG: Filename cleaned up from [/tmp/track11.ogg] to [track1] Playing /tmp/track11.ogg Mounted on http://olympus.local.net:8000/80s DEBUG: Delaying metadata update... DEBUG: Updated metadata on 80s to: track1 DEBUG: Updated metadata on 80s to: track1
At this point, your audio file should be available as a stream to any interested listener. On the next page, I'll show you how to listen to what's playing...but first, a quick explanation of the various options to iceS on the command line above:
If you're sharp-eyed, you'll notice that my command line above includes an additional, undocumented parameter -- the -t parameter, which tells ices what protocol to use when communicating with the icecast server. For some reason, this option is missing from the help text displayed by iceS; expect this to be corrected in a future version of the application.
You can also have iceS read these values from a configuration file, instead of specifying them on the command line. Consider the following configuration file, which is equivalent to the command options above: