A simple site that reconstitutes single JPEG images from within the UCF firewall for outside consumption via Motion-JPEG
Purpose
We got an urgent request to recreate UCF’s Campus Webcams site, as UCF Marketing was replacing the main UCF site with a WordPress install (thus removing all of the various sub sites of that legacy implementation). We had no contact with the original developers nor any glimpse of the code that powered the previous Webcams site. In addition to reproducing the original site, it was requested that the new site also double the number of cameras viewable.
Method
I got to work quickly on an .NET C# MVC3 application, building out a default Area for the public and an admin Area for a front-end to a database that stored webcam information. I gathered data manuals on all the various camera manufacturers represented throughout our departments and discovered ways to pull single-frame data at specific resolutions from each. I wrote an Action that composes constant snapshot data into a Motion-JPG stream. Finally, after some research, I pulled down a Nuget package for an image processor to do Gaussian blurs on the images (for legal reasons).
Highlights
There is nothing quite as bizarrely satisfying as writing the raw response output of a Motion-JPG stream. It’s too bad that no version of Internet Explorer (through 10) supports Motion-JPG; any IE visitors get redirected to the raw Frame output (and a basic JavaScript refresh every eight or so seconds). It was also fairly satisfying to get into the groove of making all of my applications responsive for browsers and devices smaller than our minimum window size. Finally, just because I could, it was a blast to develop a KML feed that could display the cameras on Google Maps.