Building a Raspberry Pi Timelapse Camera
Build time: 2-3 hours
Tools needed: 3D printer (optional, for mount)
raspberry pitimelapsecamerapython
Parts List
Raspberry Pi Zero 2 W
Pi Camera Module v2 or HQ Camera
Weatherproof case with camera mount
Battery pack or power supply
Prices and availability as of Nov 22, 8:52 AM ET and subject to change. The price shown on Amazon at the time of purchase applies.
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
libcamera-still -o test.jpg
If not detected: sudo raspi-config > Interface Options > Camera > Enable
Capture Script
import subprocess, time, os
from datetime import datetime
OUTPUT_DIR = "/home/pi/timelapse"
INTERVAL = 60 # seconds between frames
os.makedirs(OUTPUT_DIR, exist_ok=True)
frame = 0
while True:
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
filename = f"{OUTPUT_DIR}/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
sudo apt install ffmpeg -y
ffmpeg -framerate 30 -pattern_type glob -i 'timelapse/frame_*.jpg' \
-c:v libx264 -pix_fmt 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