How to Create Your Own Audio Streaming Server (WebRadio) [Windows]
Audio Streaming Server (Radio) [Windows]
What is a Streaming Audio Server
Its an application that will allow you to “stream” or send a continuous block of data to a client. In a few words, it will allow you to put your own radio station online, where it will be feed by sound files lying around your hardrive, and then clients will connect to the server, and will have the chance to listen whats being playing, just like a plain old school radio station, only that this one is digital, thus allowing better quality, and management is really simple after you follow some simple steps in the initial configuration.
For this tutorial, we’ll use two available solutions, both are very good in the sense they do their job well, so its up to you to decide which one to pick up in the end
Required by the broadcasting client to send the music files straight to the server.
1.2 SHOUTcast Server 1.9.5
This one directly from Nullsoft, the creators of winamp.
This is very simple. All you have to do is follow the “advanced” windows approach, aka “next->next->next“
Once you’re done, you’ll have a folder C:\Program Files\SHOUTcast which is the default, and the one Ill be refering to in the rest of this tutorial.
Now we’re off to configure the server to make it run smoothly. Follow the newly created shortcuts in the start menu (folder SHOUTcast DNAS), and run the server configuration utility SHOUTcast DNAS (GUI)
You should get an image like this one
Ok, now you we’re off to explain the menues
Kill Server: Self-explanatory :D. It kills the server, and all active client connections. So use it when you just want to shut it down for a while. Notice also that when you run the application, a little icon is displayed in the system tray.
Hide Monitor: Will basically minimize the window. The only way to get it back is via the aforementioned icon in the system tray. You can also access this function from the “X” button of the window.
Edit Log: Will simply give you access to the log file of the server, where useful information such as startup time, clients connection and so on are displayed. You can save the file to your hardrive, for historical purposes or whatever suits your needs.
Edit Config: This is the most important part, and the one Ill focus here, since it gives you access to all the configuration parameters of the server.
As you can see, you need to restart the server if any changes were made in order to the server to reload the new values. Notice if it opens notepad by default, probably the end-line characters wont be parsed correctly, which in plain english means you’ll see sort of gibberish. So, close the server, and go straight to C:\Program Files\SHOUTcast and open the file sc_serv.ini with another text editor, such as wordpad, which recognizes unix end-line characters correctly.
Now I’ll explain the most important options, change them accordingly to suit your needs, or leave the default if you’re still confused about any. Notice the developers of this great application made a good job, and they explained the options very well in the ini file, however, if you still are a little lost, follow my prior advice.
MaxUser : This is the maximum allowed number of simultaneous listeners. This is, the max number of users that can be connected at the same time to your server. This one is a little tricky as it depends on your connection speed, so you might want to customize this to suit your needs.
In the docs, there is a function to calculate this:
MaxUser = [Upstream speed of your connection] * 0.9 / [Desired bitrate]
So lets suppose your upstream connection (the speed you can upload at) is 350, and the bitrate you want to serve your mp3’s at is 32 kbps:
350 * 0.9 / 32 ~= 10 users
But be aware you can play around with this number, and you can even try to set it higher, but then you’ll need a bunch of beta testers that might want to connect to your server and then report you how well it did, if they had connection problems, if the sound had glitches, etc…
So if you’re not sure, set it to the number of users given by the above function (or even less).
Password : This is the admin/broadcast password, that you will use to administer the server via a web-interface (more of this later) and to send the broadcast via the DSP plugin (next section..).As usual, enter a hard to break password, likely containing letters, numbers, punctuation characters and caps.
Notice there is an option to use this password as the one for broadcasters, and use another one for administration (separately that is), but for the sake of ease, lets just use this one for both functions.
Portbase : Simply the port where your server will listen for client requests, aka the little door in your PC that clients will try to connect to (or open). Default value is recomended.
AutoDumpUsers : Simply put, if you shut down the server, why dont you disconnect the clients too?
We’re done with the configuration. Piece of cake, eh . Save the changes and close the file.
1.3 SHOUTcast DSP 1.8.2
This one directly also from Nullsoft. This is a Winamp Plugin that will allow you to send the real broadcast to the server you just configured, aka it will stream the mp3 so that it can be listened to.
Close Winamp if its opened. Then, again, follow the “next->next->next” approach…
Once you’re done, you’ll want to check out if the plugin was installed correctly, and get ready for the next step.
Simply open Winamp, then hit Ctrl+P to open the preferences window:
Now close the preferences window, and the DSP dialog should be shown by now (and everytime you start Winamp).
At this point we have to configure the DSP plugin to start the broadcast.
Now we’ll take a look at the different tabs, and what we should fill in the different fields of these
Main Tab: Its the worthless of them all. Basically it will show you the status of the different Outputs and the DeciBels.
Output Tab: This is the most important of them all. Screw something here and you wont have your server streaming any sound
Lets go easy on this one.
The output part will show you which one of the 5 outputs are you configuring. What this means is that you can have your DSP plugin stream sounds to 5 different servers, thats all. For ease purposes, lets just leave it selected in the output #1 and forget about the others.
The status part will show more or less the same stuff that in the Main Tab. But whats important is the button connect. You are supossed to push it once all this configuration is done, to start broadcasting the sound right to your server. (Final step).
Now lets head over the Output Configuration part.
In the address field just write the IP or domain name for your server (the server you will be broadcasting to, that is). Notice that if your server is at the same computer where you will be using the winamp+DSP plugin, then you can just put localhost and thats it.
In the port field, put the Portbase value you configured for your server above, in the former section…
In the password field, put the Password value you configured for your server above, in the former section…
From the encoder list, just pick up 1, since basically you will be able to make 5 different configurations for 5 different outputs (remember?), so, since we’ll be using just output, then we just configure 1 encoder, and this is the one we select here (more on encoders later)
Push the checkbox Enable Reconnection on Reconnection Failure, that means if there is a problem with your server, then the DSP plugin will try infinitely to reconnect until its up again
Now lets head over the Yellow Pages Configuration part.
The checkbox Make this server public (Recommended) basically will allow your server to be listed in www.shoutcast.com listings. Wheter you want to do this or not (you want to keep this private) its your call. Two things you need to have in account. First, your shoucast server needs to have a domain; if it has an IP, then you wont be listed there. And second, from the instant you begin the broadcast by pressing the button mentioned above, it will take from 10 to 15 minutes for your server to be listed there. Once its listed, it will look like this (I made a search for Billy Boy and thus I got my server among the results)
So as you can see, anyone going to www.shoutcast.com could find out about my server, and tune it. If you want to keep it private, then just dont click the checkbox, thats all.
In the Description field… well, just put your server description, to be shown in shoutcast listing as shown above, and this is also what your listeners will see in the music player playlist.
The URL field is usually an address where people who got to your server through the shoutcast listings, can find more information. This should be sort of your website or the radio’s website. You get the picture. But please notice this URL has nothing to do with the Address field we went through before, they can be the same, but dont have to…
Now the Genre field is self-explanatory…
And finally the fields AIM, ICQ and IRC are just contact addresses, pretty much like URL so you know what to (or what not to) put in here…
Encoder Tab: This one is simple. As explained before, choose the Encoder 1 item in the list, and select the appropiate Encoder Settings, aka the bitrate we even made a math formula above, remember?
In the Encoder Type field just leave the default value…
Input Tab: This part will tell your Winamp what to broadcast, your MP3s (Winamp (Recommended)) that winamp is playing right now or…
Mom, I wanna be a real DJ
Ok, sometimes, you’ll want to broadcast your ugly voice to your listeners (poor them)… How do you do that? Simple. You select Soundcard Input as your Input Device, change the Input Settings to what you consider and then pull out that dusty microphone and start speaking…
One tip here, you can dynamically change between Winamp (Recommended) and Soundcard Input as much as you want, and play to be like a real DJ in a radio station. Notice that when you change from Soundcard Input to Winamp (Recommended), if you take, lets say 10 seconds to hit the play button in winamp (to start playing a song), these 10 secs wont be streamed to your listeners, so you have time to speak, something among the lines “Now enjoy SongX”, change the Input Device to Winamp (Recommended), search for the song in the playlist (or load it), then hit the play button. Your listeners will only listen to the “Now enjoy SongX” and right away the song, no interruptions in the middle. Rather cool, eh?
Now you’re done. Hit the connect button in the Output Tab and you’ll be broadcasting to your shoutcast server right away.
You can now administer your shoutcast server from a web-based interface.
To access it, just go with your browser to
Where yourserver is the value configured in the field address of the Output Tab in the DSP plugin, and port is the Portbase value you configured for your server
In the example we have been following along, its would be
You’ll be looking at something like this
Status: The “welcome” screen you see in the image…
Song History: Well… the list of streamed songs since the server was started
Listen: Basically, the link you have to give your listeners so they will be able to connect to the server and start listening (doh!). If you are not very good with the html, copy paste this code inside a HTML page (maybe the one pointed by URL in Yellow Pages? :roll:)
SEE THE CODE HERE
And replace the href tag to what the link in Listen points to.
Here is the classic “tune in” image
Stream URL: Basically, the URL in Yellow Pages (DSP configuration dialog if I lost you here)
Admin Login: This is where you play to be an admin. I will only tell you, to login you need a login/password combo. The login is just admin, and the password is the Password variable in the shoutcast configuration file (sc_serv.ini).
As I explained above, you could have a unique password for admin functions, if you fill in the field AdminPassword in the aforementioned ini file. (Just take away the ; (semicolon) and put the password you want.
If you enter a password there (in AdminPassword), then this is the one you will use here, otherwise just use the mentioned one (Password). If you’re lost here, then nevermind and just forget what I said in the last 2 paragraphs (including this one)
Since I hate to be a party boomer, Ill let you enjoy the fun and test all of the options in the admin page by yourself.
Consider this a teaser
Ok, so you have your server up and running, but now you need to somehow test it, to check out if everything is working as expected, right? If you dont have two computers to test it, and knowing the fact that winamp wont allow two instances of itself to be running at the same time, what would you do?
So dont fear. There are a number of media players that support shoutcast streams, and we will look at one of them.
The name’s XMPlay, and its a very lightweight media player, that can be freely downloaded from here
Now lets see what might be the URL your users will need in order to connect to your server. I explained in the subsection above how to get this URL by means of the admin panel, but if you want to know how do you get int manually, here it is
Where yourserver is the value configured in the field address of the Output Tab in the DSP plugin, and port is the Portbase value you configured for your server.
In our now old and rusty example, it is
Then fire up XMPlay, press the key O (keyboard shortcut to open files/URL) and fill the appropiate value
Now you shoould be listening to your radio server!
Just FYI, in Winamp you open an URL with Ctrl+L.
Refer to Section 1.1
2.2 Icecast 2.2.0
This one directly from the creators of the ogg sound format, among other open source niceties.
This is far easy. Just follow the “next, next, next” approach and you’re done with it.
So, we’re all set to start configuring the server. Run it by using the shortcut in the desktop (Icecast2 Win32), and then you’ll be introduced to the following screen
There is no much to explain about the GUI, so Ill just tell you the help is located in the About menu
Before I start spitting my gibberish here, lemme explain, that the configuration is done by changing/adding values to an XML file, namely icecast.xml in C:\Program Files\Icecast2 Win32 (if you installed icecast in the standard path). So, if you’re familiar with XML, then you have a slight advantage on your side. However, if you dont know XML or dont even know what it is, no problem, the configuration procedure is still piece of cake (seems like everything in this tutorial is :lol:)
But I know there are some folks out there who like to learn something new, so the beginner point by excellence to learn XML is this one
Ok, now lets continue. Head over to the Configuration menu, and select the only available item in there (Edit Configuration). You should see the configuration file right now, opened in notepad.
BTW, while you’re editing the file, you cant start the server, since the main window freezes. This is normal, and its made for security purposes (although you can simply go to the installation folder, and open the .xml file… :D)
Now you can safely select all the text (ctrl+a) and then delete it. Then just copy paste all of the code below
The lines in bold are purely so for formatting purposes. They are XML comments that I made, in order to help you change whats required. This is pretty much straightforward, not a lot to explain here. If you need further help, go to About->Help menu in the icecast main window, for a more detailed explanation on every single variable available.
Now spank that Start Server button to run the server.
2.3 SHOUTcast DSP 1.8.2
Refer to Section 1.3 of this tutorial, for installation and configuration options, they are pretty much the same. Just a few things change.
To make things short, here is a screenie showing what the Configuration tab should look, if we take in mind the example icecast.xml configuration above.
Notice the password in red is the value of the element .
The Yellow pages configuration is pretty much the same. Nothing changes.
So, if everything went ok, you can search for your server once its up and running and Shoutcast DSP broadcasting here
In our example, this is how it looks
You can now administer your icecast server from a web-based interface.
To access it, just go with your browser to
Where yourserver is the value configured in the element in the icecast.xml file; port is the element in the first of the sample configuration file above, and admin_path is the value of the element .
Following the example, it would be
Now, when you try to access the admin interface, it will ask for a login and password, those are the elements and I talked about in the configuration file (icecast.xml if you’re still lost).
The interface is too simplistic and rather ugly, but everything IMHO is really easy to understand, so you’re on your own now
Refer to Testing in Section 1.3.
The URL for your listeners is this one
Where yourserver and port values are the same used to access the admin interface (subsection above). So in the example it would be
So, now I have introduced you to 2 of powerfull tools for your internet radio needs. Which one to choose in the end is your call.
If you ask me, Id preffer Icecast, since the docs are way better, and its easier to set up. Have in mind, I explored here the simple way of broadcasting (i.e by means of the Shoutcast DSP plugin), but in both servers you can also broadcast files without the need of an aditional plugin (aka, no winamp at all), but its more complicated, clumsy (as you dont have the ease of just firing up a playlist and start playing right away, plus the I wanna be DJ -your voice- thingy is also really neat), but you can always check the documentation of both applications more deeply.