Select Regions

How To: Stream Video from Your Webcam to the Internet

admin
Jun 18, 2008

Page 1 of 10

You know it and I know it: The moment you leave your house, your pets have a party. But the moment you return, they go right back to their mild-mannered pet personas. To catch them in party mode, you need a streaming video camera!

By connecting a typical webcam to an old laptop or PC running the appropriate software, you can set up a streaming video feed that you can access from anywhere on the Internet. It’s easy to do and you’ll be able to peek into your home from anywhere you have Internet access. We’ve even peeked in on our pooch from a cellphone.

Even though it seems like a fairly simple project, you’ll need to muck around in the configuration screens for your router. Let’s get started!

1. Prepare Your Streaming Server

The first thing you’ll need to do is configure the machine you’re going to connect the camera to. You’ll need to install the drivers and software for your webcam, install the streaming software, configure the machine to use a static IP address, and disable power management—you don’t want the machine going into a power-saving mode.

To disable power management, open the Control Panel and go to the Power Options panel. Then make sure the System Standby option is set to Never. Make sure your webcam is working properly—most cams include an app that shows you the output.

To configure your rig for a static IP address, the first thing you need to do is find the appropriate settings for your config. Go to the Control Panel, then click the Network Connections icon. Right-click your Internet connection—it will usually be called Local Area Connection—and click Status. Go to the Support tab and click Details. You should write down your current IP address, default gateway, and DNS servers; you’ll need that info when you configure the static IP.

Now, close that window, go back to the General tab, and click Properties. Double-click Internet Protocol (TCP/IP). In the window that opens, you should click “Use the following IP address.” This is where it gets tricky. To figure out your new static IP, you should look at the default gateway setting you wrote down before. Then add one to the final number in the default gateway (it’s usually 192.168.0.1, so your new IP would be 192.168.0.2). Your subnet mask will be 255.255.255.0 and you can use the same default gateway and DNS servers you were using before. Press OK and close all the windows you just opened. If everything works and Windows doesn’t give you an error, you can move on to the next step. If Windows says your IP is already in use, you’ll need to try another IP address.

If you’re using a software firewall on this machine, you’ll also need to configure it to allow TinCam (the streaming app) to receive requests on port 8080, or the firewall will stop them. Consult your firewall’s documentation for info on enabling port forwarding for a single app or port.

2. Configure TinCam

Open TinCam, and cancel out of the configuration wizard. The wizard helps you configure a webcam that posts a static image on the web, but we’re going to be streaming video, so it’s not necessary. Click the Setup menu and open the Setup option, then go to Video Devices and make sure the box for your camera is selected. Then click the sub-menu for your camera and configure its output format and the affiliated audio source (if you want to stream audio, that is).

This is also the pane you use to set the streaming resolution. The resolution has a direct impact on the number of clients you can stream video to. If you set it too high, your connection will only be able to support one stream. Too low, and you won’t be able to see anything on your video. We recommend starting at 640x480, then testing the video outside your home LAN to see exactly how it performs. Of course, if you’re only going to stream the video within your home, bandwidth is no object, and you’ll be able to stream at the maximum resolution of your webcam.

Next, you’ll need to create the streaming file, which you’ll need to upload to your personal website. This .wvx file contains the relevant information about your video stream—including the IP address, bit rate, and format—which lets software players find and connect to your server. Configure the downstream bit rate for your connection type (e.g. DSL, cable, T1) and the maximum number of users you want to support. Then click the Detect button to embed your IP address in the file, and make sure the Create Stream File box is checked. When you close the dialog box, the streaming file will be in the directory you specified earlier.

3. Design Your Streaming Page

The nice thing about your streaming page is that it can be as fancy or simple as you like. The simplest thing to do is to make a link to the .wvx file (created in Step 2) on your website. This is the code we used on our webpage (replace the brackets with greater than/less than):
[a href=”http://www.url.com/webcam.wvx”]Webcam[/a]

Of course, you’ll need to replace
www.url.com/webcam.wvx
with the path to your streaming file.

If you want your own streaming page to look a little fancier, use Notepad or your favorite HTML editor to create the page, just like you would for any other webpage, and embed this code where you want the video player to show up (replace brackets with greater than/less than):

4. Configure Your Router

Next, you need to configure your router to forward connections from the net to your streaming server. The details will vary from router to router, but the basic steps are the same. First, you need to access your router’s web interface. Open your browser and type the IP address you wrote down earlier for your default gateway—your router is your gateway. Enter your router’s password when prompted, and then look for a page labeled Port Forwarding, Gaming, or Servers.

Regardless of your router’s brand, you’ll need to configure a port to forward, as well as tell the router which type of traffic to pass through, and the destination on your internal network. The port range will be 8080 to 8080, the IP address will be the static IP you assigned in Step 1, and you should forward both TCP and UDP packets. Make sure your new forwarded port is enabled, click the button to apply your settings, and you’re done with the router config.

5. Upload and Test Your Stream

Now you’ll need to upload the stream file you created in Step 2, as well as the HTML file you created in Step 3, to your website. It’s a good idea to put these in a subfolder of your public_html directory. That way, you can easily add a password to the subfolder, to give your cam minimal protection from prying eyes.When the files are uploaded, go to your streaming server, open TinCam, click the Capture menu, and then select Video Streaming. Your stream should be live at this point. Browse to the page you uploaded, and check it out!

Dream Machine:

Magazine:

For nearly 20 years, Maximum PC is considered by enthusiasts to be the absolute source for the latest hardware reviews, in-depth analysis, and breaking news on the latest PC hardware. Our team of industry experts give you the guidance you need to make the most informed buying decisions and deliver the best guides on how to use and optimize your experience. If you’re looking for the definitive reference on PC hardware, you’ve found it.