Shoutcast

Shoutcast provides users with simple server, which can be used to stream audio (and video). (For an open source alternative see Icecast.) There are two types of users: broadcasters and listeners. The broadcaster can provide the Shoutcast server with data required for streaming, while the listener can connect ot the server and listen to what the broadcasters are providing.

For Shoutcast server you need the latest build of Shoutcast available. For providing shoutcast with the required data to broadcast you need software aswell, for linux it is called shoutcast_trans. Both packages are not available for emerging from gentoo-portage and have to be downloaded.

Downloading Shoutcast
Current version of Shoutcast server available is 1.9.8 (as of 2008-11-12). The package in gentoo-portage is called shoutcast-server-bin but is not available for downloading and has to be downloaded from shoutcast.com and the file. will provide us with following error, leading to wrong download page: therefore we need to download the package, place it into the distfiles and run emerge again
 * 1) emerge shoutcast-server-bin

Setting up Shoutcast
After emerge finishes without errors, the configuration will be stored in, and the init script will be. You should be able to start shoutcast now with the default settings, but who would like to have his radio called by default? Therefore open up the configuration file and set it up further

These are the initial settings. The parameters are self-explanatory, but it's good to set Password to something different. This password will be used for both Administration of the server and for broadcasters to be able to connect to the server. If you do not wish to have this password for your Administrator account aswell, this will be discussed later. If you will change the PortBase be sure to enable it on your firewall aswell.

Following sections in the configuration file are optional, feel free to read through them. You can change the AdminPassword directive and uncomment it to have a different password for web administration console. By default the server performs NO logging into /var/log/ and outputs the logs into /dev/null instead, so if you wish to set logs, you can set it up with LogFile directive. In this same configuration file you can set your own intro mp3 file, which would be sent to users before they listen to the actual stream and other nifty features. Just go check them out. They are not required for basic run.

After you have checked everything in the config file and are happy with how it will look like it's time to test it!

After this navigate to http://yourserver.com:8000/ and should be welcome by the Shoutcast DNAS website, where you can log in, check your broadcasters and listeners, view some basic logs if you enabled them etc. Currently your server is able to accept broadcasts and provide them to listeners, though it would be nice to feed him up with some stuff! Therefore part 2 of this HOWTO comes in place - setting up shoutcast-trans, a simple transcoder sending data to shoutcast-server

What is Shoutcast-trans
Shoutcast trans is a broadcasting client. It's convenient using constant bitrate while streaming data through the net. So shoutcast-trans simply takes the MP3 files you provide it with, prepares them for streaming with transcoding them into same bitrate and pushes them to your shoutcast server for broadcasting.

Downloading Shoutcast-trans
Same as Shoutcast server, the source files for shoutcast-trans-bin are not in the repository and have to be downloaded and placed into /usr/portage/distfiles, so let's do it!

Setting up Shoutcast-trans
The configuration of shoutcast-trans is as simple as the one of shoutcast-server. The configuration file is stored in /etc/shoutcast/sc_trans.conf

The listing of all MP3s that should be available for transcoding should be stored in one single file - the playlist. How to create a playlist I will explain a little later. For starter we need to tell the transcoder where the playlist is stored, what password it should use to connect to Shoutcast server (must be same as you defined in sc_serv.conf via Password directive) and the address and port to which you want serve your files.

For your stream to look nice to the listeners you can name it and tell the genre etc.:

and finally you can set your desired bitrate at which you want to broadcast. Mind that if you don't need to care about the users much with transcoding settings, if you have shoutcast server on a really really fast line, as you would be sending only one stream from trans. Rest is handled by the server. The Quality directive is good to have on 1 if you want really high quality audio, though on older and slower servers a higher number might be better.

Rest of the directives are quite easy to understand, UseID3 tells the transcoder to send the ID3 tag as artist + song name instead guessing it from the path/filename. If you do not want to show up in Shoutcast directory, set Public to 0. Now all that remains is setting up the playlist file.

Preparing the playlist
The playlist file for shoutcast-trans should be of a specific format - no m3u generated playlist etc. Each line should define one mp3. Shoutcast DOES NOT support relative pathing, therefore you need to write whole path in the listing. You can use following script to simply create the listing while being in your mp3 storage directory

and change the permission to be executed:

then you can just start the script and check if playlist.lst contains FULL paths to each mp3:

after this you should be able to start your sc_trans, therefore:

Now if you will go to your shoutcast server administration console you should see the broadcaster connected. Enjoy your newly installed Internet radio with Shoutcast!

Listening Software
For windows users I can only advise Winamp. Simply open winamp press CTRL+U, type in http://yourradioserver.com:8000 and enjoy your good work! XMMS for linux users works the same way and I'm pretty sure there are other shoutcast-listening capable clients all over the net.