About this project

pi-webrtc is an open-source project (Apache-2.0) that packages WebRTC camera streaming and remote control into a single binary for Raspberry Pi and NVIDIA Jetson devices. It is written in C++20 and built against libwebrtc (m147.7727). What it does - Streams a camera from a Raspberry Pi or Jetson to a browser over WebRTC, with the project claiming sub-100ms latency on LAN. - Carries control messages and telemetry back to the device over WebRTC DataChannels. - Works remotely over WiFi, LTE, or 5G without requiring a public IP, using NAT traversal and congestion control. - Supports hardware-accelerated H.264/AV1 encoding on supported devices, with automatic fallback to software encoding when unsupported. Signaling options Three signaling modes are documented, and multiple can be enabled at once: - MQTT: peer-to-peer with device control, suitable for remote access. - WHEP: playback with any standard WebRTC player. - SFU: simultaneous viewers via LiveKit or Cloudflare Realtime. Hardware support - Raspberry Pi: libcamera backend, H.264 hardware encoding on supported models. - NVIDIA Jetson: libargus backend, H.264/AV1 hardware encoding on supported models. - USB cameras via V4L2 on both platforms. Quick start On Raspberry Pi OS Trixie (64-bit), install dependencies (libmosquitto1, pulseaudio, libavformat61, libswscale8, libyaml-cpp0.8), download the latest release tarball, and run the binary. A local WHEP test can be started with a camera and UID, then viewed through a web player by entering the device's WHEP URL. For remote peer-to-peer use, the binary accepts MQTT host, port, username, password, UID, resolution, FPS, and hardware-acceleration flags; a free HiveMQ Cloud instance or a self-hosted broker can be used. Documentation and licensing Full documentation is linked from the repository, with separate docs for signaling and quick start. The project is licensed under Apache-2.0 with third-party notices in NOTICE. The README also mentions a sponsorship program that provides access to additional releases, features, and documentation.