Time Lapse Photography With MacBook’s iSight

After the weekend blizzard barely touched New York, I was particularly glad to wake up to a snowy morning. My trusty old Canon A85 recently passed away, so left with only the Macbook’s built in iSight camera to document this I figured it might be fun to try and take some time lapse shots. Here’s one of the results:

timmargh‘s blog post showed me how to get going. First I had to install iSightCapture to control iSight via the command line, then write a script that will take photos in fixed intervals. Initially I used Tim’s AppleScript, but then converted to a quick Ruby script instead:

path = "~/lapse"     # directory where images will be stored. must exist and be writable.

duration = 4 * 60 * 60  # Time to run, in seconds (4 hours here)
interval = 5 * 60       # time between each photo, in seconds (5 minutes here)

end_at = Time.now + duration

i = 0
while Time.now <= end_at do
 i += 1
 system "/Applications/isightcapture #{path}/%05d.jpg" % i
 sleep interval
end

This will take a photo every 5 minutes for four hours. A few notes:

1. The directory in path (“~/lapse” here) should exist before you run the script. If you have more than one machine it may be a good idea to make it a shared folder, so you can check on the progress from your other machine.

2. Photo Booth, or any other app that uses the camera, should be off or iSightCapture won’t work.

3. WordPress code view adds some ‘ ‘s in “copy to clipboard” which will break the script – use the “source view” icon to get the clean version.

4. If you’re taking photos over a long time period, remember to turn the screen off (ie, minimal brightness) – this will help the battery last the whole time, especially if you’re on an older MacBook.

5. If you want to get some sound indication that photos are being taken you might add the following line at the start of the while loop:

`say "cheese"`

Once you have some photos, GIFfun will let you combine them into an animated GIF. If there are more than a few dozen file size can quickly get out of hand, so you might convert them to video instead –  ffmpeg can take care of that. Installing it is pretty simple if you have MacPorts:

sudo port install ffmpeg

You can then cd to the image directory and create the video:

ffmpeg -i %05d.jpg lapse.mp4

Finally, here’s a photo of the whole setup, taken with the other MacBook’s iSight :)

Fall in New York

Generally beautiful, New York City is even beautiful-er when autumn foliage comes around. So it was cool to discover this Flickr set of scanned leaves from Morningside Park – literally 3 blocks from where we live.

(Via what about the plastic animals, via Outside.in)

The Case for Working With Your Hands

I love this NY Times article not just because it reminds me of my old motorcycle which I enjoyed fixing almost as much as riding (and spent almost as much time doing, anyway), but especially for the arguments it makes about the irrelevance of much of conventional “wisdom” about careers, education and happiness in today’s world. It feels great to read your own views and thoughts put in a coherent, clear form. The Case for Working With Your Hands.

Kunstler: The Tragedy of Suburbia

WordPress just added special TED support – I’m not a fan of TED’s exclusive/trendy approach, but it’s a good opportunity to post this excellent talk by James Howard Kunstler.

The lesson of design which considers its users, environment and resources vs. design that is isolated, contrived and wasteful holds true to software as well, from the UI to the server.

Asako Narahashi


Maybe because I lived nearly all of my life within 10 miles of the Mediterranean and now we live in NYC – which might as well be in Arizona as far as swimming in the ocean goes – I really love these.

(Found via ffffound, one of the most intelligently crafted sites out there right now)