Skip to content

rambo/timelapse

Repository files navigation

Motion time lapse

Idea is to have motion monitoring the space and when event starts a python daemon to handle capturing the timelapse photos is started. Strictly speaking this part is an intervalometer.

Another process (running on a network server, where the photos will be stored, conserve write cycles on the SD card) will then convert these photos into a time lapse movie.

Making movies

Resize images

mkdir resized
mogrify -path resized/ -resize x1080 `find . -name '*.jpg'`

Encode to MP4

cd resized
cat *.jpg | ffmpeg -f image2pipe -r 5 -vcodec mjpeg -i - -vcodec libx264 -movflags faststart out.mp4

Resize with filename tagging

mkdir resized
mogrify -path resized/ -resize x1080 -gravity southwest -stroke '#000C' -strokewidth 5 -annotate 0 '%t' -stroke  none   -fill white    -annotate 0 '%t' `find . -name '*.jpg'`

And if you do not have RTC on the computer you are using you might get weird timestamps, use timestamp_adjust.py to fix the names and timedelta_calc.py to calculate the adjust values.

Faster resize on multicore systems

Use GNU Parallel.

mkdir resized
find . -name '*.jpg' | parallel mogrify -path resized/ -resize x1080 -gravity southwest -stroke '\#000C' -strokewidth 5 -annotate 0 '%t' -stroke  none   -fill white    -annotate 0 '%t'

TODO

Deflicker

understand the perl-script and either incorporate it to the helpers or rewrite in python.

"Camera lost"

Sometimes we lose a chunk of time, make a script to recognize this and add "camera lost" images with suitable timestamps to keep consistent flow of time.

Losing a few frames is not bad but an hour worth of frames is.

About

Time lapse tools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published