Wednesday, June 11, 2008

Python-powered webcam for MIT construction site--with time-lapse video

My office on the 4th floor of the Broad Institute looks down on the construction site for MIT's new cancer research building. Soon after they tore down the beautiful landscaping that used to be outside the Stata Center, I set up a webcam on my windowsill and started idly capturing shots of the construction while I worked.

This week I finally automated the process with a Python script using VideoCapture and pyMedia. Once a day it compiles all the shots, now taken at 30 minute intervals from 7am-5pm, into a 12fps time-lapse video:

Large MPEG (1280x960, 16.6MB and growing)
Small MPEG (640x480)

A live shot is also taken every 5 minutes: [Update 3/7/09: I stopped recording when they covered the whole construction site with a big sheet.]


(click for larger image)

I used a Logitech Quickcam Pro 9000, which has a glass lens and nice resolution. It deals surprisingly well with the bright sky and dark, shadowed construction site.

Construction is expected to finish in December 2010, so I'll up the frame-rate when the file starts getting huge.