Create your very own Internet radio station.

Nov 28, 2006 09:38 GMT  ·  By

SHOUTcast is a multiplatform freeware audio streaming technology which uses MP3 or ACC encoding of audio content and HTTP as the transport protocol to broadcast web radio, also known as Internet radio. The output format is supported by multiple clients including XMMS, Amarok, Apple iTunes and others. However, before you start, keep in mind a few things (requirements):

- A SHOUTcast station requires an unfirewalled connection in order to be added to shoutcast.com's list. So, you'll either need to open ports 8000/tcp and 8001/tcp (if you're running a firewall), or forward ports 8000/tcp and 8001/tcp to your LAN ip (if you're using NAT and your shoutcast server PC is behind router/gateway).

Installation

- First, you should create a ned user to run the server: Don't run it as root for safety's sake.

code
# useradd shoutcast
- Switch to the newly created user:
code
# su - shoutcast
- Download the latest SHOUTcast Linux server (glibc) from here and the latest SHOUTcast DSP Plug-In for Mac OSX, Linux and FreeBSD from here. Save them in /home/shoutcast. (Download them with user shoutcast, otherwise there'll be chown problems.)

- Untar and create an easy to use directory tree (you're still logged in with user shoutcast):

code
# cd /home/shoutcast
# tar xfz shoutcast-x-x-x-linux-glibc6.tar.gz -C shoutcast/
# tar xfz sc_trans_posix_xxx.tgz
# mv sc_trans_040/ sc_trans
- You should now have the shoutcast server in /home/shoutcast/shoutcast and the DSP Plug-In located in /home/shoutcast/sc_trans.

Configuration

- Change directory to shoutcast/ and open sc_serv.conf using your favorite text editor and edit these values to get things quickly up and running:

code
MaxUser=20
Password=streaming
PortBase=8000
AdminPassword=MyPassword
- Now go to /home/shoutcast/sc_trans and edit sc_trans.conf the same way you did with sc_serv.conf. These are the values (don't add the # comments as well, just read them):
code
PlaylistFile=/home/shoutcast/sc_trans/playlist.lst
ServerIp=131.107.what.ever.is.your.ip
ServerPort=8000
Password=streaming
StreamTitle=blah # this will be displayed in the players
StreamURL=http://131.107.your.ip # or the domain name if it points to the same IP
Shuffle=1 # set to 0 to play songs in order
- Create the content directory, add mp3 files to it and create the playlist:
code
# cd /home/shoutcast/sc_trans
# mkdir content
[.. add mp3 files to the content/ directory ..]
# find /home/shoutcast/sc_trans/content -type f -name "*.mp3" > playlist.lst
Start the server

code
# cd /home/shoutcast/shoutcast && ./sc_serv sc_serv.conf &
# cd /home/shoutcast/sc_trans && ./sc_trans sc_trans.conf &
- You will see the output in your terminal. - If everything worked out fine, you should be able to check the SHOUTcast status by opening your browser and going to http://your.ip:8000. Also, you should be able to click on admin login and use the password set in sc_serv.conf next to AdminPassword. - If you want to spread the word about your station, use the address http://your.ip.or.domain:8000/listen.pls because chances are it will automatically open people's media player (Winamp, Amarok, XMMS etc).