Summary—An IMX477 on a Compute Module 4, driven properly: metered auto-exposure that holds through a changing sky, quality gates, and a storage cascade that runs until the last disk fills.
birdshot drives an IMX477 HQ Camera on a Raspberry Pi Compute Module 4 for birds and sky. It replaces the runCam.sh loop it grew out of and reads that loop's folders unchanged. The GUI runs on the Pi's own display; captures land on the eMMC and are pulled to the Mac over the network. A session starts with a selftest and a doctor check, a one-minute calibration (open sky, then the treeline), and focusing with a focus map and a 1:1 monitor of native sensor pixels, because the lens is manual and gives no feedback.
Exposure is birdshot's own, because libcamera's AGC takes about five frames to settle and meters the whole frame, which makes a bird against bright sky a silhouette. A learned lux constant gives a one-frame jump when the camera swings from treeline to sky. A PID loop in EV space does the fine work, a highlight term measured on the subject zone can only pull exposure down, and a shutter/gain ladder spends gain before letting the shutter run past the motion limit, so wingbeats stay frozen.
Every frame is scored as it is taken: dark, blown (clipping in the subject, not the sky), empty, or ok. The verdict and every metric go into an index beside the frames, and timelapses are assembled only from frames that passed. Bird Flight watches the sky and fires a burst when a dark subject sits sharp against bright sky, well inside a frame that is mostly sky, and every clause of that is a gate shown live on the Field face. A storage cascade copies sealed groups of frames from RAM to eMMC to USB, verifying each before freeing it, so a session runs until the last disk fills rather than the first.
One window has four faces over one engine and one settings file: Camera for casual use, Field for outdoors (with a high-contrast outdoor mode), Bench for tuning, and Library for review, EXIF stamping and movie assembly. Every control is greyed with a reason when the selected camera cannot do it.
The native line, 2.0, rewrites the same pipeline in dependency-free C++17: one static binary for macOS, Windows, Linux and the BSDs, roughly an order of magnitude faster, with a selftest of 34 checks that needs no hardware. It adds a Horizons layer: a solar ephemeris, per-evening sunset planning, and pairing frames across days by the sun's elevation. A synthetic camera lit by the real sun at your site lets the whole pipeline run anywhere; the Pi's libcamera port is the one 2.0.0 waits for. The pictures here come from that synthetic camera.
Highlights
- Metered auto-exposure for a changing sky: lux feed-forward, EV-space PID, highlight priority
- Quality gates that drop the frames you would delete anyway
- Bird Flight: a gate ladder that fires on a bird against the sky
- Storage cascade across several disks, verified before anything is freed
- Native C++17 core with solar ephemeris and sunset shoot planning
At a Glance
| Language | Python, C++17 |
|---|---|
| Hardware | Raspberry Pi CM4 + HQ Camera (IMX477) |
| Version | 1.0.0-rc1 |
| License | MIT |
| Website | birdshot.org |
| Source | github.com/vonglurt/birdshot |
Pictures

Fig. 1. The Field face watching in Bird Flight on the synthetic camera, with each gate's reading and the reason it is holding fire

Fig. 2. Exposure and tone on the Bench: the subject and sky budgets, zone weights and the shutter/gain ladder beside the synthetic camera's preview.

Fig. 3. The Bench: camera picker, profiles, settings search, the mode dial and one START, with Video greyed and its reason given.

Fig. 4. A COLLECT run on the synthetic camera: each frame's verdict and exposure correction, the shutter-bucket folders and the metrics index.

Fig. 5. The Library: sessions, frames with their verdicts, and the encode panel.

Fig. 6. The sun's events for today and a week of sunset plans, with the check that a fixed lens holds the azimuth swing.