Webcam Setup

Get A Webcam - although this is an obvious starting point, you DO need a camera that is hooked up to your computer and the software to capture pictures so you have something to show the world when they surf in to take a look at whatever you are showing them.

Probably one of the neatest, yet often overlooked, features on the web is the live webcam feed. In addition to broadcasting a real time feed from your webcam, you can also broadcast archived media files from your PC. The process is quite simple, and does not even require a website to broadcast them through. In this article, we’ll show you how it’s done.

Requirements

For this demonstration, we’ll be using Windows XP with a tested and functional webcam; we’ll leave that part up to you. A webcam, however, is not required; you can broadcast media files from your computer as well. You’ll also need some software to encode the media and stream it across the Internet. We recommend using Windows Media Encoder, which is a free application that we’ll be using for this demonstration. Finally, we recommend a broadband connection to ensure your live streams aren’t choppy and hesitant.

How it’s done

Once you have Windows Media Encoder installed, you’re ready to begin. Upon the initial launch of WME, you’ll notice a screen similar to the one shown below.

Initial startup

You’ll want to select ‘broadcast a live event’ from the wizards tab. After clicking ‘OK’, a new session wizard dialogue box will appear, and prompt you to select the video and audio device you’ll be using for your live feed.

Device options

This part is self explanatory; if you have working devices on your machine, they will appear in the drop down menus. Click ‘next’ to continue.

You will then be prompted to select your broadcast method; there are 2 selections: push to a Windows Media server, and pull from the encoder. Select ‘pull from the encoder’ and continue by clicking ‘next.’

Broadcast connection

At this point, you’ll be asked to set up your broadcast connection port. You’ll need to find an open port on your computer by clicking the ‘find free port’ button as shown below. After a free port is selected, the URL for Internet connections and URL for LAN connections will change to reflect the new port number; write these numbers down as you will need them later. Click ‘next’ to continue.

Encoding options

Now comes the rigorous task of selecting an encoding option; this number should vary depending on the speed of your connection and the speed at which your audience is connected. You want viewers to be able to watch the live video continuously without any interruptions. As a start, we suggest selecting ‘low bandwidth video’ and ‘multiple bit rates audio’ for the video and audio encoding respectively. Once you’ve successfully set up your first feed, you may want to play around with those settings to determine which will best suit your applications. Click ‘next’ when you are finished.

The next 3 stages in the new session wizard are not necessary; however, we’ll run through them quickly.

The archive file section of the wizard allows you to record a copy of your feed onto your computer as a Windows Media Video (WMV) file. If you do not wish to save the broadcast, simply select ‘next’ to continue.

The include video files dialogue will allow you to include video files that contain welcome, intermission, and goodbye content with your live feed. We will not be using any for the demonstration; continue by selecting ‘next.’

Display information allows you to personalize your broadcast by adding a title, author information, and a general description; however, it is not necessary to supply this information. You will be brought to the settings review screen after clicking ‘next.’

Settings review

There is little to be said about the settings review, but you must make sure the ‘begin broadcasting when I click finish’ option is selected. Clicking ‘finish’ will start your live feed.

Viewing your live feed

Upon broadcasting, you should see a screen similar to the one shown below with a preview window of the feed.

 

Broadcast session

Viewers can watch your live feed using one of two different methods; although, both do require Windows Media Player to function. Before you begin watching your feed, you’ll need to determine the broadcast address.

Broadcast connection

The address you’ll need is the one that you wrote down in the broadcast connection section of the wizard. If you have a network set up in your home and wish to view the feed from the network, you’ll be using the URL for LAN connections address. If you have no network, or would like viewers to watch your feed  over the Internet, you will use the URL for Internet connections address.

The following applies only to those using a router

If you have a router in your home and would like viewers to watch your feed from over the Internet, you may need to forward the port to the appropriate IP address on your home network. For instance, we’re using port 1616 for the demonstration; so we would have to forward incoming port 1616 with a TCP protocol to 192.168.1.101. Settings will differ from router to router, so we’ll leave that up to you; however, we have attached a screenshot from a Linksys WRT54G router utility to assist you.

Linksys web-based router utility

192.168.1.101 is the IP address for the node on our network that is broadcasting the feed. Your internal IP address may differ, but may be found in the URL for Internet connections address that was given to you in the broadcast connection  section of the new session wizard. You will use this address to determine where the port should be forwarded.

Next, you’ll have to determine your external WAN address. This address can be found using IPCheck. Your broadcasting address will be in the format: http://WAN_IP_ADDRESS:PORT

In our case, we would use the address http://xx.xx.xxx.xxx:1616 where the IP address has been replaced by x’s for security purposes.  Once you know the address at which your feed will be broadcast, you can simply open Windows Media Player, and click File>Open URL.

Windows Media Player open URL

Type in, or instruct your audience to type in the broadcasting address. After a slight buffering delay, your live feed should be viewable. Setting up your live feed on a webpage

If available, you may want to set up your feed to be viewable on a webpage. This method is more advanced, but makes it more convenient for your audience to view your feed.

In its most simple form, the code to provide a live feed is:

<SCRIPT language="JavaScript">
<html>
<head>>
<title>Untitled≪/title>
</head>
<body>
<object ID=”MediaPlayer” WIDTH=”320? HEIGHT=”270? CLASSID=”CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95? STANDBY=”Loading Windows Media Player components…” TYPE=”application/x-oleobject” CODEBASE=”http://activex.microsoft.com/activex/controls/mplayer /en/nsmp2inf.cab#Version=6,4,7,1112?>
<param name=”autoStart” value=”True”>
<param name=”filename” value=”http://xx.xx.xxx.xxx:1616?>
<param NAME=”ShowControls” VALUE=”False”>
<param NAME=”ShowStatusBar” VALUE=”False”>
<embed TYPE=”application/x-mplayer2? SRC=”xx.xx.xxx.xxx:1616? NAME=”MediaPlayer” WIDTH=”320? HEIGHT=”270? autostart=”1? showcontrols=”0?></embed></object>
</body>
</html>
</script>
Of course, you’ll have to enter the appropriate address in the value and SRC fields; you may also want to adjust the width and height of the object to match your broadcasting size.

Broadcasting media from a file

If you don’t have a webcam installed, you may want to provide a live feed of  the media files on your computer. In this case, upon the initial startup of Windows Media Encoder, you would select ‘custom session.’

Custom session

A session properties dialogue box will then appear. Selecting ‘file’ as the source from in the sources tab will allow you to browse to a media file on your computer. As a rule of thumb, any media file that can be viewed or played in Windows Media Player should broadcast in Windows Media Encoder as well.

The port number you will be using is located on the output tab. By default, WME uses port 8080; although, we recommend clicking the ‘find a free port’ button located to the right of the port number.

Other settings can be defined here, but they are not required. Simply clicking the green ’start encoding’ button will broadcast your media file. You can use the steps defined in the previous sections to view your live broadcast.

Concluding

We’ve discussed how to set up a simple live feed from a webcam or media file, and broadcast it over a home network or the Internet to allow viewers, or yourself, to monitor anything from a remote location.

If you’re looking for ideas, we suggest checking out Earthcam; they’ve been serving up webcams for 10 years and have acquired an enormous collection. Such elegant feeds as the New England Aquarium, the Big Ben Cam, or the beaches of Hawaii can be viewed here as well as other oddities like the refrigerator cam in Japan. And, yes, the light does turn off when the door closes.

Back to Main Page

© copyright (1995-2009) Alpine Software. All rights Reserved.

last update: 04/01/2013, 10:33:54
OL