OS X taking a photo with the iSight using a command-line tool?

12

4

Is there a utility that is able to run from the command line to capture a single frame of the iSight inbuilt (and external?) camera? This would save to an image file. I have searched on Google and found utilities that link to websites that don't exist anymore.

Other options are:

  • An Open Source GUI application I can hack into a command-line application?
  • A GUI application being run for a small period of time, that can be configured via the command-line, temporary config files, AppleScript, etc?

This would be quite handy for creating apps for timelapses, security, fun etc.

gak

Posted 2010-01-21T02:55:29.510

Reputation: 7 037

Answers

15

"ImageSnap is a Public Domain command-line tool that lets you capture still images from an iSight or other video source. You might remember Axel Bauer's original isightcapture tool (that is no longer supported but still works on most systems). With ImageSnap I hope we'll be able to move forward and add features, adapt to the ever-changing Apple architectures, etc."

http://iharder.sourceforge.net/current/macosx/imagesnap/

yanokwa

Posted 2010-01-21T02:55:29.510

Reputation: 2 156

+1 ImageSnap works fine and the code is provided (with a public domain license). – ChristopheD – 2010-02-20T13:37:45.183

1

ImageSnap is also installable thru homebrew: brew install imagesnap

– Linus Unnebäck – 2013-11-07T13:02:39.733

5

wacaw looks interesting, andcommand line: http://webcam-tools.sourceforge.net/

rogerdpack

Posted 2010-01-21T02:55:29.510

Reputation: 1 181

wacaw doesn't seem to work on Yosemite or El Capitan. – bonh – 2015-11-13T21:05:40.180

1

As I mentioned in a related question, it seems that imagesnap no longer works on OSX10.11/El Capitan so another alternative is to install ffmpeg (MacPorts: port install ffmpeg or brew install ffmpeg) and run:

ffmpeg -f avfoundation -video_size 1280x720 -framerate 30 -i "0" -vframes 1 out.jpg

Pierz

Posted 2010-01-21T02:55:29.510

Reputation: 880

ffmpeg 4.1 on 10.12 gives and error due to unsupported framerate. Removing the -framerate parameter altogether fixes the problem. – oarfish – 2019-04-25T09:52:36.563