Skip to content

Commit 8bddeea

Browse files
committed
docs: simplified README instructions
1 parent b111dec commit 8bddeea

File tree

8 files changed

+47
-58
lines changed

8 files changed

+47
-58
lines changed

README.md

Lines changed: 47 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
<p align=center>
2+
<img src="doc/pi_5_latency_demo.gif" alt="Pi 4b latency demo">
3+
</p>
4+
15
<h1 align="center">
2-
Raspberry Pi WebRTC
6+
<p>Raspberry Pi WebRTC</p>
37
</h1>
48

9+
<p align="center">
10+
Turn your Raspberry Pi into a real-time,<b> ~200ms low-latency</b> WebRTC camera.
11+
</p>
12+
13+
514
<p align="center">
615
<a href="https://chromium.googlesource.com/external/webrtc/+/branch-heads/5790"><img src="https://img.shields.io/badge/libwebrtc-m115.5790-red.svg" alt="WebRTC Version"></a>
716
<img src="https://img.shields.io/github/downloads/TzuHuanTai/RaspberryPi_WebRTC/total.svg?color=yellow" alt="Download">
@@ -10,92 +19,71 @@
1019
<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>
1120
</p>
1221

13-
<p align=center>
14-
<img src="doc/pi_4b_latency_demo.gif" alt="Pi 4b latency demo">
15-
</p>
22+
<hr>
1623

