Skip to content

Instantly share code, notes, and snippets.

@mcginty
Last active June 17, 2016 09:27
Show Gist options
  • Save mcginty/4092cfe9b13af9025c443b8ab9c5e63d to your computer and use it in GitHub Desktop.
Save mcginty/4092cfe9b13af9025c443b8ab9c5e63d to your computer and use it in GitHub Desktop.
Simple time-lapse script using ffmpeg. Put all your pictures in a single folder, run lapsify in that folder. That's it.
#!/bin/bash
set -e
mkdir -p tmp_lapse_container
find . -iname '*.jpg' \
| awk 'BEGIN{ a=0 }{ printf "cp \"%s\" tmp_lapse_container/%04d.jpg\n", $0, a++ }' \
| bash
ffmpeg -y -i "tmp_lapse_container/%04d.jpg" -framerate 30 -r 30 -c:v prores_ks -s:v 1920x1080 lapse.mov
rm -rf ./tmp_lapse_container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment