Build your own shoutcast internet radio station

Google+ Pinterest LinkedIn Tumblr +

Shoutcast give an easy installation and also it is FREE. Now, we will try to install Shoutcast in LINUX OS, this tutorial can be used in any of linux distro but i use centos and debian to build my own radio.

First, you must have VPS or dedicated server to instal and run shoutcast. Streaming internet radio will consume a lot of bandwidth and internet speed( depend on your listener and sound quality ) and also resources ( like memory, cpu ) especially when the server needed to decode/encode the songs. When you choose VPS or dedicated server / colocation server , you must check this :

  1. Bandwidth, choose unmetered bandwidth.
  2. Internet speed, choose one that meet your radio target. To calculate how much speed you need, you must know your sound quality and your target listener. For example, if you want to stream at 32kbps and you want your radio get around 100 listener, you must have at least 32 kbps X 100 , about 3Mbps internet speed.
  3. Harddisk space, if you only install shoutcast radio you need a little space, but if you want to instal auto dj to play song from your server, you must count how much the song file will consume your harddisk.
  4. RAM, a better ram is good, if you just install shoutcast, 128MB is enough, but if you want to install auto dj , at least you will need 512MB

If you already have server lets start to install shoutcast in your server ( I assume that you already install LINUX OS ) :

  1. move to directory where you want to install shoutcast, for example i will install in /usr/local : cd /usr/local
  2. Download shoutcast source : wget http://yp.shoutcast.com/downloads/sc1-9-8/sc_serv_1.9.8_Linux.tar.gz ( or check http://www.shoutcast.com/download-files for latest release ).
  3. Untar shoutcast source : tar xvf sc_serv_1.9.8_Linux.tar.gz
  4. Make a link to sc_serv_1.9.8_linux directory for easy acces : ln -s sc_server_1.9.8_linux sc_serv
  5. move to sc_serv directory: cd sc_serv
  6. edit file sc_serv.conf to meet your radio criteria. This configuration file already have a detail instruction so you will not have problems to edit the file.
  7. run sc_serv to start your server : ./sc_serv /usr/local/sc_serv/sc_serv.conf ( this will run your shoutcast server on console mode, later we will run this on daemon mode )

Test your server

  1. From another computer, browse to your server to check the status of the server : http://ipserver:8000 ( if you change portbase from 8000 to another number in sc_serv.conf then you must browse to those port ).
  2. If you get Shoutcast Administrator Page then your shoutcast server already running. But right now the status of the server is down, don’t worry about this, this happened because shoutcast server not streaming any song.
  3. If you can’t access shoutcast administrator, you must open port 8000 on your firewall ( or other portnumber depend on portbase ).

Test streaming to your shoutcast server :

  1. To start streaming, you will need winamp installed on windows machine. Download winamp dsp plugins from here ( or you can check latest release here ).
  2. Install the plugins and restart your winamp.
  3. If shoutcast source winamp plugins not showing, open Winamp Preferences and click Nullsoft Shoutcast source DSP on Plugins – DSP/Effect.
  4. In Output tab on shoutcast source plugins, choose output1 and in Output Configuration add shoutcast server IP address on Address field, then in Port add 8000 or others number according to portbase setting on server. In password, add your password ( check your password in sc_serv.conf ). Choose Encoder you want to use, to check setting on each encoder click encoder tab.
  5. After finish configuring, click on connect .
  6. When winamp already connect to your server, try to play some songs.
  7. Check again your shoutcast administrator webpage using your favourite browser. If everythings perfect, you will get your internet radio status is online.
  8. To try listening your radio, open winamp in another pc or windows media player and choose open url , and add URL : http://yourip:8000/listen.pls .

Running sc_serv as daemon

Running in console mode have a disadvantage that you can’t use your linux console to run another task and if you access linux console from remote software like putty shoutcast will shutdown when you close putty.

  1. stop your sc_serv by pressing CTRL + C
  2. run this : ./sc_serv /usr/local/sc_serv/sc_serv.conf >/dev/null &
  3. Try to browse to your Shoutcast Administrator, if you can access it then your radio is up.
  4. To stop your shoutcast server, run this command : kill -9 `ps -C sc_serv -o pid –no-headers`


Run sc_serv on booting :

You can set sc_serv to run on booting by creating a custom script ( this only work in DEBIAN and CENTOS or similar linux distro , other distro check your linux manual how to create start up script ).  The script is :

#!/bin/sh
# chkconfig: 2345 95 20
# description: Starting Shoutcast
# Sample init script for SHOUTcast
# by caraoge
# customized by AreaSale.Com
# process name: Shoutcast

# Check for SHOUTcast binary
test -f /usr/local/sc_serv/sc_serv || exit 0

# The init commands
case “$1″ in
start)
echo “Starting SHOUTcast server…”
/usr/local/sc_serv/sc_serv /usr/local/sc_serv/sc_serv.conf >/dev/null &
;;
stop)
echo “Stopping SHOUTcast server…”
kill -9 `ps -C sc_serv -o pid –no-headers`
;;
restart)
echo “Stopping SHOUTcast server…”
kill -9 `ps -C sc_serv -o pid –no-headers`
echo “Starting SHOUTcast server…”
/usr/local/sc_serv/sc_serv /usr/local/sc_serv/sc_serv.conf >/dev/null &
;;
*)
echo “usage: /etc/init.d/shoutcast”
echo “$0 {start | stop | restart}”
exit 1
;;
esac

Save this script on your init.d directory with name sc_serv.

If you’re using centos, execute this command :

chkconfig -levels 2345 sc_serv on

if you’re using Debian , execute this command :

update-rc.d sc_serv defaults

Try to reboot your computer and akses your shutcast administrator webpage.

Now you get your radio online, if your server already connect to internet , another people can listen to your radio using address : http://yourip:8000/listen.pls or http://yourdomain:8000/listen.pls .  In the other articles , i’ll write how to setup autodj on your server to play your song without needed a dj or other pc and several acrticles about shoutcast.

Share.

About Author

Leave A Reply