Last active
August 17, 2017 10:55
-
-
Save gre/11219793 to your computer and use it in GitHub Desktop.
[MacOSX] Minimal script for timelapse capturing your screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Minimal script for timelapse capturing your screen in MacOSX. | |
# You must run the script, from an empty directory where the images will be stored. | |
# Usage: ./timelapse | |
# or | |
# Usage: ./timelapse <seconds> | |
# Default capture every 10 seconds, which is about 10 minutes of 30fps video for a 48 hours record. | |
# On a Retina Macbook Pro, it will needs about 15 Go of images for 48 hours of images. | |
# See: https://docs.google.com/spreadsheets/d/1qFeF0cZi19mMjwj-SO5qsuAp3MET0bKBM79JBx69nWI | |
TIME_BETWEEN_CAPTURES=${1-10} | |
while ((1)); do | |
sleep $TIME_BETWEEN_CAPTURES | |
screencapture -x -t jpg "$(date '+%Y-%m-%d@%Hh%Mm%S').jpg" | |
done | |
# Gaëtan Renaudeau - DWTFYW License http://www.wtfpl.net/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
script to dedup the snapshot that are too close in time interval
example:
node timelapse-dedup.js | while read f; do echo mv $f dups; done