In this tutorial I am going to endeavor to explain how one creates a radio station using shoutcast opensource technology. If you are looking to make a internet streaming radio station then try reading this.
Apologies to anyone who finds the pace a little slow. This is meant for complete beginners.
First we need to consider the server.
What is a server? A server is a computer that stores things like this website for example and sits waiting to ''serve'' the site up when someone wants to view it.
You also need root access to the server. This means that a shared hosting account will not be ok. k-radio runs on a vps which is short for virtual private server. It is a segment of a server run as though it were a complete server allowing me to cut costs and give me the root access I need.
Next you need to download shoutcast:http://www.shoutcast.com/download/serve.phtml
SHOUTcast Server is available for the following platforms:
-- Windows 95/98/ME/NT/2000/XP
-- Mac OS X
Much like a home computer - a server has an operating system. My server uses Linux. It is a stable, open source OS and is therefore my recommendation!
OK - now that is downloaded, unzip the downloaded folder. If you unzip it on your computers desktop upload the unzipped folder and change its name to something appropriate.
Where you upload it on the server is important. I find it best to upload things below root level (ie parallel with public_html - not within public_html). I am also assuming you have set up a url and web-hosting account within your own server space to house your radio station.
If you are good at linux you can unzip the file direct on the server. I opted for the other way as my linux skills are week. Fear not however - we only need to know how to do about 3 or four things. Here is some more documentation from the shoutcast site:
Win32 Platform : Windows users should download the server, and unzip into an appropriate folder such as "c:\Program Files\SHOUTcast". Once the files are extracted into the folder, create a shortcut for SC_SERV.EXE to the Desktop. Start up the SHOUTcast server by running the executable, then click on the "Edit config" menu option located at the top. This will start the default text editor, opening the configuration file for SHOUTcast server. Please follow all the directions that are written into the configuration file. Once you are done making changes, save the file, close the editor, and restart the SHOUTcast server application.
UNIX and Variants : Those of you serving from Unix should download the version appropriate for your operating system, gunzip the distribution, and un-tar the archive. Use a text editor to configure the sc_serv.conf file (see below for details on configuring). It doesn't matter what user the server runs at, save that the user has read access to the config file, and write access for the files you define for file storage and log storage.
This last bit about permissions is what held me up. It can be a bit tricky to get your head round if you are new to permissions (as I was at the time) but it can be why you can't get things to run initially. Every folder on a server has permissions. The root user will have different permissions to the website user. The 1 of the 2 programs in the folder you have uploaded (sc_trans) needs to be run by website user. It doesn't matter which web user starts sc_serv. However before we start either of these applications on the server we need to edit the 2 config files:
sc_serv.conf and sc_trans.conf
By the way - Unix is another name for linux - i didn't know that at the time either! That held me up for a day or two.
First lets sort the playlist out:
should look something like this:
It is showing the folder path to each of the mp3s you want playing on the station. Naturally change it to the mp3s you wish to have playing. Save this file and upload it to the server.
As you will notice the mp3s in this example are saved above the public_html level meaning they will be available for download. Better practice to avoid this would be to have a playlist that looks like this:
In this example k-radio is what I named my unzipped shoutcast folder. Save listen.pls (your playlist) in this folder.
these are the shoutcast server settings. Shoutcast operates using 2 programs (sc_serv and sc_trans) - both have configuration files.
Open up sc_serv.conf:
Most of this you wont need to change but these lines you will:
; MaxUser. The maximum number of simultaneous listeners allowed.
; Compute a reasonable value for your available upstream bandwidth (i.e. if
; you have 256kbps upload DSL, and want to broadcast at 24kbps, you would
; choose 256kbps/24kbps=10 maximum listeners.) Setting this value higher
; only wastes RAM and screws up your broadcast when more people connect
; than you can support.
; Password. While SHOUTcast never asks a listener for a password, a
; password is required to broadcast through the server, and to perform
; administration via the web interface to this server. This server should
; consist of only letters and numbers, and is the same server your broadcaster
; will need to enter in the SHOUTcast Source Plug-in for Winamp. THIS VALUE
; CANNOT BE BLANK.
Password=***your password here***
; PortBase. This is the IP port number your server will run on. The
; value, and the value + 1 must be available. If you get a fatal error when
; the DNAS is setting up a socket on startup, make sure nothing else on the
; machine is running on the same port (telnet localhost portnumber -- if you
; get connection refused then you're clear to use that port). Ports < 1024
; may require root privledges on *nix machines. The default port is 8000.
; Optional Parameters
; Logging configuration
; LogFile: file to use for logging. Can be '/dev/null' or 'none'
; or empty to turn off logging. The default is ./sc_serv.log
; on *nix systems or sc_serv_dir\sc_serv.log on win32.
; Note: on win32 systems if no path is specified the location is
; in the same dir as the executable, on *nix systems it is in the
; current directory.
This last line you will need to change to the correct folder path.
Naturally you will need to set the number of users on a station. Port 8000 refers to accessing the station through a port number which you do by putting : at the end of the url and then the port number.
Thus you access the shoutcast server on k-radio.co.uk by going to:http://www.k-radio.co.uk:8000
Once you have saved this file upload it to the server. Be sure to save it as a text file and in the same folder as sc_serv.
We can now boot up sc_serv. You need to make sure you have shell access to the domain your station will be hosted on. Then open up a program such as Terminal (on the mac) and log in to your server either as the root admin or as the domain user.
I do this by typing:
and then typing the password when prompted
Then you need to boot up the sc_serv which you do by typing:
Once you hit enter this should start your sc_serv. Take a look at yoururl.com:8000 and if you can see something similar to the link above you are doing well so far!
However you will notice that there is no music playing - that is because we need to boot up sc_trans. This is better done logged in as the web-domain admin that hosts the station rather than the main admin. But I am getting ahead of myself - we need to open and adjust the sc_trans.conf file.
This file is the configuration file for sc_trans. Its fairly self-explainatory and as long as the folder paths and the passwords correlate you shouldn't have any problems. Save this file once you are happy with all the different settings. I would play around with bitrates once you have got the whole thing started. Speaking of which - nearly there now....
So - create a new shell access window and log in as the domain administrator.
Your station should now be running. If it works first time then you should be able to click yoururl.com:8000/listen.pls to hear the fruits of your handy work.