Do It Yourself Shack - a site for simple do it yourself type projects, how to tutorials, reviews and more.

Wednesday, March 17, 2010

Media Streaming

OK, you got stuff ... right? And you can't always take it with you cause its anchored down at home. I'm not talking about Mp3 content, or video... there are lots of portable solutions for that, but more like, radios, cameras, microphones, telephones and on and on. Stuff that you might monitor at home and would like to be able to monitor while away from home. Here is the solution I use frequently.
Windows Media Encoder can be downloaded from Microsoft for free, and will let you customize a streaming solution for what ever content you want to deliver to the web. A case in point and what I will use as an example, is my Uniden Bearcat 245XLT  Trunk Tracking Scanner that I monitor, along with some of my friends and family. Nothing very interesting to listen to, unless a local situation arises and its nice to have the public service channels available so you can stay on top of the situation.
Of course you have to install Windows Media Encoder series 9 to your Windows 2000 or XP computer. In my case with the police scanner I feed the audio output from the headphone jack of the scanner to the line input of the sound card with a standard audio cable and adjust the audio output of the scanner to about 1/3 volume. Now fire up Windows Media Encoder from your computer. It will launch the setup wizard, and this is where you customize for your needs. I am not going to cover all the configuration steps, but just a few that I feel are important.
In my case broadcasting a public service scanner, I choose live event. As the setup wizard precedes, I select audio only and the default audio device. For Broadcast method select pull from encoder, and select a port number to broadcast on. The application will find a free port for you if you wish. Whatever port you choose, remember you will have to open this port on your firewall and or router to make this stream available outside of your network.
The Encoding options are next. My recommendations here are to chose the lowest quality setting that are acceptable to you. In my case with a police scanner I use the voice quality audio and 11KBs stream, but you may want to do otherwise. Remember the higher the quality the more bandwidth need for output and reception. Police scanner audio is typically pretty poor anyway so voice quality is fine for this.
During the remainder of the wizard setup you will have the opportunity to name the stream, restrict access, archive the stream to a file, and a few other miscellaneous settings. Chose whatever works best for you, and remember you can always go back and experiment with the settings till you have them to your liking. You may have to adjust the audio properties in your computer configuration to get the best output. While you adjust the properties of the audio pay particular attention to the meter in Windows Media Encoder, and adjust so the sound level is upper range but not peaking or clipping. Once you do have the settings tweaked to your preferences save the session, and you can launch from that in the future so that you don't have to configure each time. See its really pretty easy and it works like a champ.
Here's the link to my scanner feed for you to sample. What you will hear is the Sullivan County Tennessee 800 mhz Pubic Service Trunk Tracking system. It's pretty boring stuff most of the time, unless there is a catastrophe or crime going on but your welcome to listen.
Connecting to your stream is easy. For inside your network, just plug mms:// into your browser address field, and it should launch Windows media player. Substitute the x's above for your network IP address, and the z's with the port number you selected earlier. To connect outside of your network you have to use the IP address that you get from your ISP and the port you selected, or use a dynamic DNS service to point a hostname to your IP address. There are several dynamic DNS services that are free, and some for pay. I use which offers both free and pay service. Their documentation is simple and gets you going right away. With a dynamic DNS name you can then connect to your stream from any internet location with a name instead of and IP address.
You can launch this stream from within your preferred players instead of a browser, by telling the player to open a URL, and plug in your address information.
I have used Windows Media encoder for cameras, telephones, satellite radio etc. Most anything that provides an audio or visual output can be configured to stream this way. And in addition, media files that you have stored on your computer can be streamed in the same method, just choose the appropriate configuration in the setup wizard and you can figure out the rest easily.

No comments: