Showing posts with label timelapse. Show all posts
Showing posts with label timelapse. Show all posts

Thursday, 21 April 2016

Sweet Peas

My wife planted some sweet peas and put them in the conservatory to get started.



I was sorting through my Pi bits and bobs and found the camera module and a project was born.

I made a camera rig from an old bit of wood and a section of bicycle brake cable and used a PoundWorld specs to get the focal length shorter*:


And found the code for the time lapse online here:

(https://picamera.readthedocs.org/en/release-1.10/recipes1.html#capturing-timelapse-sequences)

and only made slight amendments: https://github.com/jcwyatt/sweetpea2016/blob/master/sweetpea.py


After 11 days I copied the files across with scp and deleted all the files smaller than 150k (the dark night time pics) with this great command:

find . -name "*.jpg" -size -150k -delete

Then it was just a matter of using ffmpeg to make the images into a video. A quick search confirmed that it was possible to do this on filenames organised by dates:


ffmpeg -framerate 5 -pattern_type glob -i '*.jpg' -c:v libx264 -r 30 sweetpea01.mp4


5 images per second, 30fps video and it literally took a few seconds to create this:





All done headless and with the command line.