Cowboy Music Page
Webcam Reviews

So, you want to set up an Internet radio station or streaming webcam like mine?

So simple even a horse can do it.

It's actually not too difficult. Using these instructions, you could be up and running in about half an hour, if you are familiar with how to configure your router to forward ports.
If you don't know what a port is, you can get an introduction from my How To Setup a Webcam page.

While my current setup is a great deal more complex than the method described here, this is a system that almost anyone can build and operate with only a minimal understanding of streaming media and networking, and it doesn't cost anything. My KWBY music station used this method for over six months before I developed my current system.

Using a streaming server, including Windows Media Encoder as described in this article, there will be a delay of anywhere from a few seconds to over a minute, from when your music plays (or when you wave at your camera) and when the person on the other end hears or sees the result. This is due to buffering in both the server and on the other end in the player. As a result, this class of streaming servers are not suitable for live IM chatting or VOIP (voice over Internet Protocol) communications.

February 4, 2008 Please don't write me asking for help because you can't get this to work. If you follow all these instructions, without skipping over some part, have your router properly programmed, and have read and understand each related page linked to from this article, the stream will work. I received 10 such questions in the week before I posted this, all of which, after much agonizing troubleshooting, ended up being because they had skipped some section in the tutorial because they didn't understand it. This page receives over 4,000 visitors a month. I'm sorry, but I just don't have the time to hold the hands of those who don't read instructions.

There are any number of streaming systems or services you could use, such as   SHOUTcast,   Live365,   or   Real Server,   along with many others, but these are either very complicated to set up, require listeners to install special software, or have additional charges involved.

I recommend setting up a station using Windows Media Encoder rather than one of the other systems for several reasons;

  1. Windows Media Encoder and its transmission is free
  2. Windows Media Encoder is simple to set up
  3. A Windows Media station can be received by just about any computer running Windows (and most Macs too, with the correct free plug-in)
  4. All of the other systems I have looked at, require the listener to install proprietory players to hear your station, some of which force 3rd party advertisements onto your listeners

Notice Sept 15, 2010. Microsoft is replacing Windows Media Encoder with a new program called Microsoft Expression Encoder. As far as I can tell, Expression Encoder can not be used to stream media directly from your computer like Media Encoder. A live stream output of Expression Encoder must be fed through a Windows Media Server. The Media Server component is now free but it will only run on a Windows 2010 Server platform.

As of today, the link below in #5 will download Media Encoder from Microsoft, but I do not know how long the older encoder will be available. Get it while you can. If this link fails, you can try searching Goggle for wmencoder.exe, you might find a working link somewhere.

You can use Expression Encoder to create content, for streaming or simple http download, however, local streaming is not included. I am still investigating Expression Encoder as I get the time and will update this page when I learn more. But that may be a few months.

What you will need:

  1. A high speed Internet connection.
  2. An understanding of how to program your router to forward ports.
  3. A source for your music.
    CD player, MP3 player, computer, microphone, or even a radio tuned to your favorite station.
  4. A computer running Windows Media Encoder to stream your music.
    See below for minimum requirements.
  5. Windows Media Encoder version 9.
    This is a free program. Download the encoder from Microsoft's website and install it.
  6. You will be using Unicast streaming, as most home users cannot transmit Multicast streams. If you don't understand that, don't worry about it, it's not important for the beginner, but the following block contains a brief explanation.

Unicast vs Multicast

Unicast

In a Unicast environment, your server must have a dedicated stream to each individual listener or viewer. Using Windows Media, the best audio stream is 148k per listener. The best quality video stream is 1,128k (1.2 megs) per viewer.

To Unicast a 37k audio stream to say 100 people, your upstream bandwidth would need to be about 3,700k or 3.7 megabits per second. To Unicast a highest quality video stream on Windows Media to 100 people, your upstream bandwidth would need to exceed approximately 1,200 megabits or 1.2 gigabits per second, and of course you would need server(s) to deal with that kind of output.

Multicast

I have no actual experience in setting up a Multicast environment, but the basic concept is your server outputs a single stream which is then split by the routers along the line between you and your listeners or viewers. All these routers, including your local router and across the Internet, must be configured to accommodate Multicasting.

At the current state of the Internet, only high end router equipment can be configured for outgoing Multicasting and you pay a premium to your Internet provider for such services. I don't believe this is a service you are likely to have available in a home environment for some time to come. That's what streaming media hosting services are for. You push a single stream to their servers and they deal with the configuration, bandwidth, and complicated stuff, for a price $$$$.

Minimum configuration to capture and broadcast audio:
266 MHz processor, such as an Intel Pentium with MMX, Windows XP or Windows 2000, 64 MB of RAM. Supported sound card. Keep in mind that these are the MINIMUM computer requirements. If your computer only meets the minimum requirements, don't expect this computer to be able to do anything else.

Recommended configuration can also capture video:
866 MHz processor or higher, such as an Intel Pentium III or AMD Athlon, Windows XP, 128 MB of RAM or higher. Supported audio-capture device.

If you are going to use a computer running Windows Media Player as your source, don't use the same computer to stream your station as the one playing your music. It won't work, unless you have a very powerful late model computer which isn't doing much else. Media Encoder will not run smoothly and you will get some most peculiar results, such as sputtering, sound speed fluctuations, dropouts, and more. While the results are quite entertaining for a minute or two, it is unusable as a webcast station. I learned this the hard way. I spent a lot of time setting everything up and then had to start over again.


