Skip to content

Instantly share code, notes, and snippets.

@funivan
Created July 30, 2015 21:49
Show Gist options
  • Select an option

  • Save funivan/73b2e4a7f400d8ce244e to your computer and use it in GitHub Desktop.

Select an option

Save funivan/73b2e4a7f400d8ce244e to your computer and use it in GitHub Desktop.
#!/bin/bash
fps=7
avconv -start_number 0035 -f image2 -r $fps -i %04d.JPG -q:v 1 -b:v 1000K time-lapse.avi
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment