Setting up your own live video feed
By George Gardner
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 - click to enlarge
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 - click to enlarge
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 - click to enlarge
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 - click to enlarge
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 - click to enlarge
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 - click to enlarge
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 - click to enlarge
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.
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 - click to enlarge
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:
<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>
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 - click to enlarge
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.
Related:






Stumble It!

May 1st, 2007
Thanks a billion, I’ve been trying to find a straightforward guide for this for weeks. My only complaint is the html provided has issues with a transitional doctype.
May 28th, 2007
Hey, I’m trying to set up a live feed for my room but whenever I put my page on my site in Firefox, it says missing plugins, any help?
June 12th, 2007
Thank you for making an ease of something other advisers seemed to be struggling with themselves. Was streaming a nest cam onto the net during a morning. When I find what ‘value’ and ‘SRC’ fields mean I can set about making it viewable from our webpage! That’s how ignorant I am of computerspeak.
Thank you once again.
June 20th, 2007
i have tried to get windows media encoder but it wont let me get it, is there an alternative?
June 25th, 2007
thanks for posting this tutorial, Its been really good to see how it works, however on my computer I have the following problem
url for internet connection could not detect
any ideas on how I can get past this? I’m using a bt hub. I can stream over my own network but I carnt get the web page bit to work because of this problem. thanks again
July 21st, 2007
thanks for the tutorial. Unfortunately I wasnt able to get this to work. I have a linksys router and a comcast router, so maybe its getting confused. But I did what you said to do step by step, and I couldnt get it to work…darn! I really wanted to get this to work out…if you have any further suggestions please let me know…thanks
July 21st, 2007
Thanks for the tutorial. Unfortunately I was not able to get it to work out. The page kept having errors. I am using a linksys router along with a comcast router. Maybe its getting confused. If you have any other suggestions that would be great! Again, thanks for the tut!
September 16th, 2007
windows 2000, windows media encoder 9(Could not detect) url for internet connection. Cannot view LAN OR WAN videocast on WMP (not found).
Did port forwarding on my linksys router but still does not.Help please
Thanks.
September 23rd, 2007
thank you so much for the simple run down. i downloaded windows media encoder 9. i can see the video, but i can’t get the audio. i’m running the camera through a pinnacle 700usb, it’s listed in the “video” device options but not the “audio” the only options are: default audio, realtek hd audio, or multichannel WAV source and NONE of them work1 i’m so stuck, any suggestions? thank you -raven
October 17th, 2007
thanks for the tutorial - i can transmit to the player but my transmission loops after a few seconds and replays underneath what i am saying - result is something that sounds like about 20 dj’s all speaking at once.
i would be so grateful for your help with this as many people seem to have the same problem but no one seems to have an answer - urgently need to get this to work.
thanks
alex
January 16th, 2008
Very nice summary of Kulvir Singh Bhogal’s article of April 2006 here:
http://www.informit.com/articles/article.aspx?p=465446&seqNum=2
Perhaps you should give him some credit.
September 14th, 2008
Trying to get a feed of my Hauppauge! MinTV PVR USB2, but no matter what I do, It won’t get a feed. Help please!
October 27th, 2008
What do I put in for “Value” where it says “False”
November 24th, 2008
Followed the instructions right up to “Open Windows Media Player. Click on file>open URL.” I am running Vista and there isn’t a “File” option. How do I proceed from here. I was told I couldn’t do live video from my website because BlueHost doesn’t support it. Am I screwed?