17-
Turn your Raspberry Pi into a low-latency security camera using the hardware encoder and WebRTC.
18-
19-
- Supports real-time adjustment of camera parameters and video recording download.
20-
- Support [multiple users](doc/pi_4b_users_demo.gif) for simultaneous live streaming.
21-
- Support signaling
24+
- Snapshot/video recording and WebRTC DataChannel messaging
25+
- Supports P2P, [SFU broadcasting](https://youtu.be/fuJ_EzwmlPM?si=66H8CgUIKo85leHI), and [Home Assistant](https://www.home-assistant.io) integration
26+
- Signaling options:
2227

2328
**MQTT**
2429
* [picamera.js](https://www.npmjs.com/package/picamera.js)
2530
* [picamera-react-native](https://www.npmjs.com/package/picamera-react-native)
26-
* [picamera-app](https://github.com/TzuHuanTai/picamera-app) *(demo application)*
27-
* [picamera-web](https://app.picamera.live) *(demo application)*
31+
* [picamera-web](https://app.picamera.live)
32+
* [picamera-app](https://github.com/TzuHuanTai/picamera-app) - Android
2833

2934
**[WHEP](https://www.ietf.org/archive/id/draft-ietf-wish-whep-02.html)**
30-
* [Home Assistant](https://www.home-assistant.io)
35+
* [Home Assistant WebRTC Camera](https://github.com/AlexxIT/WebRTC)
3136
* [eyevinn/webrtc-player](https://www.npmjs.com/package/@eyevinn/webrtc-player)
3237

3338
**WebSocket**
34-
* [picamera.js](https://github.com/TzuHuanTai/picamera.js?tab=readme-ov-file#watch-videos-via-the-sfu-server) *(SFU signaling & broadcasting)*
35-
36-
- 🎥 [Watch demo](https://www.youtube.com/watch?v=JZ5bcSAsXog)
37-
39+
* [picamera.js](https://github.com/TzuHuanTai/picamera.js?tab=readme-ov-file#watch-videos-via-the-sfu-server) - SFU signaling & broadcast
3840

3941
# Quick Start
4042

41-
To set up the environment, please check out the [tutorial video](https://youtu.be/g5Npb6DsO-0) or the steps below.
43+
Check out the [tutorial video](https://youtu.be/g5Npb6DsO-0) or follow these steps.
4244

43-
## Hardware Requirements
45+
## Requirements
4446

4547
<img src="https://assets.raspberrypi.com/static/51035ec4c2f8f630b3d26c32e90c93f1/2b8d7/zero2-hero.webp" height="96">
4648

47-
* Raspberry Pi (Zero 2W/3B/3B+/4B/5).
48-
* CSI or USB Camera Module.
49-
50-
## Environment Setup
49+
- Raspberry Pi Zero 2W, 3B, 4B, or 5
50+
- CSI or USB camera (supports libcamera or V4L2)
5151

52-
### 1. Install Raspberry Pi OS
52+
## Setup
5353

54-
Use the [Raspberry Pi Imager](https://www.raspberrypi.com/software/) to install Raspberry Pi Lite OS on your microSD card.
54+
### 1. Flash Raspberry Pi OS
5555

56-
<details>
57-
<summary>
58-
<b>💡 Can I use a regular Raspberry Pi OS, or does it have to be Lite?</b>
59-
</summary>
60-
61-
> You can use either the Lite or full Raspberry Pi OS (the official recommended versions), but Lite OS is generally more efficient.
62-
63-
</details>
56+
Use [Raspberry Pi Imager](https://www.raspberrypi.com/software/) to flash **Lite OS** (or full OS) to SD card.
6457

6558
### 2. Install Dependencies
6659

6760
```bash
6861
sudo apt update
69-
sudo apt install libcamera0.5 libmosquitto1 pulseaudio libavformat59 libswscale6
62+
sudo apt isnstall libcamera0.5 libmosquitto1 pulseaudio libavformat59 libswscale6
7063
```
7164

72-
### 3. Download & Unpack
65+
### 3. Download App
7366

74-
Prepare the binary file from [Releases](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/releases).
67+
Get the latest [release binary](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/releases) .
7568
```bash
76-
wget https://github.com/TzuHuanTai/RaspberryPi-WebRTC/releases/latest/download/pi-webrtc-v1.0.7_raspios-bookworm-arm64.tar.gz
77-
tar -xzf pi-webrtc-v1.0.7_raspios-bookworm-arm64.tar.gz
69+
wget https://github.com/TzuHuanTai/RaspberryPi-WebRTC/releases/latest/download/pi-webrtc-v1.1.0_raspios-bookworm-arm64.tar.gz
70+
tar -xzf pi-webrtc-v1.1.0_raspios-bookworm-arm64.tar.gz
7871
```
7972

80-
### 4. Set Up MQTT
81-
82-
You can use a free cloud MQTT service like [HiveMQ](https://www.hivemq.com) or [EMQX](https://www.emqx.com/en), or set up your own self-hosted broker.
83-
84-
<details>
85-
<summary>
86-
<b>💡 Is MQTT registration necessary, and why is MQTT needed?</b>
87-
</summary>
73+
### 4. MQTT Signaling
8874

89-
> MQTT is one option for signaling P2P connection information between your camera and the client UI. WHEP, on the other hand, runs an HTTP service locally and does not require a third-party server. It is only suitable for devices with a public hostname. If you choose to self-host an MQTT server (e.g., [Mosquitto](doc/SETUP_MOSQUITTO.md)) and need to access the signaling server remotely via mobile data, you may need to set up DDNS, port forwarding, and SSL/TLS.
75+
Use [HiveMQ](https://www.hivemq.com), [EMQX](https://www.emqx.com/en), or a [self-hosted](doc/SETUP_MOSQUITTO.md) broker.
9076

91-
</details>
77+
> [!TIP]
78+
> **MQTT** lets your Pi camera and client exchange WebRTC connection info.
79+
**WHEP** doesn’t need a broker but requires a public hostname.
9280

93-
## Running the Application
81+
## Run the App
9482

9583
![preview_demo](https://github.com/user-attachments/assets/d472b6e0-8104-4aaf-b02b-9925c5c363d0)
9684

97-
* Set up the MQTT settings on the [picamera-web](https://app.picamera.live), and create a new device with a `UID`.
98-
* Run the command based on your network settings and `UID` on the Raspberry Pi:
85+
- Open [picamera-web](https://app.picamera.live), add MQTT settings, and create a `UID`.
86+
- Run the command on your Pi:
9987
```bash
10088
./pi-webrtc \
10189
--camera=libcamera:0 \
@@ -113,15 +101,16 @@ You can use a free cloud MQTT service like [HiveMQ](https://www.hivemq.com) or
113101
```
114102

115103
> [!IMPORTANT]
116-
> Use `--hw-accel` on Pi Zero 2W, 3B/3B+, and 4B only. Remove it on Pi 5 or devices without HW encoder.
104+
> Remove `--hw-accel` for Pi 5 or others without hardware encoder..
117105

118-
# [Advance](https://github.com/TzuHuanTai/RaspberryPi_WebRTC/wiki/Advanced-Settings)
106+
# [Advanced Usage](https://github.com/TzuHuanTai/RaspberryPi_WebRTC/wiki/Advanced-Settings)
119107

120-
- [Broadcasting Live Stream to 1,000+ Viewers via SFU](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#broadcasting-live-stream-to-1000-viewers-via-sfu)
121-
- [Using the V4L2 Driver](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#using-the-legacy-v4l2-driver) (for usb camera)
122-
- [Run as Linux Service](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#run-as-linux-service)
108+
- [Broadcasting a Live Stream to 1,000+ Viewers via SFU](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#broadcasting-a-live-stream-to-1000-viewers-via-sfu)
109+
- [Using the V4L2 Driver](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#using-the-legacy-v4l2-driver) (for USB cameras)
110+
- [Running as a Linux Service](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#running-as-a-linux-service)
123111
- [Recording](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#recording)
124-
- [Two-way communication](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#two-way-communication)
125-
- [Virtual Camera](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings##virtual-camera)
112+
- [Two-way Audio Communication](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#two-way-audio-communication)
113+
- [Two-way DataChannel Messaging](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#two-way-datachannel-messaging)
114+
- [Stream AI or Any Custom Feed to a Virtual Camera](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings##stream-ai-or-any-custom-feed-to-a-virtual-camera)
126115
- [WHEP with Nginx proxy](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#whep-with-nginx-proxy)
127-
- [Use WebRTC Camera in Home Assistant](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#use-webrtc-camera-in-home-assistant)
116+
- [Using the WebRTC Camera in Home Assistant](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#using-the-webrtc-camera-in-home-assistant)

doc/latency.jpg

-539 KB
Binary file not shown.

doc/latency_70ms.jpg

-120 KB
Binary file not shown.

doc/latency_chart.png

-21.8 KB
Binary file not shown.

doc/pi_4b_users_demo.gif

-5.98 MB
Binary file not shown.

doc/pi_5_latency_demo.gif

10.6 MB
Loading

doc/web_live_demo.gif

3.46 MB
Loading

doc/web_live_demo.jpg

-142 KB
Binary file not shown.

0 commit comments

Comments
 (0)