When searching for a script that captures images from my Macs internal camera, I found a small tool called ImageSnap. This handy tool is very simple in its usage, and it’s one of the key tools that you can use to turn your Mac into a time-lapse webcam.
ImageSnap is a Public Domain command-line tool that lets you capture still images from an iSight or other video source.
Installation
You can use your default package managers like Homebrew and MacPorts to install ImageSnap. One of the simplest methods to install ImageSnap is by executing the following command:
brew install imagesnap
Usage
To use ImageSnap, open the macOS terminal and navigate to the folder where you want to store all your images. In my case, I used a folder located in iCloud Drive so that I can access those files from any other device that uses the same iCloud account.
I defined the time interval between the images by using the -t parameter:
imagesnap -t 60
A value of 60 will result in a picture every minute (= 60 seconds).
This tool (only) supports the JPEG image format as output, but this is totally fine. However, if you need other image formats, you can use a tool like ImageMagick. This allows you to batch convert your images into the desired format.
There are several other options for ImageSnap to fine tune your image capturing. The help output shows all the details:
imagesnap -h
USAGE: imagesnap [options] [filename-or-dir]
Version: 0.2.16
Captures an image from a video device and saves it in a file.
If no device is specified, the system default will be used.
If no filename is specfied, snapshot.jpg will be used.
If timelapse is used, the filename argument can be a directory where files will be saved.
JPEG is the only supported output type.
-h This help message
-v Verbose mode
-l List available video devices
-t x.xx Take a picture every x.xx seconds
-n num Limit to <num> snapshots in -t timelapse mode
-q Quiet mode. Do not output any text
-w x.xx Warmup. Delay snapshot x.xx seconds after turning on camera (default 3sec)
-d device Use named video device
Photo by Adrian Schwarz on Unsplash.
Leave a Reply