Thursday, July 01, 2010

Time Lapse Fun

Played a bit around with creating some time lapse shots with my Logitech C300 webcam, results are below. Scripts to generate them where:

uvcdynctrl --set "Exposure, Auto" 3
uvcdynctrl --set "Exposure, Auto Priority" 1
uvccapture -m -w -x1280 -y1024 -q80 -t10 -o/tmp/webcam-temp.jpg -c/home/ingo/bin/webcam-move.sh

$ cat /home/ingo/bin/webcam-move.sh
#!/bin/sh

if [ ! $# -eq 1 ]; then
echo "Usage: $0 FILENAME"
exit 1
else
FINAL="/home/ingo/screenshots/webcam-$(date +"%F-T%T").jpg"
mv "$1" "$FINAL"
echo "Moved $1 to ${FINAL}"
exit 0
fi

mplayer mf://webcam*.jpg -fps 30 -vf crop=1280:720:0:200


One could of course also record things directly with mplayer/mencoder or guvview or other tools, I chose the single-image route because it is more robust and flexible, for example guvview seems to have trouble with mkv video files over 2GB, mplayer doesn't accept very low fps rates and things like that. The single-image route 'just works' and there is no risk of losing a recording due to a corrupt video file in the end.





Flattr this

2 comments:

Mike said...

Hi, you can try SebecTec software to make the time-lapse. It will read the images in the order they were created, resize and upload automatically.

adiba akter said...
This comment has been removed by a blog administrator.