My Webcam

Published on 2002-08-11 by Mark VandeWettering

I decided to dust off some of the old webcam software I wrote years ago and merge it into my home page. Right now it merely grabs a frame off of channel 45 once a minute, and stashes it at a standard URL. There is a teensy bit of JavaScript in my home page that causes the image to be refreshed once a minute. It really is just that simple.

The image capture program is just a couple of pages of C code. It performs two basic functions. The first is to configure the video capture device: in this case a Hauppauge WinTV GO card. These boards are inexpensive and use the Brooktree 848 chipset which is supported by FreeBSD. I configure it to capture a single frame worth of data in the YCbCr color space at 192×144 resolution. This second is to take this data and jpeg compress it, and write it to a file within the tree of my webserver.

The code in my page includes a tiny JavaScript program that periodically wakes up and resets the SRC for the image. That’s really all there is too it.