A Raspberry Pi with a camera module, streaming to the laptop behind it

Open source · WebRTC · Raspberry Pi & Jetson

Operate hardware from anywhere

Robots, drones and cranes join a room, like people join a video call. Everyone sees the live video in about 100 ms, and one person drives. Built on open-source pi-webrtc.

Glass-to-glass on LAN
Sub-100 ms
Hardware encoding
H.264 / AV1
Pluggable signaling
MQTT · WHEP · SFU
Open source
Apache-2.0

01

Any device with a camera can join

Raspberry Pi, NVIDIA Jetson, or the RTSP cameras you already have. One pi-webrtc binary puts them online.

Raspberry Pi

libcamera · H.264 hardware encoding

NVIDIA Jetson

libargus · H.264 / AV1 hardware encoding

RTSP cameras

Re-encoded next to the camera at a lower bitrate

robot arm on a factory line

Robot arms

Fix a line or pick parts from another city. The operator sees each move as it happens.

drone over hills

Drones

Fly inspections over LTE or 5G. The whole team watches the same view.

gantry crane over containers

Overhead cranes

Run cranes in ports and factories from one control room.

industrial camera

Cameras & inspection

Watch machines, labs and sites live, and keep a recording on the device.

Pi 5 and Jetson Orin Nano have no hardware encoder, so they encode in software. USB cameras work on both platforms.

See it running

Web-controlled drone

A gamepad in the browser drives a PX4 drone over WiFi. The DataChannel and the video share one connection.

On-device object tracking

YOLOv11 and NvDCF run on a Jetson Orin NX and draw on the live video.

One stream, many screens

A Pi 5 streams through Cloudflare to a laptop and two phones. The laptop shows the stopwatch about 100 ms late.

02

One device, many people, one driver

A room works like a video call. People and devices join, everyone watches, and one person controls the device at a time.

Shared rooms

Everyone in a room sees every device. A device can be in up to 4 rooms.

One driver at a time

One person controls the device. The others wait in line.

Voice

People in the room talk to each other, and the device plays their voices on its speaker.

Control on the same link

Gamepad and keyboard commands travel next to the video. The IPC bridge hands them to your program.

Streams only when watched

An idle device sends only a small ping. The video starts when someone joins.

Your Cloudflare account

Deploy cf-sfu-worker with one click, or try our free test server first. Apache-2.0.

Raspberry Pi 5 to browser in about 50 ms

On a LAN at 100 fps, with a gamepad driving over a DataChannel.

03

Signaling

Pick how the device is reached. More than one transport can run at the same time.

webrtc mqtt signaling

MQTT

Needs: An MQTT broker

Peer-to-peer viewing from anywhere. The device needs no public hostname — any broker brokers the handshake.

webrtc whep signaling

WHEP

Needs: No extra server — a LAN IP is enough

The device serves the endpoint itself, so the stream plays from a plain URL in any WHEP player, including Home Assistant.

webrtc sfu signaling

SFU

Needs: cf-sfu-worker on your Cloudflare account, or a LiveKit server

Many simultaneous viewers. The device uploads one stream and the SFU fans it out, so viewer count stops being its problem.

With an SFU the board uploads once and any number of viewers can watch and send control messages back over a DataChannel.
Local devices talk to the board over a Unix socket and V4L2; the board publishes to an SFU, which relays to every viewer, in 100 to 200 ms glass to glass.

Glass to glass: camera to viewer's screen. About 100 ms at 120 fps with both ends near one Cloudflare location. Distance, slower networks and lower frame rates add more.

04

Why pi-webrtc

The camera board is the WebRTC endpoint. There is no gateway in the media path.

What that buys you: one less always-on host to deploy, secure and scale. Nothing transcodes or re-streams in between, so the delay stays close to the network round-trip rather than stacking up per hop. Control travels back over a DataChannel on the same connection, so there is no second path to operate. And the same binary covers both shapes — peer-to-peer for a single viewer, an SFU when you need many.

TraditionalRTSP camera + gatewayA separate always-on host sits in the media path — one more thing to run, secure and scale.
A traditional RTSP camera needs a gateway or media server between it and the browser, adding 500 ms to 2 s of delay.
pi-webrtcThe board is the endpointThe board encodes once and speaks WebRTC itself — straight to a viewer, or into an SFU to fan out.
pi-webrtc encodes on the board and speaks WebRTC itself: one stream straight to a browser, one to one, or into an SFU that fans it out to many viewers.
RTSP camerasLower bandwidth bills for RTSP camerasFor an IP camera, pi-webrtc runs on a small board next to it, as a gateway that re-encodes. Media servers such as MediaMTX relay the stream as it is: to lower the bitrate, you run FFmpeg next to them, one fixed copy per quality. pi-webrtc sets the bitrate on the device and keeps adjusting to the network. A wall of small tiles then uses a fraction of the data, and your cloud and cellular bills drop every month.

One 1080p60 camera, streamed 24 hours a day for 30 days

  • Media server relay1080p60 · 8 Mbps2,592 GB
  • pi-webrtc · monitoring wall2 Mbps cap · up to 1080p60648 GB−75%
  • pi-webrtc · status tile0.5 Mbps cap · 960×540 at 60 fps162 GB−94%

pi-webrtc values are bitrate caps; actual use depends on the scene. Video sizes measured on a Jetson Orin NX with a mostly still scene.

05Roadmap

Next: an AI co-pilot

Each session already carries the video and the operator's commands on one connection. We plan to record them together, train a model in the cloud, and let it help drive.

  1. Planned

    1Record

    Save the video and the commands in sync, for each session.

  2. Planned

    2Train

    Train a model on your own sessions in the cloud.

  3. Planned

    3Co-pilot

    The model suggests moves or handles routine ones. A person can always take over.

06

Try it in a few minutes

Use our free test server. You need a Raspberry Pi or a Jetson with a camera.

Device
  1. 1

    Install

    Install the libraries, then download pi-webrtc and unpack it.

    sudo apt update
    sudo apt install libmosquitto1 pulseaudio libavformat61 libyaml-cpp0.8
    wget https://github.com/mazupo/pi-webrtc/releases/latest/download/pi-webrtc_raspios-trixie-arm64.tar.gz
    tar -xzf pi-webrtc_raspios-trixie-arm64.tar.gz
  2. 2

    Run

    Start streaming to the free test server. The room name and the device ID were made for you.

    ./pi-webrtc --camera=libcamera:0 --uid=your-device --no-audio \
      --use-cloudflare --api-url=https://api.mazupo.com/sfu \
      --api-key=1L4-mUUztDWhzF_ORhPHb4xpQK2Y9bEgeif0pYn7PXI \
      --cloudflare-room=your-room
  3. 3

    Watch

    Open your viewer link, and select Join.

    https://api.mazupo.com/sfu/?room=your-room&viewer_key=-706d13ForZLHmv6FwARf9ZgEEfO78AattyxWhNoHFo
    Open the viewer

This is a shared test server. Anyone with your link can watch. For your own server, deploy cf-sfu-worker to your Cloudflare account.