We’ve got a couple of Linksys WVC54G IP cameras lying around the office from a previous project, so I was thinking “How hard would it be to create a page I could navigate to from my home PC (or media center) to view live video streams from these cameras?”
Apparently, it’s a bit harder than one would think…

First off, the Linksys WVC54G isn’t that ‘nice’ to configure, but there’s enough postings about the wizard and why one should avoid it out there for me to assume you’ve got your camera(s) configured with static (or ‘fixed’ in Linksys parlance) IP addresses so, on to the video streams.

Linksys expect you to use their subscription service and or view with a local browser with all their branding around the video stream… eeew, no – I don’t think so.
A few million googles later and we have managed to find the following information about video streams from the Linksys.

I was initially toying with embedding the default Linksys page in an appropriatly sized IFRAME

<iframe src="http://user:passwd@[camera address]/img/image.cgi?next_file=main_fs.htm></iframe> 

But that would have involved automatically scrolling the frame to line up the video streams and it seemed like too much work so, a few more googles and I found that there are streams avalible directly from the camera as follows:

  • http://[camera address]/img/mjpeg.jpg <em>[Motion JPEG]
  • http://[camera address]/img/mjpeg.cgi <em>[Motion JPEG]
  • http://[camera address]/img/video.asf <em>[ASF Stream]

The ASF stream is the easiest to work with (given the Microsoft Nature of the target viewing device) so, after plugging the address into Windows Media Player (given a browser http:// request will attemot to download the stream as a file), I was informed that my machine needed the Sharp G.726 Audio Codec (see links):

  • http://www.wmplugins.com/ItemDetail.aspx?codec=45
  • http://www.free-codecs.com/Sharp_G726_Audio_Codec_download.htm

So, one reboot later (for the Audio Codec) and I was able to access the stream via Windows Media Player, proof of concept is now considered solid, but to make this do what I want it to, we need to embed the video stream into a webpage (which we’ll later get displaying in Media Center as a component).

To do this simply required the build of a basic HTML page with the following code, you can mix and match your own tweaks to suit, but I’m currently using:

<object ID="MediaPlayer1" width=320 height=240  classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"  codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"  standby="Loading Microsoft Windows Media Player components..."  type="application/x-oleobject">  <param NAME="FileName" VALUE="http://[camera address]/img/video.asf"></param> <param NAME="animationatStart" VALUE="true"></param> <param NAME="transparentatStart" VALUE="true"></param> <param NAME="autoStart" VALUE="true"></param> <param NAME="showControls" VALUE="false"> <embed type="application/x-mplayer2" pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/" SRC="http://[camera address]/img/video.asf" name="MediaPlayer1" width=320 height=240 AutoStart=true>  </embed>  </param></object>

This gave me a simple web page (which can be prettied up later) with [insert relevant number] video streams embedded, one from each camera – nice. Next – building the code into a MCE look and feel HTML page then making that page an object which can be accessed via MCE.

Update November 2010:

In the 5ish years since this article, a few more helpful sites have found their way to the intertubes – check out the following links:

One of my current side-projects is hacking one of these old cams into an outdoor housing so it can become my weather camera… perhaps a post will follow on this :)