Time Lapse Code for the Raspberry.


1. Raspberry Pi with network / internet connection.

2. Camera

3. Something to support your camera .Lego works great .

2013-08-04 12.47.47








Pre Heat ( software you need to download)

Log into the pi via SSH and run the command sudo apt-get install memcoder 

This is the only bit of extra software you need it encodes all the pictures into a video at full HD.

Cooking ( adding it all together )

Create a folder called TL  ( mkdir TL ) and change directory into it ( cd TL )

To run the time lapse run the command

raspistill -o myimage_%04d.jpg -tl 30000 -t 43200000

Ok let`s break it down raspstill – o means take a picture with options

myimage is the file name and the _%04d increments by 1 each time a picture is takin .jpg is the file format.

-tl 30000 is the time between pictures . 30000 = 30 seconds.

-t 43200000 is the time for the project to run. 43200000 = 12 hours there 3600000 milli seconds in 1 hour.

Ok it should happily be taking pictures  just run ls -l to see all the pictures.

When it`s finished it run , run the command ls *.jpg > stills.txt this will create a text file form the mencoder software.

and finally run mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1920:1080 -o tlcam.avi -mf type=jpeg:fps=24 mf://@stills.txt

This will create the video file for you . I like doing on the PI however some people say it does run slow I don`t care it`s taking 12 hours to make whats and 30mins. Transfer the file or watch it on the Pi and hay presto you just cooked a Time Lapse.

One tip if your going to do a night shot then cover the led if your filming through a windows the reflection is a pain and could wreck the video.

<?php echo “Hello World”; ?>


Tagged , . Bookmark the permalink.

Comments are closed.