12

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.

3 Answers 3

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/

2
  • +1 ImageSnap works fine and the code is provided (with a public domain license). Feb 20, 2010 at 13:37
  • 1
    ImageSnap is also installable thru homebrew: brew install imagesnap Nov 7, 2013 at 13:02
5

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

1
  • wacaw doesn't seem to work on Yosemite or El Capitan.
    – bonh
    Nov 13, 2015 at 21:05
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
2
  • ffmpeg 4.1 on 10.12 gives and error due to unsupported framerate. Removing the -framerate parameter altogether fixes the problem.
    – oarfish
    Apr 25, 2019 at 9:52
  • How do you grant permission for ffmpeg to run from a LaunchDaemon (to get past the "Failed to create AV capture input device: Cannot use FaceTime HD Camera (Built-in)" ... it work from the command line.
    – Michael
    Mar 16, 2020 at 18:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .