Skip to content

Instantly share code, notes, and snippets.

@javikalsan
Last active October 7, 2016 17:32
Show Gist options
  • Save javikalsan/59d5d38133405c7f0ad4067cc7239b8d to your computer and use it in GitHub Desktop.
Save javikalsan/59d5d38133405c7f0ad4067cc7239b8d to your computer and use it in GitHub Desktop.
Timelapse with avconv
#!/bin/bash
# rename photos
a=1
for i in *.JPG; do
new=$(printf "%04d.JPG" ${a}) #04 pad to length of 4
mv ${i} ${new}
let a=a+1
done
# create the video
avconv -r 10 -i %04d.JPG -r 10 -vcodec libx264 -crf 20 -g 15 -vf scale=1280:720 timelapse.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment