Overview
Visual monitoring is essential for species identification, behavioural studies, and population counts. Camera traps have become a cornerstone of modern ecology — but in practice, multiple processes need simultaneous access to a single camera: a motion detector triggering on animal movement, a classifier identifying species in real time, a live feed for remote observers, and an archive recording continuously.
ws-camerad solves this by acting as shared camera infrastructure. The daemon maintains exclusive camera ownership and distributes frames to any number of concurrent consumers via shared memory (zero-copy), Unix sockets, or RTSP. Consumer crashes are isolated — no single failed classifier or recorder can bring down the camera feed.
Why It Matters
Traditional camera traps capture images only when triggered and store them for later retrieval. ws-camerad goes further: it enables continuous recording with a rolling buffer, so events detected after the fact — a rare species passing through, or an unexpected behaviour — can still be extracted as video clips from frames already captured. Combined with NoIR camera support, it enables day-and-night monitoring of wildlife activity.
Key Features
- Continuous capture with zero frame loss
- Concurrent multi-consumer access via C++ and Python client libraries
- On-demand still image capture
- Pre-event and post-event video clip extraction from rolling buffer
- Remote streaming via RTSP
- Hardware-accelerated H.264 encoding via V4L2 M2M
- Zero-copy frame distribution via POSIX shared memory
- Software frame rotation (0°/90°/180°/270°) using ARM NEON SIMD
- Burst capture mode for rapid multi-frame acquisition
- Virtual camera output via v4l2loopback kernel module
- Multi-camera deployment support with independent instances
- NoIR camera tuning with runtime profile switching
Quick Start
sudo apt update
sudo apt install -y cmake build-essential libcamera-dev libjpeg-dev pkg-config
git clone https://github.com/Wildlife-Systems/ws-camerad.git
cd ws-camerad
mkdir build && cd build
cmake ..
make -j4
sudo make installUsage Guides
Source Code
ws-camerad is open source and available on GitHub.