Created
September 24, 2013 07:32
-
-
Save orangejulius/6681474 to your computer and use it in GitHub Desktop.
Create a timelapse from a directory full of images. Pass the directory name as the first parameter and a .mkv file with the name of that directory will be created. Requires ffmpeg
This file contains 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 | |
pictureDir=$1 | |
# make symlinks | |
pushd $pictureDir | |
j=0 | |
for i in `ls *.JPG`; do | |
ln -s $i $j.jpg | |
j=$((j+1)) | |
done | |
popd | |
# make the video, setting the input and output FPS to 15 | |
avconv -r 15 -i $pictureDir/%d.jpg -s 2560x1920 -r 15 ${pictureDir}.mkv -threads 4 | |
#unlink symlinks | |
pushd $pictureDir | |
for i in `ls *.jpg`; do | |
unlink $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment