MCPcopy Create free account
hub / github.com/TzuHuanTai/RaspberryPi-WebRTC

github.com/TzuHuanTai/RaspberryPi-WebRTC @v2.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.0 ↗ · + Follow
703 symbols 1,242 edges 106 files 16 documented · 2% updated 2d agov2.0.0 · 2026-05-15★ 9794 open issues

Browse by type

Functions 599 Types & classes 104
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<img src="https://github.com/TzuHuanTai/RaspberryPi-WebRTC/raw/v2.0.0/doc/pi_5_latency_demo.gif" alt="Pi 4b latency demo">

Raspberry Pi WebRTC

Turn Raspberry Pi or NVIDIA Jetson into a low-latency ~200ms WebRTC streaming platform.

<a href="https://chromium.googlesource.com/external/webrtc/+/branch-heads/7680"><img src="https://img.shields.io/badge/libwebrtc-m146.7680-red.svg" alt="WebRTC Version"></a>
<img src="https://img.shields.io/github/downloads/TzuHuanTai/RaspberryPi_WebRTC/total.svg?color=yellow" alt="Download">
<img src="https://img.shields.io/badge/C%2B%2B-20-brightgreen?logo=cplusplus">
<img src="https://img.shields.io/github/v/release/TzuHuanTai/RaspberryPi_WebRTC?color=blue" alt="Release">
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache_2.0-purple.svg" alt="License Apache"></a>

  • Native WebRTC with hardware/software encoding
  • Support snapshot, recording and broadcasting
  • Remote control and IoT messaging via WebRTC DataChannel
  • Signaling options:

MQTT * picamera.js * picamera-react-native * picamera-web * picamera-app - Android

WHEP * Home Assistant WebRTC Camera * eyevinn/webrtc-player

WebSocket * picamera.js - SFU signaling & broadcast

Requirements

  • Raspberry Pi (Zero/3/4/5) or NVIDIA Jetson (Nano/NX/Orin)
  • CSI or USB camera (supports libcamera, libargus or V4L2)

Quick Start for Pi

Check out the tutorial video or follow these steps.

1. Flash Raspberry Pi OS

Use Raspberry Pi Imager to flash Lite OS to SD card.

2. Install Dependencies

sudo apt update
sudo apt install libmosquitto1 pulseaudio libavformat61 libswscale8 libyaml-cpp0.8

3. Download Binary

Get 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.gz

4. MQTT Signaling

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.

Run the App

preview_demo

  • Open picamera-web, add MQTT settings, and create a UID.
  • Run the command on your Pi: bash ./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 # Only Pi Zero 2W, 3B, 4B support hw encoding

[!IMPORTANT] Remove --hw-accel for Pi 5 or others without hardware encoder.

Advanced Usage

Core symbols most depended-on inside this repo

Shape

Method 566
Class 96
Function 33
Enum 8

Languages

C++97%
Python3%

Modules by API surface

src/rtc/audio_device_bridge.h62 symbols
src/rtc/rtc_peer.cpp30 symbols
src/rtc/conductor.cpp25 symbols
src/common/v4l2_utils.cpp23 symbols
src/common/utils.cpp22 symbols
src/capturer/libargus_egl_capturer.cpp22 symbols
src/signaling/mqtt_service.cpp21 symbols
src/signaling/http_service.cpp21 symbols
src/codecs/jetson/jetson_encoder.cpp19 symbols
src/capturer/v4l2_capturer.cpp19 symbols
src/common/v4l2_frame_buffer.cpp18 symbols
src/signaling/websocket_service.cpp17 symbols

For agents

$ claude mcp add RaspberryPi-WebRTC \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page