Weather & ScienceRecruit

Sky and Storm Time-Lapse Camera

Capture clouds, sunsets and storms every few seconds and render a smooth video.

LevelRecruit
Time1 h
Est. cost~$114
Steps5

rpicam-still has a built-in time-lapse mode. Add ffmpeg and you have a cinematic weather camera in a few commands.

Video tutorial

▶ Andrea FaveroWatch on YouTube ↗

Video by Andrea Favero, embedded from YouTube. The written steps below are our own and match the parts list.

Mission steps

  1. Aim the camera

    Point it at open sky behind a window or in a weatherproof box. Clean the glass.

  2. Lock the exposure

    Auto exposure flickers in time-lapses. Fix shutter and gain or use --awb daylight for consistent color.

  3. Shoot

    Capture one frame every 10 seconds for an hour (360 frames).

  4. Render

    Combine the frames into a 30 fps video with ffmpeg.

  5. Automate

    Schedule sunrise and sunset captures with cron, and upload the videos to your NAS.

Code

mkdir -p ~/sky && cd ~/sky
# one frame every 10 s for 1 hour
rpicam-still -t 3600000 --timelapse 10000 --awb daylight -o sky_%04d.jpg
# render to video
sudo apt install -y ffmpeg
ffmpeg -framerate 30 -i sky_%04d.jpg -c:v libx264 -pix_fmt yuv420p sky.mp4

Tip: test every script on the bench before installing it in a moving machine.

Questions

How much storage does it use?

About 2–4 MB per full-resolution frame. Add --width 1920 --height 1080 to save space.