Created
August 26, 2010 06:23
-
-
Save videlalvaro/550922 to your computer and use it in GitHub Desktop.
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 | |
# Usage: | |
# Take 1 picture every second, during one hour | |
# ./slacking 3600 1 | |
# | |
N=0 | |
PICS_PATH="/path/to/pics/destination" | |
echo "Capturing " $1 " images with an interval of " $2 " seconds" | |
while [ $N -lt $1 ]; do | |
let N=N+1 | |
NAME=`printf "%s/%04d.jpg" $PICS_PATH $N` | |
echo $NAME | |
screencapture -x -tjpg $NAME | |
sleep $2 | |
done | |
cd $PICS_PATH | |
ffmpeg -f image2 -i %04d.jpg -r 15 -s hd480 -vcodec libx264 -vpre hq -crf 16 slacking_480.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment