Easy timelapse with the #RaspberryPi camera module

The Raspberry Pi camera module has built-in timelapse functionality.

Here’s a command to try:

raspistill -o timelapse%04d.jpg -t 5000 -tl 1000

This will make a time lapse run for 5 seconds (5000 milliseconds), taking a picture every 1 second (1000 milliseconds). It will create files called timelapse0001.jpg, timelapse0002.jpg to 0005. (It uses 4d to say ‘number to 4 places’).

Please note that if you Ctrl-C during the time lapse, the camera may get ‘stuck’. I’m keeping an eye out for a way to reset it, but I haven’t found it yet.

Hopefully this will be useful for someone – I’m trawling the Foundation forums for some of these little bits and pieces so that others don’t have to 🙂

4 comments for “Easy timelapse with the #RaspberryPi camera module

  1. Dont suppose you know of a way to make it run the timelapse untill its stoped? Or am i going to have to write my own script to do that?

    thanks

    dan

    • No, I don’t I’m afraid. I do know that Foundation guy JamesH is going to work on that, but it might be some time before it gets done. You could increase the -t parameter to make it last longer. The other option is to write a cron job script that runs every minute and checks to see if raspistill is running and if it isn’t kick it off again.

      • raspistill -o timelapse%04d.jpg -t 5000 -tl 1000 &

        The & at the end will make it a background process. the id of the process will be given when you smash enter to run the process. To manually kill it, use ‘top’ and ‘k’ for killing and process id. enter the id and hit enter.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.