Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # Imagemagick required
- # The ultimate destination for the shot.
- destination=/home/fathead/Pictures/Timelapse
- last_file=$(ls -tr | tail -1 | cut -c 1-5)
- new_file=`printf "%05d" $(($last_file+1))`
- filename=${new_file}.jpg
- jpg_qual=100
- delay_minutes=$((1))
- delay=$(($delay_minutes/60))
- width=$((1920))
- height=$((1080))
- while true ; do
- uvccapture -x"$width" -y"$height" -q"$jpg_qual" -o"$filename"
- # Image stamp it if `convert` is installed.
- # if [ -e /usr/bin/convert ]; then
- # convert -font helvetica -fill black -draw "text 10, 280 '`date`'" "$tempfile" "$tempfile"
- # fi
- # Move it into position.
- # /bin/mv "$tempfile" "$destination"
- # Pause
- sleep "$delay";
- last_file=$(ls -tr | tail -1 | cut -c 1-5)
- new_file=`printf "%05d" $(($last_file+1))`
- filename=${new_file}.jpg
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement