Created
November 17, 2009 23:50
-
-
Save atnan/237389 to your computer and use it in GitHub Desktop.
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
echo "Creating new motion JPEG..." | |
echo > timelapse.mjpeg | |
echo "Concatenating JPEG stream..." | |
for i in $( find /path/to/your/jpegs -type f -name '*.jpg' | sort ); do | |
cat $i >> timelapse.mjpeg | |
done | |
echo "Running first FFMPEG pass..." | |
ffmpeg -y -i timelapse.mjpeg -an \ | |
-s 320x240 -pass 1 -qscale 4 \ | |
-f flv timelapse.flv \ | |
-f mp4 -vcodec h264 timelapse.mp4 | |
echo "Running second FFMPEG pass..." | |
ffmpeg -y -i timelapse.mjpeg -an \ | |
-s 320x240 -pass 2 -qscale 4 \ | |
-f flv timelapse.flv \ | |
-f mp4 -vcodec h264 timelapse.mp4 | |
echo "Removing FFMPEG multi-pass logs..." | |
rm ffmpeg*.log | |
echo "Removing motion JPEG..." | |
rm timelapse.mjpeg | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment