Created
June 8, 2013 15:51
-
-
Save langalex/5735585 to your computer and use it in GitHub Desktop.
Turns a series of JPEG files into a video.
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 | |
# usage: cd <directory full of JPGs> && make_timelapse | |
mkdir ./captures | |
COUNTER=0; | |
for i in `find . -name '*.JPG'` ; | |
do | |
#Write the filename to be friendly with ffmpeg's odd filename input | |
FILENAME=`printf '%04d.jpg' $COUNTER` | |
cp $i ./captures/$FILENAME | |
let COUNTER=COUNTER+1; | |
done | |
nice ffmpeg -r 20 -vcodec copy -i ./captures/%4d.jpg timelapse.mov | |
rm -rf ./captures |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To be honest I have no idea where that codec is coming from. I think I installed ffmpeg via homebrew on osx and that was it. If image2 works for you great.