SkyLok/camera_example/README.md
2026-05-21 14:11:06 +02:00

641 B

camera_example

libcamera viewfinder (XRGB8888) → libjpeg-turbo → TCP. One client at a time.

Wire format: [uint32 BE size][jpeg_bytes] repeating.

Knobs (fps, quality, AF, lens, port, resolution) are constexpr at the top of camera.cpp.

Build on the Pi

apt install g++ pkg-config libcamera-dev libevent-dev libjpeg-turbo8-dev
make

Receive

nc <pi-ip> 5000 | ffplay -f mjpeg -

Cross-build (Nix, x86 → armv6l)

nix build

Binary links against /nix/store so it only runs on a Pi with Nix installed. For plain Pi OS: use make on the device, or ./deploy.sh user@host to rsync+build.