The Internet and Independent Media Webcasting ShoutCast
Handbook [Software mentioned in these instructions can be obtained from http://www.microradio.net] Step 1 Downloading ShoutPak: Create a new folder on your desktop, titled "ShoutPak." Download the Shoutpak and save to this folder. You will need to unzip this file, extract it to the "ShoutPak" folder. What you'll get in this .zip file: mp3-09f.exe - the installer for Fraunhofer's mp3 compressor. dsp150b2.exe - shoutcast source plugin for winamp, gotta install into the winamp folder. There is a later version at winamp.com, try it if you're feeling adventuresome. winamp265_lite.exe - winamp installer. advdemo.exe - video tutorial of the elusive "advanced mode." It's actually pretty helpful, if you don't already know how to use adv mode. What you need to download: Shoutcast Server (you can download the latest Shoutcast Server at http://www.shoutcast.com/). Also save this file in the ShoutPak folder. Installation: MP3 Compressor - double click on: mp3-09f.exe. After installing the mp3 compressor, you need to adjust your settings in the control panel. Click on Sounds and Multimedia settings in the Control Panel on your desktop. Under the "Hardware" tab, then double click on "Audio Codecs." Under the "Properties" tab of the new window, select the "Fraunhofer IIS MPEG Layer-3 Codecs" and prioritize this codecs by changing the setting under "Properties." Winamp - Double click on: winamp265_lite.exe to install winamp. Note the Winamp installation number: XXXXXXXX. Shoutcast Source Plug-in - Next, install dsp150b2.exe in the "Winamp" folder (browse in your program folder). Click here to read the Shoutcast Source instructions provided by Winamp, read at your own risk. Shoutcast Server - You'll also need to download the latest Shoutcast Server at http://www.shoutcast.com. Next, double click on the shoutcast-1-8-0-windows.exe file (current file name at time of this writing) and install. Restart Winamp if you had it running at the time. Now you're ready to configure the broadcasting software. Step 2 After you start Winamp, click on the left side of the border of Winamp, this usually brings up a small menu, on which an option called "Options" can be found. Click "Options" to bring up another menu on which will be ANOTHER option called "Preferences". Click "Preferences". This will bring up a window that has a tree of functions. The one you want to click on is the one labeled "DSP/Effect". This will change the contents of the section to the right to a list of Plugins that match the category. In there should be the Plugin you just installed. It will most likely be labeled "SHOUTcast Source for Winamp" with a version number (currently v1.5.0b2 at the time of this writing). Click on this, and find at the bottom of window a small button called "Configure", now click THAT. YET ANOTHER window should pop up. It will have two check boxes at the top. One will say next to it: "Enable low-pass filtering" (recommended). I suggest you do this. In other words check the box by clicking it. If you intend to broadcast the audio coming out of your webradio studio or community netcasting facility, then enable "advanced recording mode" (check the second box). You should do this if you are planning to broadcast more than MP3s (i.e. the output from you mixer by running a line out of the board into the soundcard on your computer). Depending upon where you plugged the patch cord into your soundcard, select "Line In" or "Microphone". At the very bottom is another checkbox with a big button that will have a path to somewhere on your hard drive (Usually it will say C:\). I suggest ignoring it, and make sure it is NOT checked. At this point you may now click the "OK" button. Click the "Close" button on the "Winamp "preferences" window. Look in your system tray (usually on your windows toolbar at the bottom of the screen and to the right unless it's been fiddled with.) There should be a new icon there. Allowing the mouse cursor to hover over it should cause a hint box to come up saying something like: "SHOUTcast source:0 bytes sent." Double click this icon to bring up YET ANOTHER window. This window will be labeled: "SHOUTcast source" (go figure). There will be two buttons labeled "Edit". Next to the top one it will usually say "Server:localhost:8000". Ironically enough, this doesn't really need to be changed. Although some may find better results if you put in your actual IP# here. Under that however, is another button labeled "Edit", and next to that it will say something like "Format:MP3 @ <some number in kbps> <some number in kHZ> You will want to click this edit button to change this to a better value. Doing so will bring up a window labeled: "Format selection (MPEG layer-3 only)." There will be an option that will initially say "[untitled]" under "Name:". Ignore it. There will be another area labeled: "Format:" which will have a drop-down list that should say "MPEG Layer-3", if it doesn't say this, then change it to say this. Under that, is an area called "Attributes:", and another drop-down box. You want to change this to something appropriate for your circumstances. The first value, which will be some number and kBits/s is the rate of speed you are transmitting data, depending on your connection, you will want something that your bandwidth can handle. Using a normal DSL connection, you should be able to use 24 kBit/s. The next one, is some number in Hz. As a rule of thumb, the higher this number, the greater the quality of sound, but greater the drain on your connection. Continuing to follow the Rule-of-Thumb, somewhere around 24 kBit/s, 22,050 Hz Mono should be fine for a DSL (and is recommended). As a comparison, CD sound quality is around 44000 Hz, while a telephone would be around 10,000 Hz or so (REALLY wild guess here). And of course, Stereo or mono is your decision, bear in mind that Stereo being TWO channels of sound (as opposed to MONO which is only one) takes yet more bandwidth. But again, a DSL should be able to handle this (but folks trying to download a stereo stream will have a bad connection -- lots of dropouts, pauses, etc.). After messing with the settings to your liking, press OK. You'll notice on the window, there is a field labeled: "Song Title" with a checkbox next to it that says "Auto", so does the "URL" field. Both are usually checked by default, and I recommend you keep it that way. Now for "Server control". This section is pretty self-explanatory. The auto-reconnect box and 30 seconds means that, if you ever lose your connection, it will automatically reconnect in 30 seconds. If you uncheck the box, you have to press the connect button yourself if that happens. Changing the 30 to whatever, will be how long it waits before trying to reconnect all by itself. "Advanced Mode". Most of the stuff here you won't be using, but if you're setting up a broadcasting studio by patching the mixer board into your soundcard you need to adjust the volume under this tab. But do this later. OK. We're now done with step 1. Step 3 Configuring the DNAS Server. Ok. If you installed everything normally, then on your start menu, you should have a folder that is named "SHOUTcast DNAS". Click here (Usually it slides out when I let the mouse hover over it), and choose "SHOUTcast DNAS (GUI)". This should bring up a new window called: "Nullsoft SHOUTcast Server Monitor". At the top of the window among the menu options, should be one called "Edit config", click this. It should bring up notepad, and if you have a sound card, you'll probably hear a "DING". In the notepad window that just came up, there are a few things to modify. NOTE: To insure that any changes you make take effect, you need to have the ';' deleted from the beginning of the line, if there is one.
***************************
MaxUser=32 (This is explained in the file. Change it as you will, but this number will not actually represent the number of users, rather the number of repeaters or mirrors that you will be setting up later). Password=<whatever> (Again, explained fully, you'll see a couple of these, make sure you name them all the same so you don't lose track). PortBase=8000 (There's no need to change this, everything else we'll be setting up in the instructions will use this setting). For those things that are already explained, or don't need changing, I'll just breeze through them here. ***************************
SrcIP=ANY DestIP=ANY Yport=80 ***************************
AdminPassword=<whatever> (Remember to make this something you'll remember, or make sure it's the same one you use for your Live365 server). That should work fine for now (click here for a sample of what the notepad window should look like after you've tweaked the code), all the other settings don't need to be altered right now, and you can fiddle with them later if you decide you wish to further customize. Make sure you save, then exit notepad. Find the SHOUTcast DNAS window, and press "Kill server". Then start it again (So it starts using the new settings). Step 4 Here is the part where I tell you how to make it all happen. The exact process here will vary depending on who your provider of broadcast service is. In this case, I'll use Live365 as an example ('Cause that's what I used to set mine up while trying to figure this all out). You need to go to www.live365.com to create a member profile. At Live 365's home page, select the broadcast link (at the top and/or bottom of the page). Then click on "sign up now" on the right hand side of the broadcast page under "Log in:". Note you member name and password. Wait for the e-mail they will send you with a link. When you get the e-mail, activate you account by following the link in the email they send you to set up your profile. NOTE: If you plan to set-up multiple relays at Live365 (each relay you set-up gives you the capacity to carry 365 listeners), you will need to use a new email address for each member profile you create. Click on "Create your own station." Then click "Member Profile," top of right hand column. Now, click on "sign up now," under Register to Broadcast. Select Relay Broadcast and fill-in your IP number/port number, then click "next". If you don't have know what your IP number is, there's an easy way to find out. Click the Start button on the Windows toolbar, choose RUN. In the command field, type: winipcfg. Press enter. This should bring up a window that tells you your IP address. This IP Address is the number of your machine. If the winipcfg window doesn't come up when you do this (and I HATE it when the path is messed with in windows), there is another way to get to it. In the Run box, type this instead:c:\windows\winipcfg.exe. If this doesn't work, then someone obviously messed with the machine in a way that is heinous. There are various utilities on the net for finding your IP number. One which I use is called "Internet Maniac" which has other nifty tools as well. The Port number field on the Live365 page should be set to 8000 (we set this earlier on everything else). After you click "next", you should go to the "Broadcast page" to get the IP number of the relay broadcaster (linked at the top of the page). MAKE A NOTE OF IT YOU NEED THAT! You need the IP relay number for the .pls file that you will be link on your web site. Now, at this point your SHOUTcast DNAS server (GUI) should be registering activity, if you left your max users to 32, then you should have 1/32 users. This tells you that you have the Live365 server listening to you. On occasion, this doesn't always happen immediately. You may have to stop everything, close all the programs we've gone over, REBOOT, and start them up again. Though the settings should be fine. On occasion you may also discover that the Live365 server isn't responding/broadcasting etc. There is an option to resolve this on the Live365 website. Log in, click Broadcaster controls, look down below and find a button called "Reset Broadcast" click this and try again. If that doesn't work, then something funky is going on that will require actual personal attention. Now all you need is the IP# and port of the Live365 server to tell people to go to listen. Step 5 To set up a playlist (.pls) file so that listeners can tune into your stream, open winamp on the monitoring computer. Click on the left side of the border of Winamp and select "Playlist Editor." You should see a gray tab in the bottom left, "ADD," click here. If the playlist is minimized, you may have to click on the dot, net to the X to maximize it. Once maximized, you will see "ADD" and other tabs. Once you click the ADD tab, you need to select "ADD URL," this is where you type in the Live 365 relay IP. You should type something that looks like this: http://167.90.143.150:15879. You can keep adding relay IPs by repeating the above steps (select, ADD, then ADD URL, etc.). Once you've loaded all you relay IPs, select "LIST OPTS" on the bottom right-hand corner of the Playlist Editor. Then click on "SAVE LIST," type in a file name and select type as "PLS Playlist". Make sure you note what folder your saving the .pls file in. This playlist now needs to be linked your website. Once you upload the file and chmode, listeners and broadcasters will be able to "click to listen" and the .pls file will automatically open in winamp and load the relay IPs. HAPPY BROADCASTING:)
Icecast
Handbook [Software mentioned in these instructions can be obtained from http://www.microradio.net] Lame MP3 Encoder Installing Lame is a very straightforward process. We don't actually have to use the lame program itself directly for this setup as Liveice will run lame for us. Normally when installing software, you want to get the latest stable version. However, Lame is a little different since they don't often release stable versions and the beta versions tend be stable and are significantly faster than the stable version. This is the case with the latest beta, 3.89, against the latest stable release, 3.70. There are several ways you can install Lame, if you are running an RPM based system like RedHat or Mandrake, I recommend downloading an rpm and installing that. You can get a recent lame rpm for an intel PC running RedHat 7.x or Mandrake 7.x and above from http://people.hbe.ca/~heckmann/streaming-howto/RPMS. If you are running an older version of redhat or a non-intel based platform (like a PPC apple computer), you can get the src rpm and rebuild it (as the root user): [root@cruch SRPMS]# rpm --rebuild lame-3.88beta-1.src.rpm It will rebuild the binary rpm for you and place it under the /usr/src/redhat/RPMS/i386/ directory. Wether or not you rebuilt it from source, you can install it by doing: [root@cruch i386]# rpm -ivh lame-3.88beta-1.i386.rpm Lame has now been installed. Regardless of what distribution you are running, or if you are running FreeBSD, you can always install lame from the source tar package (assuming it lies in my home directory): heckmann@berg:[/Net/home/t/heckmann ]tar -xzvf lame3.88beta.tar.gz ..... heckmann@berg:[/Net/home/t/heckmann ]cd lame-3.88 heckmann@berg:[/Net/home/t/heckmann/lame-3.88 ]./configure ..... heckmann@berg:[/Net/home/t/heckmann/lame-3.88 ]make ..... heckmann@berg:[/Net/home/t/heckmann/lame-3.88 ]su Password: [root@berg lame-3.88]# make install ..... LAME should now be installed in /usr/local/bin. If you are using FreeBSD, there might be a lame port, read the FreeBSD docs for more info on this. Icecast You can get an rpm from http://www.icecast.org. To install it: heckmann@django:[/Net/home/t/heckmann ]su Password: [root@django heckmann]# rpm -Uvh icecast-1.3.10-1.i386.rpm Preparing... ########################################### [100%] 1:icecast ########################################### [100%] or if you prefer, you can build it from source: heckmann@django:[/Net/home/t/heckmann ]tar -xzvf icecast-1.3.10.tar.gz icecast-1.3.10/ icecast-1.3.10/Makefile.in icecast-1.3.10/README .... heckmann@django:[/Net/home/t/heckmann ]cd icecast-1.3.10 heckmann@django:[/Net/home/t/heckmann/icecast-1.3.10 ]./configure --enable-fsstd creating cache ./config.cache Building icecast-1.3.10... checking for a BSD compatible install... /usr/bin/install -c ..... heckmann@django:[/Net/home/t/heckmann/icecast-1.3.10 ]make make all-recursive make[1]: Entering directory `/Net/home/t/heckmann/icecast-1.3.10' ..... heckmann@django:[/Net/home/t/heckmann/icecast-1.3.10 ]su Password: [root@django icecast-1.3.10]# make install Making install in src .....
Icecast is now installed. Now it's time to configure it. We recommend running icecast as a non-root user as well as putting the icecast config and log files in that users home directory: heckmann@django:[/Net/home/t/heckmann ]mkdir /icecast heckmann@django:[/Net/home/t/heckmann ]cd /icecast heckmann@django:[/Net/home/t/heckmann/icecast ]cp /etc/icecast/icecast.conf . heckmann@django:[/Net/home/t/heckmann/icecast ]cp /etc/icecast/*.aut . Edit the icecast conf file: heckmann@django:[/Net/home/t/heckmann/icecast ]pico icecast.conf It's very well commented (lines that start with the "#" character are comments), so you can follow those instructions, but here' s a brief overview of what you'll need to change: Modify encoder_password, admin_password, and oper_password. Change server_name to your server's hostname Change logdir to the icecast directory in your home. For me that would look like: /Net/home/t/heckmann/icecast Set use_meta_data to 1. you might need this later. Ignore the comments as it works well with recent icecast versions. You can now start icecast by doing: heckmann@django:[/Net/home/t/heckmann/icecast ]/usr/sbin/icecast -c /icecast/icecast.conf -b Icecast Version 1.3.10 Initializing... Icecast comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of Icecast under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. Starting thread engine... [17/May/2001:15:38:56] Icecast Version 1.3.10 Starting.. heckmann@django:[/Net/home/t/heckmann/icecast ] Congratulations, icecast is now installed and running. For some more in depth icecast documentation, you can read /usr/doc/icecast-1.3.10/manual.html. We'll discuss logging into icecast in admin mode later on. Liveice Ok, this is the most important part as liveice is what does all the work, so pay attention. Grab liveice from http://star.arm.ac.uk/~spm/software/liveice.html. compile and install it: [raneyda@ip029-55 raneyda]$ tar zxvf /liveice.tar.gz [raneyda@ip029-55 raneyda]$ cd liveice cd liveice [raneyda@ip029-55 liveice]$ ./configure [raneyda@ip029-55 liveice]$ make [raneyda@ip029-55 liveice]$ su [root@ip029-55 liveice]$ install -c ./liveice /usr/bin/liveice; install -c ./liveiceconfigure.tk /usr/bin/liveiceconfigure.tk
Now your done...All the software is compiled and installed. The only thing left to do to have a working liveice system is the configuration. To do this you can either use included tk configuration tool or copy ours. To run the Tk configuration tool: heckmann@django:[/Net/home/t/heckmann ]liveiceconfigure.tk Here's what the produced liveice.cfg looks like: # liveice configuration file # Automatically generated SERVER localhost PORT 8000 NAME LiveIce Radio GENRE Live URL http://www.icecast.org PUBLIC 0 X_AUDIOCAST_LOGIN PASSWORD xxxxxxx SAMPLE_RATE 22050 MONO SOUNDCARD HALF_DUPLEX USE_LAME3 /usr/bin/lame BITRATE 24000 VBR_QUALITY 1 NO_MIXER PLAYLIST playlist DECODER_COMMAND mpg123 MIX_CONTROL_MANUAL CONTROL_FILE mix_command TRACK_LOGFILE track.log
The most important option here is SERVER, as you need to specify the DNS hostname or IP address of the server you are going to use. For more information on editing the liveice.cfg file, read the README.liveice file that comes with the liveice package (tarball) as well as the documentation on the web at http://star.arm.ac.uk/~spm/software/liveice_usage.html. Liveice uses the special /dev/dsp underneath the works so to speak to get the audio signal from the soundcard. to If you are running RedHat or Mandrake the permissions of this special file should already be set to the currently logged in user. However, if your not running either one of these distributions, or plan to start liveice remotely, you might want change the ownership of the /dev/dsp file to be the same as the user that is running liveice. [root@django icecast]# chown nameofyourliveiceuser /dev/dsp Liveice is a little rough around the edges and one of the things that can be a little confusing is the way it reads the liveice.cfg configuration file. By default it checks to see if there is as a file named liveice.cfg in the current directory. If there is it loads that file, if not, you have to use "-F" option to specify a config. file to use (e.g liveice -F alternate_liveice.cfg). The problem is that if you have a file called liveice.cfg in the current working directory and you use the -F flag (option), liveice will use _both_ files! Just be careful. OK start liveice: heckmann@django:[/Net/home/t/heckmann ]liveice That's it! Use an MP3 player on a different machine to listen to the stream, the URL or location usually is http://servername.domain.org:8000/. Now you might want to send out a high quality and a low quality stream, to do this use the ENCODER_STREAM_SET option in the liveice.cfg file: # liveice configuration file # Automatically generated NAME LiveIce Radio GENRE Live URL http://www.icecast.org PUBLIC 0 X_AUDIOCAST_LOGIN MONO SOUNDCARD HALF_DUPLEX USE_LAME3 /usr/bin/lame VBR_QUALITY 1 NO_MIXER PLAYLIST playlist DECODER_COMMAND mpg123 MIX_CONTROL_MANUAL CONTROL_FILE mix_command TRACK_LOGFILE track.log ENCODER_STREAM_SET 0 SERVER localhost PORT 8000 PASSWORD hackme BITRATE 24000 MONO SAMPLE_RATE 22050 MOUNTPOINT /low ENCODER_STREAM_SET 1 SERVER localhost PORT 8000 PASSWORD hackme BITRATE 64000 MONO SAMPLE_RATE 44100 MOUNTPOINT /high Note the "MONTPOINT" option, this allows us to send to streams to the same icecast server. Also, the "ENCODER_STREAM_SET" allows us to send streams to different servers. It does however run another instance of lame for every stream set so watch your CPU usage, or use relays at the icecast (server) level. One thing to consider here is that if you are sending to different servers is that liveice is a little rough around the edges and if the connection is lost with one of the servers, the whole stream will go down. (Re)playing MP3's If you want to play MP3's during your broadcast, the easiest thing to do, would be to use a second computer with an MP3 player and send it's output to your mixing board, you can then easily and seamlessly send it to the encoder box. A note about levels While your streaming, it's a good idea to keep an eye on the liveice levels to make sure that they don't "clip". You want to avoid distortion as it'll sound like crap. Another thing to do would be to monitor your stream. Meaning you should actually listen to the live stream using an MP3 player to check for distortion or dropouts. Using the icecast ADMIN console Using the console should apply wether or not you run your own icecast server you may have to use it.: heckmann@django:[/Net/home/t/heckmann ]telnet django.hbesoftware.com 8000 Trying 192.168.1.165... Connected to django.hbesoftware.com. Escape character is '^]'. ADMIN hackme OK -> sources Listing sources [Id: 39] [Sock: 9] [Time of connect: 17/May/2001:18:21:17] [IP: 127.0.0.1] [Host: localhost.localdomain] State: 1] [Type: encoder] [Proto: x-audiocast] [Clients: 0] [Dumpfile/fd: (null)/-1] [Priority: 0] [Song Title: ] Song URL: http://yp.icecast.org] [Stream Message: (null)] [Song Length: -1 bytes] [Stream Name: LiveIce Radio] [Stream Genre: Live] [Stream Bitrate: 32] [Stream URL: http://www.icecast.org] [Mountpoint: /low] [Description: LiveIce] [MBytes read: 1] [MBytes written: 0] [Client connections: 0] [Connected for: 4 minutes and 52 seconds] [Id: 40] [Sock: 12] [Time of connect: 17/May/2001:18:21:17] [IP: 127.0.0.1] [Host: localhost.localdomain] [State: 1] [Type: encoder] [Proto: x-audiocast] [Clients: 0] [Dumpfile/fd: (null)/-1] [Priority: 0] [Song Title: ] [Song URL: http://yp.icecast.org] [Stream Message: (null)] [Song Length: -1 bytes] [Stream Name: LiveIce Radio] [Stream Genre: Live] [Stream Bitrate: 64] [Stream URL: http://www.icecast.org] [Mountpoint: /high] [Description: LiveIce] [MBytes read: 2] [MBytes written: 0] [Client connections: 0] [Connected for: 4 minutes and 52 seconds] End of source listing (2 listed) > quit Uh, ok, bye! Connection closed by foreign host. heckmann@django:[/Net/home/t/heckmann ] Note
that after the ADMIN password command is put in you have to hit enter
twice. Read the icecast documentation to learn about what you can do with
it. It is entirely possible that you won't have access to the console. |