Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 485 Bytes

README.md

File metadata and controls

27 lines (22 loc) · 485 Bytes

simple-timelapse

Call as simple-timelapse.sh 1m to take an image every 1 minute.

You can use any duration format supported by sleep.

dependencies

  • ffmpeg

code

cam="GENERAL WEBCAM"

mkdir images
cd images
for (( ; ; ))
do
    date=$(date +%s)
    ffmpeg -f dshow -i "video=$cam" -frames:v 30 "img-$date-%d.jpg"
    for i in {1..29}
    do
        rm -f "img-$date-$i.jpg"
    done
    sleep $1
done
cd ..