Now comes the more complicated part
You will need to select a port that your listeners can connect through. It has to be a port that your Internet provider does not block and that isn't being forwarded elsewhere on your network. I use port 444 because of some port conflict issues with my setup, but since the default port for Windows Media Player is 1755, this would be a better one for you to start with.

Chose the streams you want to make available. There are three major points to consider when choosing the stream speeds you want to offer.

The higher the stream speed you offer, the better the quality of your music or webcam image. However there is a trade off. If you are netcasting from your home, your upstream speed is probably limited, and the higher your stream speed, the fewer simultaneous listeners you can have.

For example, let's say you have a DSL connection which is advertised as 250k upstream bandwidth. Remember, this is your maximum upstream bandwidth, only obtained under ideal conditions. Much of the time your bandwidth will be less. Also, remember that you are going to have to use part of that bandwidth for yourself, such as for sending e-mail.

Now, if you were to choose the 135K stream and you get 2 listeners who connect at the same time, they will occupy 270k - that's already over your bandwidth. With only 2 connections, your listeners will hear audio dropouts, or even connection timeouts, especially while your e-mail is being uploaded.

For a music station I recommend that you choose multiple bit rates, include 11, 15, 19, and 24 (see #9 in the next section). The 11 and 15 k stream will give dialup users a connection even if they are experiencing very slow speeds. If you have a really fast connection, add a 37 bit rate stream. The 37 bit rate is as good as an FM radio station so there is really no need for anything faster for just audio. Video is another matter and will occupy much more bandwidth. For a webcam, your choices on the low end will be more limited. Start with the 28k and 43k bit rates and see how they look, then go from there. I have a 2mbit upstream connection, so I can support about 28 simultaneous connections at the 37kbts speed.


Now for the fun part!

  1. Program your router to forward your selected port to your server computer
    (and open any firewalls if neccessary)
  2. Plug your player output (headphone or speaker jack) into the AUX input of the streaming server computer (usually a blue jack)
  3. Start Media Encoder
  4. Choose "Broadcast a live event"
  5. Uncheck the video device (unless you are setting up a webcam stream)
  6. Chose your sound card from the audio select list (and camera if using a webcam)
  7. Select "Pull from the encoder"
  8. Enter the port you picked above
  9. Choose the stream rates you want to make available to your listeners
  10. Do not select "Archive"
  11. Enter a Title, Author and other information for your station
  12. Click "Finish"
  13. Begin playing your music
  14. Click the "Start Encoding" button on the server
Your station should now be online for netcasting


Listening to your station

Instruct your listeners to open Windows media player, press Ctrl U, and enter the following URL;

mms://3.235.243.45:444/ (notice that says mms:// not http://)

3.235.243.45 is your current IP address. Change 444 to the port you have chosen to use. If you are using the default port (1755) then you can leave off the last colon and the port number. Your IP address probably changes every few days so you will need to modify this file each time you use it. See next section on Dynamic DNS for how to use a dynamic DNS service to be able to use a name rather then your IP address.

(This is VERY important)
If you have a website where you want to put a link to your station, you will need to create what is called a .wvx file. This is a simple ascii file which can be created in Windows Notepad using a wvx extension. The file will contain the following text.

<ASX VERSION="3.0">
<ENTRY>
<REF HREF="mms://3.235.243.45:444" />
</ENTRY>
</ASX>

Substitute the port number you chose instead of my 444. You can leave the port number off if you are using the default port.

Name the file somthing.wvx
place the file on your website and create a link on your page to that file, not to the source music.

Simply making a link to your station in a web page will not work with newer media players and some web browsers. Some older browsers may work but not the newest ones. You MUST link to this wvx file, not directly to your stream. The wvx file has to link to the stream.

Now, your friends can listen to your own personal Internet radio station, or watch you on your streaming webcam.


DNS or your changing IP address

Because your IP address probably changes frequently, you may want to sign up for a Dynamic DNS service so you don't have to give your listeners a new IP address each time they connect. See my Dynamic DNS page in my webcam review section for more info.


Number of listeners

By default, Windows Media Encoder is limited to 5 simultaneous connections. You can modify this number by editing the Windows Registry. This is rather technical and if you are not familiar with the Registry I don't recommend you try this without help from someone who knows computers. Most people's Internet connection could have bandwidth problems with more than 5 listeners anyway.

Click on Start > Run then type in   regedit   and click OK.
Now search for the following key;

HKEY_CLASSES_ROOT\Software\Microsoft\Windows Media Tools\Encoder\MaxClientConnections\

The default is 5. You can change that to whatever number you want to allow to connect, but remember the restrictions on your bandwidth.


Advanced setups

If you don't know what command lines or batch files are, then this section is not for you.

The problem with the above process, using the graphical interface, is that the stream will not start on its own. You can save the profile and place it in your startup group, and the program will start, but not the stream. You have to manually click "Start Encoding" to make it work. However, there is a command line version which can be used if you want an unattended station to start automatically when Windows starts up.

You need to create a Windows Media Encoder Profile. Once you have configured the encoder as described above, click on File, Save, and save the profile to a location of your choosing using whatever name you want. (Note: if you add or remove an audio or video device from your computer the profile may not work correctly because the device numbers may change. If so, you will need to go through the settings process again and resave the profile.)

Now you need to create a batch file which will start the command line process. It would make the process easer if you save both your profile and batch files in the Windows Media Encoder folder. C:\Program Files\Windows Media Components\Encoder\
Your batch file should look like the following...

cscript.exe   wmcmd.vbs   -wme My_profile_file.wme   -duration 9000000

Here's what all that means. Note: you will need to include the path to where the program and files are located in the batch file.

Place a shortcut to this batch file into your Windows startup group.