Skip to content

Instantly share code, notes, and snippets.

@shanecelis
Created April 15, 2009 23:14
Show Gist options
  • Save shanecelis/96094 to your computer and use it in GitHub Desktop.
Save shanecelis/96094 to your computer and use it in GitHub Desktop.
#!/bin/bash
# timelapse
#
# Records a sequence of screencaptures at regular intervals on Mac OS
# X. Can also record using webcam if you have isightcapture
# installed.
#
# http://www.intergalactic.de/pages/iSight.html
#
# Shane Celis
while true; do
timestamp=$(date '+%Y-%m-%dT%H:%M:%S');
echo "Capturing screen at $timestamp."
# For one screen:
screencapture -x "screen1-$timestamp.png";
# For two screens:
# screencapture -x "screen1-$timestamp.png" "screen2-$timestamp.png";
# If you have a webcam, you might want to capture that too.
# isightcapture "isight-$timestamp.png";
sleep 60;
done;
# After it's finished, you probably want to play around with image
# magick to stitch the images together and create a movie.
# Specifically look at the tools montage and convert.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment