Capture iSight Images Using the Command Line
January 24th, 2007 - Command Line, Fun, Mac OS X, Utilities
We all know that Photo Booth is great fun and is sure to entertain our friends and family with the goofy effects. But what if you want to take pictures using your iSight from the command line? Unfortunately Apple doesn’t provide this option (at least that we know of), but thanks to a crafty individual named Axel Bauer, we have a command line tool available for the task. Being able to capture images from the command line opens up many interesting possibilities, and we name a few potential uses.
Installation of iSightCapture is very simple, place the isightcapture tool in /usr/sbin (or elsewhere if you’d prefer) and you’ll be able to run the command line tool, with the following options:
-d : enable debugging messages. Off by default
-n : capture nth-frame
-w : output file pixel width. Defaults to 640 pixels.
-h : output file pixel height. Defaults to 480 pixels.
-t : output format – one of jpg, png, tiff or bmp. Defaults to JPEG.
Using the tool is easy, and here are a few examples (from the readme.rtf):
$ ./isightcapture image.jpg
will output a 640×480 image in JPEG format
$ ./isightcapture -w 320 -h 240 -t png image.png
will output a scaled 320×240 image in PNG format
Other than the obvious usages, there are a some creative ideas floating around for use with this utility, our favorite being Dylan O’Donnell’s script that takes a picture on system wake and uploads it to a website, creating a nice photo collage. The results are quite interesting, check out his site for the script and a demonstration of the effect. Of course, you could also ssh/telnet into a Mac running this tool and take pictures of the user without them knowing, or even create a security system of sorts by writing a simple script that automates picture taking. The possibilities are numerous…
iSightCapture Developer home
Dylan O’Donnell’s script and example
Download iSightCapture
Posted by: Editor

Order Mac OS X 10.6 Snow Leopard today from Amazon.com - $25!

Write a comment