Forked from https://github.com/aawobdev/pi-camera-timelapse
Heavily inspired by:
- Armin Hinterwirth (https://github.com/amphioxus) - https://www.amphioxus.org/content/timelapse-time-stamp-overlay
timelapse.py
is the main script
video_stitcher.py
timestamper.py
- ffmpeg (usually comes with Pi OS)
- Pillow (aka PIL, also should ship with Pi)
- /usr/share/fonts/truetype/freefont/FreeMono.ttf
- Initial Images will be outputted to
imgXXXXXX.jpg
inside theoutput
folder - If wanted: Next, timestamps are drawn onto the images, they're stored as
imgXXXXXX-resized.jpg
- If wanted: Finally the images (depending on if you chose to create the timestamp images,
imgXXXXXX-resized.jpg
orimgXXXXXX.jpg
are used) are stitched into a video insideoutput/video
folder astimelapse_YYYY-MM-DD_HHmmSS.mp4
- Modify
main()
insidetimelapse.py
to use what you need
python3 timelapse.py [length in seconds] [interval in seconds] [boolean 1/0 if resizing wanted] [boolean 1/0 if video creation wanted] [directory to output]
python3 timelapse.py 3600 60 1 1 /home/pi/Camera
python3 timelapse.py 28800 3600 1 1 /home/pi/Camera
python3 timelapse.py 60 1 1 1 /home/pi/Camera
Example 4) Run for 1 minute with 1 second intervals, do not resize, create video, output to /home/pi/Camera
python3 timelapse.py 60 1 0 1 /home/pi/Camera
Example 5) Run for 1 minute with 1 second intervals, do not resize, do not create video, output to /home/pi/Camera
python3 timelapse.py 60 1 0 0 /home/pi/Camera
Example 6) Run for 1 minute with 1 second intervals, do resize, do not create video, output to /home/pi/Camera
python3 timelapse.py 60 1 1 0 /home/pi/Camera
- Run as cronjob for 1 minute with 1 second intervals
- Output images and video to /home/pi/Camera
- Run at 4AM every morning
- Output the Logs to a file inside my Camera folder
crontab -e
0 4 * * * python3 /home/pi/Camera/timelapse.py 60 1 1 1 /home/pi/Camera >> /home/pi/Camera/output.log 2>$