Is there a command line utility that allows me to take a picture from the built in camera? Something like screencapture allows for, well, screen captures.

The reasoning for a command line tool is I would like for it to be stealthy, without a countdown or flash or other indication to the user that a picture is being taken.

  • 1
    Take a look at the source code for preyproject.com -- they do this stuff with their app and the code for it is open source.
    – Ian C.
    Apr 29, 2012 at 23:41
  • 3
    Remember that the green LED next to the iSight will briefly activate when the camera records the image.
    – da4
    Oct 5, 2012 at 17:17

5 Answers 5


Use imagesnap. It can be installed with brew install imagesnap or by downloading the binary from the website.

One use for it is to take series of snapshots:

while :; do
    imagesnap ~/Desktop/$(date +%y%m%d%H%M%S).png
    sleep ${1-1}

It doesn't crop images horizontally either. (Photo Booth changes the aspect ratio to 3:2.)

  • 5
    Also note that imagesnap has a -t flag to take a picture every x.xx seconds. So that while loop could be replaced with imagesnap -t 1; though, in this case, imagesnap will generate its own filename (e.g. snapshot-00000-2015-07-23_10-36-52.853.jpg).
    – tbekolay
    Jul 23, 2015 at 14:39
  • if you plan to use imagesnap via ssh, you'll need sudo privileges. I use it to check in on my cats. Jan 7, 2016 at 5:07

OS X does not come with any utilities for this purpose.

A third-party solution is imagesnap. It lets you capture an image from any connected video device, defaulting to the built-in iSight camera. It's available as a single binary file you could bundle with your software, and is released into the public domain.

There are many references around the internet to the iSightCapture utility, which used to be a popular choice for this, but it is no longer maintained.

  • Anything native?
    – dacracot
    Jul 21, 2011 at 22:45
  • @dacracot Unfortunately Apple hasn't provided anything like this.
    – Jeremy
    Jul 21, 2011 at 22:46
  • What is really weird is that Automator provides an action to take a picture, but it doesn't recognize the iSight as a valid camera!
    – Michael
    Mar 4, 2020 at 22:23

Unfortunately imagesnap no longer appears to work 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
  • It seems to be working now on Catalina (10.15.6), the only thing is that at the first execution it requires the terminal to receive the permission to use the camera
    – Jacopofar
    Sep 11, 2020 at 8:13

Natively, there is a way but it is extremely basic. You can use Automator to make an application that takes a picture. The action is called "Take Video Snapshot" and requires a "built-in camera, iSight or other webcam, or digital camera connected to your computer." Just check the box to take picture automatically and you now have an app you can call from the command line. Save it as an app and then you can call it from the command line like open TakePicture.app.

Take Video Snapshot

  • Tried this and it worked, but I was hoping for something more stealthy.
    – dacracot
    Aug 26, 2011 at 15:17
  • @dacracot I figured as much. Like I said, this is the only native way I know of so you'll have to go the hard route if you want stealth.
    – styfle
    Aug 26, 2011 at 15:48

As another poster mentioned there is a utility called iSightCapture which can do this.

I once wrote a script to periodically grab an iSight image and a grab of my two monitors and post it to a private website so I could see what's going on at my computer. Here's how I scripted iSightCapture to do so.

~/scripts/isightcapture -w 320 -h 240 -t jpg ~/capture.jpg 
if [ $RESULT -ne 0 ]; then
    growlnotify -s -a FaceTime -m "isightcapture failed ($RESULT)" $0
    exit 1
    sips -f horizontal ~/capture.jpg

screencapture -S -tjpg ~/scr1.jpg ~/scr2.jpg 
if [ $RESULT -ne 0 ]; then
    growlnotify -s -a FaceTime -m "screencapture failed ($RESULT)" $0
    exit 2
    sips -z 240 320 ~/scr1.jpg 
    sips -z 240 320 ~/scr2.jpg
exit 0

Note the use of 'sips' to flip the isight capture horizontally.

A working download link (2012-10-05): iSightCapture (via), tested on OSX 10.8.2

You must log in to answer this question.

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