Technical information about original The Amazing Chez Inwap Backyard WebCam.
Note: Everything here is written in the past tense since John took the Pentium with him when he and Chris moved to Chez TyeDye. The original set up was a Pentium running Windows-95 and SnapCAP. The current set up is a 486 running Linux and a Sun SPARCstation working in tandem.
Hardware provided by John O'Halloran.
Programming by Joe Smith.

Overview

Details

Our WebCam was powered by SnapCAP running on John's tower Pentium at home. The software starts up automatically when Windows-95 was loaded, and updates www.inwap.com/backyard/ throughout the day.

Sequence of events, Win95

Image Capure

Every five minutes, SnapCAP told Snappy to do a frame-capture from the video camera. This produced a CAPTURE.BMP file which got converted to 640x480 JPEG file and an 80x60 thumbnail image. Each capture had a unique file name based on the month, day of month, hour, and minute of capture. The name of the JPEG image was stored in capture.txt which is used by the perl scripts.

Image Upload

SnapCAP contacted our main web site and uploaded the following files via FTP:

Image Display

The most recent capture was available on port 81 on the Pentium at home.

Image Archiving and Rotation on Win95

The primary web site is on a Unix server at www.inwap.com/backyard/. Two perl scripts, savecurrent.pl and hourly.pl are run by the System Agent to make the files on Win95 match the files on Unix. Note: The two scripts (savecurrent.pl and hourly.pl) work equally well under Win95 and Unix.

Sequence of events, Unix

Image Archiving

Two perl scripts are run every twenty minutes via 'cron' on the Unix server
03 * * * * backyard/savecurrent.pl 00; backyard/hourly.pl -q
23 * * * * backyard/savecurrent.pl 20
43 * * * * backyard/savecurrent.pl 40
The first one, savecurrent.pl, copies the current JPEG file (and its thumbnail GIF) from the current-hour directory into the current-today directory.

Image Rotation

The second script, hourly.pl, moves anything older than 24 hours out of the current-today directory to the current-yester directory. Anything older than 48 hours is deleted.

Image Display

Joe had to resort to a bit of trickery to get the URL with backyard/capture.jpg to work. The ArteMedia Wall of Snap page and other sites refer to "capture.jpg", but the actual image name keeps changing. The key was to convince the web server to run a CGI script whenever "capture.jpg" was requested. This script, capture.pl, reads capture.txt for the name of the JPEG file. It then sends the image (Content-type: image/jpeg) without a Last-modified header so that browser won't cache the file.

That same script performs a different function when invoked as <!--#exec cgi="capture.cgi"--> - it returns

<A HREF="mmDDHHSS.jpg"><IMG SRC="mmDDHHSS.jpg" WIDTH=320 HEIGHT=240></A>
This tells the browser to display the image at half size; clicking on the image will display the full picture.

Software set-up


See also: recent pictures and the gallery.