Skip to content

Instantly share code, notes, and snippets.

@amirnissim
Last active January 4, 2016 00:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amirnissim/8539532 to your computer and use it in GitHub Desktop.
Save amirnissim/8539532 to your computer and use it in GitHub Desktop.
# download imagesnap [http://iharder.sourceforge.net/current/macosx/imagesnap/]
# identify your video recording device
./imagesnap -l
# repeatedly take a snapshot
while :; do ./imagesnap -d "HD Pro Webcam C920" ~/Pictures/snapshots/`date +%H-%M-%S`.jpeg; sleep 58; done
# optional: resize
# WARNING - will overrite your files
sips -Z 640 ./snapshots/*.jpeg
# create an animated .gif with imagemagick
brew install imagemagick
convert -delay 4 *.jpeg output.gif
# or a .mov file with tlassemble [https://github.com/dbridges/cocoa-tlassemble]
brew install tlassemble
tlassemble ./snapshots time_lapse.mov -fps 30 -height 720 -codec h264 -quality high
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment