Skip to content

Instantly share code, notes, and snippets.

@bniggemyer
bniggemyer / README.md
Created July 9, 2026 22:32 — forked from MrQuallzin/README.md
Cosmos timelapse with external camera (via gphoto2)

Cosmos timelapse with an external USB camera

Trigger a USB-tethered camera for Cosmos timelapses instead of using the printer's built-in camera. Rendering is offloaded to a Linux desktop so the printer's R528 SoC doesn't have to do video encoding.

How it works

The printer fires a small HTTP call per layer to a Flask shim running on a Linux desktop. The shim calls gphoto2 to capture from the camera and saves the JPEG locally. At print end, ffmpeg renders the frames into an MP4.

printer (layer change) ──HTTP──▶ Flask shim ──▶ gphoto2 ──▶ camera (USB)