docs(smoke): add srs whep setup guide

This commit is contained in:
2026-03-11 15:11:41 +08:00
parent 058226fea2
commit bc1b619dee
2 changed files with 106 additions and 0 deletions
+49
View File
@@ -10,6 +10,7 @@ Use these checks when you want to verify RTMP interoperability or a real cvmmap-
- Synthetic RTMP smoke using `rtmp_output_tester`
- Live cvmmap ingest -> FFmpeg encoder -> RTMP -> SRS HTTP-FLV forward
- Live cvmmap ingest -> FFmpeg encoder -> RTMP -> SRS WHEP/WebRTC playback
## Prerequisites
@@ -94,6 +95,54 @@ Expected success signals:
The HTTP-FLV probe is the authoritative pass/fail signal. The optional `ffmpeg` decode sample is best-effort because a very short bounded publish can disappear before the second client attaches.
## Manual Test: WHEP / WebRTC
SRS supports WHEP playback, and it is the better path when RTMP or HTTP-FLV playback feels too slow.
This repo includes a local SRS config copy at [srs.local.conf](/home/crosstyan/Code/cvmmap-streamer-ffmpeg-mcap/docs/smoke/srs.local.conf). It enables:
- RTMP publish on `:1935`
- HTTP API on `:1985`
- HTTP player pages on `:8080`
- WebRTC UDP on `:8000`
- `rtmp_to_rtc on`
Start SRS with that config:
```bash
cd ~/Code/srs/trunk
./objs/srs -t -c /home/crosstyan/Code/cvmmap-streamer-ffmpeg-mcap/docs/smoke/srs.local.conf
./objs/srs -c /home/crosstyan/Code/cvmmap-streamer-ffmpeg-mcap/docs/smoke/srs.local.conf
```
Publish from the streamer:
```bash
cd ~/Code/cvmmap-streamer-ffmpeg-mcap
./build/cvmmap_streamer \
--run-mode pipeline \
--input-uri 'cvmmap://zed@/tmp/cvmmap' \
--codec h264 \
--encoder-backend ffmpeg \
--encoder-device nvidia \
--rtmp \
--rtmp-url 'rtmp://127.0.0.1/live/zed_live' \
--rtmp-transport libavformat \
--rtmp-mode enhanced
```
Open the WHEP player page in a browser:
- Player page: `http://127.0.0.1:8080/players/whep.html`
- WHEP API URL: `http://127.0.0.1:1985/rtc/v1/whep/?app=live&stream=zed_live`
Notes:
- VLC is not the right client for WHEP. Use a browser or another WebRTC/WHEP-capable player.
- Keep the stream codec on `h264` for browser compatibility.
- If the browser runs on another host and SRS picks the wrong NIC, replace `candidate *;` in [srs.local.conf](/home/crosstyan/Code/cvmmap-streamer-ffmpeg-mcap/docs/smoke/srs.local.conf) with the reachable host IP.
- On this machine, likely candidates are `192.168.2.13` or `192.168.2.184`.
## Example Live Result
For a ZED source running at `cvmmap://zed@/tmp/cvmmap`, the successful forward probe looked like: