How curtismuntz/witness works
Project type and purpose
• This is an API-callable webcam project (“Witness”) that provides a networked service for controlling webcams (start/stop recording, calibrate, timelapse, tracking, etc.) and retrieving video data.
• It is written in C++ (server & drivers), Rust (client), uses Protocol Buffers for the API, and is packaged via Bazel + Docker for x86 and ARM devices.
• Use case: robotics testing environments where you want automated, unbiased video capture across multiple physically distributed camera “witnesses.”
File structure
• Top-level:
– deploy, docker, docker-compose.yml → container orchestration and multi-arch Docker images
– witness/
• witness/server → monolithic C++ server binary, subdivided into modules (webcam actions, vision, file operations, time, converters)
• witness/drivers → low-level camera wrappers (e.g., amcrest)
• witness/client → Rust CLI bindings + endpoint scripts for calling the server via gRPC/HTTP
• witness/api → .proto definitions of the service interface
– tools, third_party → build rules, external libs, Bazel config
• CI/CD: .github/actions, .github/workflows, ci/, BUILD.bazel, WORKSPACE
README for additional insights
• The API is Protobuf/gRPC style (see .proto files)
• The server exposes a gRPC HTTP endpoint listening for commands, writes files to a configured media directory
• Clients invoke the service locally or over network; orchestration via Docker or balena is supported