Skip to content

Commit 6d7a311

Browse files
committed
chore: set libcamera:0 as default and refine setup instructions
1 parent 65698a5 commit 6d7a311

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

README.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,28 @@
1616

1717
Turn your Raspberry Pi into a low-latency home security camera using the V4L2 DMA hardware encoder and WebRTC. [[demo video](https://www.youtube.com/watch?v=JZ5bcSAsXog)]
1818

19-
- Pure P2P-based camera allows video playback and download without a media server.
19+
- Supports real-time adjustment of camera parameters and video recording download.
2020
- Support [multiple users](doc/pi_4b_users_demo.gif) for simultaneous live streaming.
21-
- Support signaling via [WHEP](https://www.ietf.org/archive/id/draft-ietf-wish-whep-02.html) or MQTT.
22-
23-
# How to use
24-
25-
To set up the environment, please check out the [tutorial video](https://youtu.be/g5Npb6DsO-0) or the steps below.
26-
27-
* Download and run the binary file from [Releases](https://github.com/TzuHuanTai/RaspberryPi_WebRTC/releases).
28-
* Set up the network configuration and create a new client using one of the following options:
21+
- Support signaling
2922

3023
**MQTT**
3124
* [PiCamera.js](https://www.npmjs.com/package/picamera.js)
32-
* [Pi Camera App](https://github.com/TzuHuanTai/Pi-Camera) (Android)
33-
* [Pi Camera Web](https://picamera.live)
25+
* [Pi Camera App](https://github.com/TzuHuanTai/Pi-Camera) *(for development and testing)*
26+
* [Pi Camera Web](https://picamera.live) *(for development and testing)*
3427

35-
**WHEP**
28+
**[WHEP](https://www.ietf.org/archive/id/draft-ietf-wish-whep-02.html)**
3629
* [Home Assistant](https://www.home-assistant.io)
3730
* [eyevinn/webrtc-player](https://www.npmjs.com/package/@eyevinn/webrtc-player)
3831

32+
# Quick Start
33+
34+
To set up the environment, please check out the [tutorial video](https://youtu.be/g5Npb6DsO-0) or the steps below.
35+
3936
## Hardware Requirements
4037

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

43-
* Raspberry Pi (Zero 2W/3/3B+/4B/5).
40+
* Raspberry Pi (Zero 2W/3B/3B+/4B/5).
4441
* CSI or USB Camera Module.
4542

4643
## Environment Setup
@@ -58,22 +55,23 @@ Use the [Raspberry Pi Imager](https://www.raspberrypi.com/software/) to install
5855
5956
</details>
6057

61-
### 2. Install essential libraries
58+
### 2. Install Dependencies
6259

6360
```bash
6461
sudo apt install libmosquitto1 pulseaudio libavformat59 libswscale6
6562
```
6663

67-
### 3. Download and unzip the binary file
64+
### 3. Download & Unpack
6865

66+
Prepare the binary file from [Releases](https://github.com/TzuHuanTai/RaspberryPi_WebRTC/releases).
6967
```bash
7068
wget https://github.com/TzuHuanTai/RaspberryPi_WebRTC/releases/latest/download/pi_webrtc-v1.0.5_MQTT_raspios-bookworm-arm64.tar.gz
7169
tar -xzf pi_webrtc-v1.0.5_MQTT_raspios-bookworm-arm64.tar.gz
7270
```
7371

74-
### 4. Setup MQTT
72+
### 4. Set Up MQTT
7573

76-
An MQTT server is required for communication between devices. For remote access, free cloud options include [HiveMQ](https://www.hivemq.com) and [EMQX](https://www.emqx.com/en).
74+
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.
7775

7876
<details>
7977
<summary>
@@ -90,21 +88,22 @@ An MQTT server is required for communication between devices. For remote access,
9088
* Run the command based on your network settings and `UID` on the Raspberry Pi:
9189
```bash
9290
./pi_webrtc \
93-
--use_libcamera \
91+
--camera=libcamera:0 \
9492
--fps=30 \
9593
--width=1280 \
9694
--height=960 \
97-
--hw_accel \
98-
--no_audio \
9995
--mqtt_host=your.mqtt.cloud \
10096
--mqtt_port=8883 \
10197
--mqtt_username=hakunamatata \
10298
--mqtt_password=Wonderful \
103-
--uid=your-custom-uid
99+
--uid=your-custom-uid \
100+
--no_audio \
101+
--hw_accel # Only Pi Zero 2W, 3B, 4B support hw encoding
104102
```
105103

106104
> [!IMPORTANT]
107-
> The `--hw_accel` flag is used for Pi Zero 2W, 3, 3B+, and 4B. For Pi 5 or other SBCs without a hardware encoder, run this command in software encoding mode by removing the `--hw_accel` flag.
105+
> Use `--hw_accel` for Pi Zero 2W, 3B, 3B+, and 4B. Remove for Pi 5 or devices without hardware encoding.
106+
108107
* Go to the Live page to enjoy real-time streaming!
109108

110109
<p align=center>
@@ -113,7 +112,7 @@ An MQTT server is required for communication between devices. For remote access,
113112

114113
# [Advance](https://github.com/TzuHuanTai/RaspberryPi_WebRTC/wiki/Advanced-Settings)
115114

116-
- [Using the Legacy V4L2 Driver](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#using-the-legacy-v4l2-driver) for usb camera
115+
- [Using the V4L2 Driver](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#using-the-legacy-v4l2-driver) for usb camera
117116
- [Run as Linux Service](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#run-as-linux-service)
118117
- [Recording](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#recording)
119118
- [Two-way communication](https://github.com/TzuHuanTai/RaspberryPi-WebRTC/wiki/Advanced-Settings#two-way-communication)

0 commit comments

Comments
 (0)