Yet Another WebCam

One of the features of the Makery (now the defacto name for the Omaha Maker Group’s space) is a standing webcam that publishes live photos of the space to the Internet.  We have a few USB webcams hooked up to a PC running YawCam, which is a free (as in beer) webcam package written in Java. We run one copy of the software per camera (Copied into separate directories, as the config is file-based) and each serves its image on a separate port.

Initially, people were having problems accessing HTTP on non-standard ports, but  we weren’t inclined to “use up” port 80 on our only IP address with just one webcam; With some help from the mailing list, I hacked together a Perl script that runs on our website hosting provider and proxies requests to the camera server’s separate nonstandard ports. It then re-serves the images on port 80 and also uses GD to return text images in the event of an error (like a timeout fetching the webcam image). This setup has the added benefit of masking the firewall’s IP address from the website, and would even support cameras on multiple IP addresses that look like a single image.

At Dave’s request, I also included “indicator pixels”, to coordinate with his “are the lights on” python script.

Overall (for my part, at least), it’s sort of a hackjob, but it seems to work pretty well.