long exposure photo of a street in a city a night

How to use your Mac for time-lapse like webcam shots

Written by

in

When searching for a script that captures images from my Macs internal camera, I found a small tool called ImageSnap. This small tool is very simple in its usage, but it’s one of the key tools when you want to use your Mac as a 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 all your images should be stored. 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. If you need other image formats, you can simply use a tool like ImageMagick to batch convert your images.

There are several other options for ImageSnap to fine tune your image capturing. The help output gives you 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.


Comments

2 responses to “How to use your Mac for time-lapse like webcam shots”

  1. Felipe Maion Avatar
    Felipe Maion

    Thank you very much. This is what I was looking for!! Perfect!

    1. Mathias Lipowski Avatar
      Mathias Lipowski

      You are welcome! This is indeed one of the simplest solutions. I thought about writing my own macOS app for this, but this command line tool made this obsolete 😉

Leave a Reply

Your email address will not be published. Required fields are marked *