Created
September 28, 2011 14:01
-
-
Save padenot/1248003 to your computer and use it in GitHub Desktop.
Timelapse script
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
#!/usr/bin/zsh -x | |
mkdir timelapse_frames | |
cd timelapse_frames | |
# in seconds | |
if [ -z $1 ] | |
then | |
duration=10 | |
else | |
duration=$1 | |
fi | |
# 25 frames/second | |
frames=$((duration * 25)) | |
streamer -q -c /dev/video0 -f rgb24 -r 1 -s 1280x800 -t $frames -o /tmp/plop.avi | |
ffmpeg -i /tmp/plop.avi image%d.jpg | |
ffmpeg -b 8000k -i image%d.jpg out.ogv | |
rm /tmp/plop.avi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment