home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Book HomeDesigning Web AudioSearch this book

8.6. Start your own MP3 radio station

SHOUTcast is the most popular software used for streaming MP3 to the world. (MP3 streams are not saved on the user's hard drive but are listened to as they're downloaded.) SHOUTcast comes from Nullsoft, creators of the Winamp MP3 player. Much as HTML editors made it possible for anyone to publish text and graphics on the Web, the SHOUTcast application and server (shown in Figure 8-14) makes it possible for the masses to broadcast audio over the Internet with a minimum amount of hardware and knowledge (although a good bit of bandwidth definitely helps).

Figure 8-14

Figure 8-14. The SHOUTcast DSP plug-in for Winamp lets you redirect MP3 streams to server software for Internet distribution.


An open source, free alternative to SHOUTcast also exists called Icecast (http://www.icecast.org). Icecast was created in 1999 by two coders, Jack Moffitt and Barath Raghavan, to provide an open source audio streaming server that anyone could modify, use, and tinker with. It was further developed under the GNU General Public License by many people scattered around the globe. The upside is if you are a programmer you can use it free of charge and alter it in any way. The downside is that Icecast is a little more difficult to configure and set up, though you may find the payoff is worth the effort.

SHOUTcast streaming technology is a distributed architecture that lets people stream to the world, even over analog modem connections. However, keep in mind that a modem connection alone won't let you support many simultaneous listeners -- to do that, you'll need to redirect your stream to a high-bandwidth server. SHOUTcast's unusual architecture lets you stream your MP3 files to a SHOUTcast server (which may be running on your machine or on someone else's machine, with permission) using your Winamp player and the SHOUTcast DSP plug-in. The SHOUTcast server (which requires a higher-speed connection) is available for Windows 95/98/NT and many Unix variants, including Linux.

Using SHOUTcast is much like using other streaming/distribution software, particularly those that use reflectors, such as CUSeeMe (a video conferencing application from White Pine Software). The idea is that you can distribute one stream to many users at once. This model is much like a typical radio distribution, where one broadcast goes out to many, who simply use a player to "tune" in the desired frequency. The distribution model for SHOUTcast streaming is as follows and is illustrated in Figure 8-15.

Figure 8-15

Figure 8-15. Model of the SHOUTcast Internet distribution

To listen to a SHOUTcast server stream, just open Winamp (or any other stream-capable MP3 player) and bring up the Open Location dialog box. Enter the URL of the server you want to listen to and hit Enter. For a list of SHOUTcast servers, visit http://www.shoutcast.com. Other streams can be found at http://www.icecast.org or http://www.live365.com. Once you've got a directory listing, try searching for a band or genre name and clicking the link to the stream you want to hear. Your preferred MP3 player will be launched and will start playing your stream automatically.

SHOUTcast is free for download for general non-profit use. For commercial use of SHOUTcast beyond the 14-day trial period, a one-time licensing fee of $299 will apply. Using SHOUTcast requires a bit of preparation and configuration, but it can be a lot of fun.

Variable quality

MP3 streams dished up by streaming servers may be heavily downsampled by the person running the station in order to get their music through the skinny pipes of the Plain Old Telephone Service (POTS). In addition, many files are broadcast at very low bitrates, and lower sample rates, or in mono rather than stereo. In any case, don't expect streaming MP3 to sound as good as downloaded MP3. The Internet is too slow for most people, so it's just not possible. Many people feel MP3 sounds better at very low transmission rates than do competing formats like RealAudio, but you'll have to judge for yourself.

8.6.1. Running your own station

In a nutshell, here's what you do to set up your radio station:

  1. Install the SHOUTcast DSP plug-in for WinAmp.

  2. Configure the SHOUTcast server software.

  3. Using the Winamp player, simply choose the files you want to stream (you can also stream live content via the Live Input plug-in), and press Play on the Winamp interface.

The SHOUTcast DSP plug-in re-encodes the playing audio at the desired transmission bitrate and then transmits that audio to a SHOUTcast server, running either on your own machine or on another machine with a faster connection. Metadata relating to your transmission, including IP address, URL, genre, station name, etc., will be transmitted to SHOUTcast's central server, shown in Figure 8-16, so other listeners can find you. Your connection between the player and the server must remain open until the transmission has been completed.

Figure 8-16

Figure 8-16. The radio directory at http://www.shoutcast.com, which includes a listing of online radio broadcasts

