Close

Testing timelapse

A project log for SauronPi - autonomous Raspi camera

Standalone or network camera based on a Raspberry Pi A+

Audrey RobinelAudrey Robinel 03/18/2016 at 23:000 Comments

I'm in Marie-Galante, for the CaribeWave2016 event, for which Gwadalug (my Linux User Group) are doing a wifi bridge over 50 km (from Guadeloupe main island to Marie-Galante, but also to La Désirade), We're also doing high resolution 3D mapping with fixed wings drones, generating 4G alert signals, making an alert system based on accelerometers, and other stuff.

While there, i brought my piCam prototype, wanting to take a timelapse of the evenement, but in the heat of things i forgot to do it. However, with a nice view, i decided to set the camera in position for a timelapse.

I configured the wifi to be able to launch commands, then put everything back in the box. I'll have to find a way to be able to configure everything headless.

In order to take a picture, i used the following command :

raspistill -vf -hf -o pic.jpg

The flips are there because of the position of the camera.

I took a picture, and it was fine:

Obviously, to make a timelapse, i needed to take multiple pictures, with changing names, so i made a script :

#!/bin/bash

while true
do
DATE=$(date +"%Y-%m-%d_%H%M")
raspistill -vf -hf -o /home/pi/picsMG/$DATE.jpg
sleep 60
done
In this script, i take a picture, and save it using the date/time it was taken. I then use sleep to wait for 60 seconds. It means that i'll take a picture each minute, so for 24 hours, it will take 1440 pictures. At 24 FPS, that will generate a 60s clip.

That will be the occasion to test 4K video.

I made the script executable using a chmod :

chmod a+x timelapse.sh

Since i'm launching my script from ssh over wifi, i need to have it keeping going on even if i logout. In order to do so, i used nohup to launch it :

nohup ./timelapse &
Now it's been running for less than 1 hour, and i'll let it run until my departure. Normally, i should have about 40 hours when taking a picture every minute. However, with wifi on, it should decrease the total runtime. However, it should be enough for this timelapse.

Now it's nighttime, and the pictures are really less interesting, i'll see if i keep those :

See you in the next update :)

Discussions