Created
May 22, 2014 19:44
-
-
Save kiliankoe/60dc9133ff3882ae5d94 to your computer and use it in GitHub Desktop.
Create a timelapse video from a directory of webcam images
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/sh | |
echo "FPS: " | |
read input_fps | |
echo "Copying files into tmp dir" | |
mkdir tmp/ | |
find ./ -name "*.jpg" -exec cp -i {} ./tmp/ > /dev/null \; | |
echo "Joining files into video$input_fps.mp4" | |
cd tmp/ | |
cat *.jpg | ffmpeg -loglevel quiet -f image2pipe -r $input_fps -vcodec mjpeg -i - video$input_fps.mp4 | |
cp video$input_fps.mp4 ../ | |
echo "removing tmp dir" | |
cd .. | |
rm -rf tmp/ | |
echo "done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment