Skip to content

Instantly share code, notes, and snippets.

@padenot
Created September 28, 2011 14:01
Show Gist options
  • Save padenot/1248003 to your computer and use it in GitHub Desktop.
Save padenot/1248003 to your computer and use it in GitHub Desktop.
Timelapse script
#!/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