Categories: Raspberry pi

raspberry pi timelapse

Raspberry pi timelapse example

Bellow are notes how to create a raspberry pi timelapse video in MP4 format. This command will take a photo every 60 seconds (60000 milliseconds) for 2 hours (7200000 milliseconds) resulting in a sequence of 120 images. Depending on what quality and time range you want to take pictures it advisable to use a USB stick / storage or samba drive to store those images.

raspistill -o myimage_%04d.jpg -tl 60000 -t 86400000

Variations which I tried out:

5min gap between snapshot for 8h

sudo raspistill -o myimage_%04d.jpg -tl 300000 -t 28800000

5min gap between snapshot for 12h

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

5min gap between snapshot for 24h

sudo raspistill -o myimage_%04d.jpg -tl 300000 -t 86400000

Compiling snapshots into a MP4 video:

Install avcovn:

sudo apt-get -y install libav-tools

Compile snapshots in original snapshot resolution:

avconv -r 10 -i myimage_%04d.jpg -r 10 -vcodec libx264 -crf 20 -g 15 timelapse.mp4

Compile snapshots in 1280×720 resolution:

avconv -r 10 -i myimage_%04d.jpg -r 10 -vcodec libx264 -crf 20 -g 15 -vf crop=2592:1458,scale=1280:720 timelapse.mp4

Be aware that this is pretty time consuming, so I used bellwo mentioned screen and left the compilation during the night.

Screen

Its advisable to use screen or tmux combined with the above commands to keep the command running in background even you get disconnected from the ssh session.

Install screen:

sudo apt-get install screen

Combine screen with raspistill & :

sudo screen -S timelapse  -d raspistill -o myimage_%04d.jpg -tl 300000 -t 28800000

Result

Following video was created with raspberry pi and camera module taken in summer 2013.



Matus

Share
Published by
Matus

Recent Posts

Referral links

Listen to radio 1 Listen to radio 2 Listen to radio 3 Listen to radio…

5 years ago

update samsung smart iptv app

Instructions how to update samsung smart iptv app. Bellow instructions also work for all other…

7 years ago

ambient light samsung tv philips hue

What is ambient light samsung tv philips hue? Easy way how to setup ambient light for…

7 years ago

stream popcorn time samsung smart tv

How to stream popcorn time Samsung smart tv? 1.) Simply start to watch a movie…

8 years ago

how find iptv streams

How find iptv streams via google I was searching for "how find iptv streams" on…

8 years ago

windows tips and tricks sites

Following sites are good source of inspiration for tips and tricks for windows, software, gadgets,…

8 years ago