Ultra-low latency WebRTC streaming for Raspberry Pi and NVIDIA Jetson over WiFi, LTE, or 5G.
- Hardware encoding on-device — V4L2 M2M on Raspberry Pi, NVENC on Jetson.
- ~200 ms glass-to-glass, ~100 ms on Jetson.
- Control travels back — DataChannels carry messages the other way, and the IPC bridge relays them to any process on the device.
- Runs on cellular — NAT traversal, congestion control and packet-loss recovery come with WebRTC, so the same build works over LTE or 5G.
- Two platforms, three camera backends — libcamera, libargus, V4L2.
- Pluggable signaling — MQTT, WHEP, LiveKit and Cloudflare Realtime share one interface.
| Board | CSI backend | Hardware encode | Status |
|---|---|---|---|
| Pi Zero 2 W / 3B / 4 | libcamera | V4L2 M2M — H.264 (zero-copy DMABUF) | ✅ Tested |
| Pi 5 | libcamera | — (software OpenH264) | ✅ Tested |
| Jetson Orin NX | libargus | NVENC — H.264 + AV1 | ✅ Tested |
| Jetson Nano / NX / Orin | libargus | NVENC — H.264 | Supported |
USB cameras are supported through V4L2 on both platforms.
Check out the tutorial video or follow these steps.
Use Raspberry Pi Imager to flash Lite OS to SD card.
sudo apt update
sudo apt install libmosquitto1 pulseaudio libavformat61 libswscale8 libyaml-cpp0.8Get the latest release binary .
wget https://github.com/TzuHuanTai/RaspberryPi-WebRTC/releases/latest/download/pi-webrtc_raspios-trixie-arm64.tar.gz
tar -xzf pi-webrtc_raspios-trixie-arm64.tar.gzJetson builds are published on the same page as pi-webrtc_jetson-l4t-<version>.tar.gz.
Use HiveMQ, EMQX, or a self-hosted broker.
Tip
MQTT lets your Pi camera and client exchange WebRTC connection info. WHEP doesn’t need a broker but requires a public hostname. LiveKit needs an SFU server, and serves many viewers from one uplink. Cloudflare Realtime serves just as many with no server of your own — the fan-out runs on Cloudflare's edge.
- Open picamera-web demo UI — add MQTT settings, and create a
UID. - Run the command on your Pi:
./pi-webrtc \ --camera=libcamera:0 \ --fps=30 \ --width=1280 \ --height=960 \ --use-mqtt \ --mqtt-host=your.mqtt.cloud \ --mqtt-port=8883 \ --mqtt-username=hakunamatata \ --mqtt-password=Wonderful \ --uid=your-custom-uid \ --no-audio \ --hw-accel
Important
Remove --hw-accel for Pi 5 or others without hardware encoder.
| Transport | Best for | Clients |
|---|---|---|
| MQTT | Peer-to-peer, no public hostname needed | picamera.js (Web + React Native) · picamera-app (Android) |
| WHEP | Playing a URL in any standard WebRTC player | Home Assistant WebRTC Camera · eyevinn/webrtc-player |
| LiveKit | Many simultaneous viewers from one uplink | picamera.js |
| Cloudflare Realtime | Many simultaneous viewers with nothing to host | picamera.js |
Signaling is pluggable — each transport implements the same interface in src/signaling/, and
more than one can be enabled at a time.
📚 Full documentation → picamera.live/docs
Configuration · Camera and Encoding · Signaling · Recording · Architecture · Building · Advanced usage
Object detection and tracking on Jetson, multi-camera capture from a single process, and on-device LiveKit token issuing are available under a commercial license — see Commercial Version or contact tzu.huan.tai@gmail.com.
Apache-2.0 — see LICENSE.

