mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-09-27 03:56:15 +08:00
add GStreamer + WHEP instructions (#4117)
This commit is contained in:
26
README.md
26
README.md
@@ -894,6 +894,32 @@ If encryption is enabled, set `tls-validation-flags` to `0`:
|
|||||||
gst-launch-1.0 rtspsrc tls-validation-flags=0 location=rtsps://ip:8322/...
|
gst-launch-1.0 rtspsrc tls-validation-flags=0 location=rtsps://ip:8322/...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
GStreamer also supports reading streams with WebRTC/WHEP, although track codecs must be specified in advance through the `video-caps` and `audio-caps` parameters. Furthermore, if audio is not present, `audio-caps` must be set anyway and must point to a PCMU codec. For instance, the command for reading a video-only H264 stream is:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
gst-launch-1.0 whepsrc whep-endpoint=http://127.0.0.1:8889/stream/whep use-link-headers=true \
|
||||||
|
video-caps="application/x-rtp,media=video,encoding-name=H264,payload=127,clock-rate=90000" \
|
||||||
|
audio-caps="application/x-rtp,media=audio,encoding-name=PCMU,payload=0,clock-rate=8000" \
|
||||||
|
! rtph264depay ! decodebin ! autovideosink
|
||||||
|
```
|
||||||
|
|
||||||
|
While the command for reading an audio-only Opus stream is:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
gst-launch-1.0 whepsrc whep-endpoint="http://127.0.0.1:8889/stream/whep" use-link-headers=true \
|
||||||
|
audio-caps="application/x-rtp,media=audio,encoding-name=OPUS,payload=111,clock-rate=48000,encoding-params=(string)2" \
|
||||||
|
! rtpopusdepay ! decodebin ! autoaudiosink
|
||||||
|
```
|
||||||
|
|
||||||
|
While the command for reading a H264 and Opus stream is:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
gst-launch-1.0 whepsrc whep-endpoint=http://127.0.0.1:8889/stream/whep use-link-headers=true \
|
||||||
|
video-caps="application/x-rtp,media=video,encoding-name=H264,payload=127,clock-rate=90000" \
|
||||||
|
audio-caps="application/x-rtp,media=audio,encoding-name=OPUS,payload=111,clock-rate=48000,encoding-params=(string)2" \
|
||||||
|
! decodebin ! autovideosink
|
||||||
|
```
|
||||||
|
|
||||||
#### VLC
|
#### VLC
|
||||||
|
|
||||||
VLC can read a stream from the server in multiple ways (RTSP, RTMP, HLS, SRT). The recommended one consists in reading with [RTSP](#rtsp):
|
VLC can read a stream from the server in multiple ways (RTSP, RTMP, HLS, SRT). The recommended one consists in reading with [RTSP](#rtsp):
|
||||||
|
Reference in New Issue
Block a user