The Nullsoft SHOUTcast server runs as an application on supported operating systems such as Windows 95, 98, and NT, FreeBSD, and so on. The SHOUTcast server will accept connections via the SHOUTcast DSP plug-in in order to have a source stream to broadcast. You must keep the connection open, as the server streams what you are actively sending it via the Winamp plug-in. Once a stream has begun, the SHOUTcast server accepts only connections from other copies of Winamp in order to broadcast that source stream to each listener. In effect, you've just set up a microbroadcast system that allows people to broadcast audio content in any of the formats that Winamp supports. Through the use of specialized SHOUTcast broadcasting plug-ins, audio from a microphone as well as any device attached to the line-in port on the broadcaster's soundcard can be streamed via the SHOUTcast server. The SHOUTcast server is the key to connecting many people to one another via Winamp.

8.6.2. Configuring and starting the system

Select that entry, and a dialog will appear. To configure settings relating to your SHOUTcast stream, click the Set button to establish your stream settings.

The default configuration assumes that the SHOUTcast server is running on the same computer as Winamp. To change the configuration so that Winamp streams audio to a different server, click Set and enter the IP address of the machine that will be running the server software (which is probably you for now, but may be another machine later on). Next, enter the port number for the server in the Port field (the default is probably fine). If the server has a password set to prevent unauthorized streaming, enter it here. If you wish to have the server listed in the online SHOUTcast directory, make sure there's a check next to the Public Server option. Once you've entered everything correctly, click OK and then Connect. If all has been done correctly, it will display a little message that states "Source stream connected" in the bottom of the SHOUTcast Source window. You may now minimize that window and begin to play audio files within Winamp to have it streamed to your audience.

Now all that remains is to tell your audience how to tune in. Tell them to open Winamp, press Ctrl-L or go to the Open Location option in the Winamp main menu, type in http:// followed by the IP number of the SHOUTcast server, followed by a colon and the port number you were also given. For example, a complete URL might look like this:

Winamp should automatically connect and begin streaming audio their way. For more information, please refer to the SHOUTcast documentation.

Linux/Unix help

Most of these instructions assume you're working in Windows, but the SHOUTcast server is available for Linux and other Unix-like platforms. Configuration instructions are virtually identical for both operating systems. Linux users need to change permissions on the server binary with chmod u+x and to make sure the config file is readable by the user who is running the server. If the user is not root, he or she will not be able to use port addresses lower than 1024. Also, only the server component is available to Linux users, not the Winamp source stream plug-in. If you use Unix or Linux substitute sc_serv.conf wherever sc_serv.ini appears in this chapter. An easier way?

If you'd like to run a streaming server without having to jump through so many hoops, and you are willing to experiment with an easy-to-use, free operating system designed for these kinds of things, download BeOS for free from http://www.be.com. Once installed and configured to your liking, download the audio player SoundPlay from http://www.bebits.com. Enable SoundPlay's HTTP plug-in, then open any web browser and enter the machine's IP address on port 80. For example, if your machine's IP address is, enter You'll see a page with Play and Stream buttons for each file in the current playlist. Users can stream files or playlists directly from your machine with no further configuration required. Complying with copyright laws

Musical compositions and sound recordings are creative works that are protected by the copyright laws of the United States (title 17, U.S. Code) and other countries. Under U.S. law, the owner of a copyright has the exclusive right to (and to authorize others to) reproduce the work, use parts of the work in a new creation, distribute the work in whole or in part, and publicly display or perform the work (including on web pages and through webcasting). With few exceptions, it is illegal to reproduce, distribute, or broadcast a sound recording without the permission of the copyright owner. It is your responsibility to comply with the copyright laws when you become a webcaster or offer files for download.

There have been recent amendments to the copyright law regarding webcasting of sound recordings. These new provisions allow web-casting under the terms of a statutory license, as a way to help web-casters get permission without having to go to each sound recording's owner. The statutory license, however, has strict requirements that you must follow. Some of these requirements include the payment of license fees, limitations on the number of songs from the same album or artist that may be played in a three-hour period (called the sound recording performance complement), a prohibition on publishing advance playlists, and a requirement to identify the song, artist, and album on the website. There are other requirements as well. The Recording Industry Association of America provides quite a bit of information on copyright law as it applies to webcasting, and both ASCAP and BMI have created license agreements that they are willing to grant to webcasters that they believe conform to the provisions of the new copyright rules for webcasting.

For additional information on the statutory license and other aspects of webcasting, visit the following sites:

If you are uncertain about what you can and cannot do, we suggest you check with the copyright owner or the owner's representatives (or the organizations above), or consult a lawyer.

Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.