Building a Raspberry Pi Timelapse Camera
Building a Raspberry Pi Timelapse Camera Capture frames at intervals and assemble into video. Great for construction, plant growth, 3D print monitoring, or weather. Hardware Raspberry Pi (Zero 2W for compact builds) Pi Camera Module v2 or HQ Camera Case with camera mount Power supply or battery pack Test Camera bash libcamera-still -o test.jpg If not detected: sudo raspi-config > Interface Options > Camera > Enable Capture Script python import subprocess, time, os from datetime import datetime OUTPUTDIR = "/home/pi/timelapse" INTERVAL = 60 # seconds between frames os.makedirs(OUTPUTDIR, existok=True) frame = 0 while True: timestamp = datetime.now().strftime("%Y%m%d%H%M%S") filename = f"{OUTPUTDIR}/frame{frame:05d}{timestamp}.jpg" subprocess.run([ "libcamera-still", "-o", filename, "--width", "1920", "--height", "1080", "-t", "1000", "--nopreview" ]) frame += 1 time.sleep(INTERVAL) Assemble into Video bash sudo apt install ffmpeg -y ffmpeg -framerate 30 -patterntype glob -i 'timelapse/frame.jpg' \ -c:v libx264 -pixfmt yuv420p output.mp4 Remote Deployment Tips 20,000mAh+ power bank for outdoor use 64GB+ SD card at 1 frame/min for long projects Waterproof enclosure with clear window
Related Guides
- How to Run a Timelapse Camera with Raspberry Pi
- How to Set Up OpenCV Machine Vision on a Raspberry Pi
- How to Use the ESP32-CAM: Video Streaming, Motion Detection, and Time-Lapse
- How to Control GPIO Pins on Raspberry Pi with Python
- Automated Plant Watering System with Raspberry Pi
- Controlling GPIO Outputs with Python — LED, Relay, and Buzzer
- Raspberry Pi GPIO: Complete Beginner Guide with Python Examples
- Getting Started with ROS2 on Raspberry Pi for Robotics