Skip to content

Commit

Permalink
Update WebRTC doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Oct 17, 2023
1 parent d919a15 commit ec70b20
Show file tree
Hide file tree
Showing 4 changed files with 236 additions and 4 deletions.
61 changes: 60 additions & 1 deletion i18n/en-us/docusaurus-plugin-content-docs/current/doc/webrtc.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,66 @@ ffmpeg -re -i ./doc/source.flv -c copy -f flv rtmp://localhost/live/livestream
## HTTP API

About the API for WebRTC, please read [publish](./http-api.md#webrtc-publish) and [play](./http-api.md#webrtc-play).
SRS supports WHIP and WHEP for WebRTC.

* WHIP: [http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream](http://localhost:8080/players/whip.html)
* WHEP: [http://localhost:1985/rtc/v1/whep/?app=live&stream=livestream](http://localhost:8080/players/whep.html)

SRS also support legacy HTTP API for WebRTC, please read [publish](./http-api.md#webrtc-publish) and [play](./http-api.md#webrtc-play).

## Connection Failures

Some developer come to SRS community to get help, because they get error when use OBS WHIP to connect to online WHIP
server, because online server must use HTTPS and the UDP port might be more available, and it's hard to debug or
login to the online server for privacy or network issue.

So we find some ways to troubleshoot the connection failures in OBS WHIP, generally it's caused by HTTPS API setup
or UDP port not available issue.

Use curl to test WHIP HTTP or HTTPS API:

```bash
curl "http://localhost:1985/rtc/v1/whip/?ice-ufrag=6pk11386&ice-pwd=l91z529147ri9163933p51c4&app=live&stream=livestream-$(date +%s)" \
-H 'Origin: http://localhost' -H 'Referer: http://localhost' \
-H 'Accept: */*' -H 'Content-type: application/sdp' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)' \
--data-raw 'v=0\r\no=- 7788101884696796876 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:J8X7\r\na=ice-pwd:Dpq7/fW/osYcPeLsCW2Ek1JH\r\na=ice-options:trickle\r\na=fingerprint:sha-256 26:04:DF:BF:5E:87:1F:94:CF:5C:DE:99:B4:53:6D:2A:86:F3:A5:BF:22:E4:CF:17:8E:CE:2E:D1:98:88:64:97\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=sendonly\r\na=msid:- a2f262a8-4780-4694-919b-32bc07275224\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=ssrc:3184534672 cname:TPpRJpEeliM/kmO3\r\na=ssrc:3184534672 msid:- a2f262a8-4780-4694-919b-32bc07275224\r\nm=video 9 UDP/TLS/RTP/SAVPF 106\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:J8X7\r\na=ice-pwd:Dpq7/fW/osYcPeLsCW2Ek1JH\r\na=ice-options:trickle\r\na=fingerprint:sha-256 26:04:DF:BF:5E:87:1F:94:CF:5C:DE:99:B4:53:6D:2A:86:F3:A5:BF:22:E4:CF:17:8E:CE:2E:D1:98:88:64:97\r\na=setup:actpass\r\na=mid:1\r\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:13 urn:3gpp:video-orientation\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendonly\r\na=msid:- df032417-2927-420b-a5c4-0944a9c7df3d\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:106 H264/90000\r\na=rtcp-fb:106 goog-remb\r\na=rtcp-fb:106 transport-cc\r\na=rtcp-fb:106 ccm fir\r\na=rtcp-fb:106 nack\r\na=rtcp-fb:106 nack pli\r\na=fmtp:106 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=ssrc-group:FID 512761356 684544361\r\na=ssrc:512761356 cname:TPpRJpEeliM/kmO3\r\na=ssrc:512761356 msid:- df032417-2927-420b-a5c4-0944a9c7df3d\r\na=ssrc:684544361 cname:TPpRJpEeliM/kmO3\r\na=ssrc:684544361 msid:- df032417-2927-420b-a5c4-0944a9c7df3d\r\n' \
-v -k
```

> Note: You can replace `http://localhost` with `https://yourdomain.com` to test HTTPS API.
The answer contains the candidate, the UDP server IP, such as `127.0.0.1`:

```
a=candidate:0 1 udp 2130706431 127.0.0.1 8000 typ host generation 0
```

Use `nc` to send UDP packet to SRS WHIP server:

```bash
echo -en "\x00\x01\x00\x50\x21\x12\xa4\x42\x74\x79\x6d\x7a\x41\x51\x2b\x2f\x4a\x4b\x77\x52\x00\x06\x00\x0d\x36\x70\x6b\x31\x31\x33\x38\x36\x3a\x4a\x38\x58\x37\x00\x00\x00\xc0\x57\x00\x04\x00\x01\x00\x0a\x80\x2a\x00\x08\xda\xad\x1d\xce\xe8\x95\x5a\x83\x00\x24\x00\x04\x6e\x7f\x1e\xff\x00\x08\x00\x14\x56\x8f\x1e\x1e\x4f\x5f\x17\xf9\x2e\xa1\xec\xbd\x51\xd9\xa2\x27\xe4\xfd\xda\xb1\x80\x28\x00\x04\x84\xd3\x5a\x79" \
|nc -w 3 -u 127.0.0.1 8000 |od -Ax -c -t x1 |grep '000' && \
echo "Success" || echo "Failed"
```

> Note: You also can use `nc` or [server.go](https://github.com/ossrs/srs/pull/3837) as the UDP server for test.
If use SRS as WHIP server, should response with:

```
0000000 001 001 \0 @ ! 022 244 B t y m z A Q + /
0000010 J K w R \0 006 \0 \r 6 p k 1 1 3 8 6
0000020 : J 8 X 7 \0 \0 \0 \0 \0 \b \0 001 376 `
0000030 ầ ** ** 027 \0 \b \0 024 206 263 + ʼn ** 025 G 215
0000040 I 335 P ^ " 7 } N ? 017 037 224 200 ( \0 004
0000050 303 < 250 272
0000054
Success
```

> Note: Should be SRS 5.0.191+, see [#3837](https://github.com/ossrs/srs/pull/3837), you can also use
> [server.go](https://github.com/ossrs/srs/issues/2843) as the UDP server for test.
## RTMP to RTC

Expand Down
59 changes: 58 additions & 1 deletion i18n/zh-cn/docusaurus-plugin-content-docs/current/doc/webrtc.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,64 @@ ffmpeg -re -i ./doc/source.flv -c copy -f flv rtmp://localhost/live/livestream
## HTTP API

关于SRS的WebRTC API,请参考[publish](./http-api.md#webrtc-publish)[play](./http-api.md#webrtc-play).
SRS支持WHIP和WHEP协议。

* WHIP: [http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream](http://localhost:8080/players/whip.html)
* WHEP: [http://localhost:1985/rtc/v1/whep/?app=live&stream=livestream](http://localhost:8080/players/whep.html)

SRS也支持遗留的私有HTTP API,请参考[publish](./http-api.md#webrtc-publish)[play](./http-api.md#webrtc-play).

## Connection Failures

一些开发者来到 SRS 社区寻求帮助,因为他们在使用 OBS WHIP 连接到在线 WHIP 服务器时遇到了错误。这是因为在线服务器必须使用 HTTPS,
而且 UDP 端口可能更容易获得。此外,由于隐私或网络问题,很难调试或登录到在线服务器。

因此,我们找到了一些方法来解决 OBS WHIP 中的连接失败问题,通常是由于 HTTPS API 设置或 UDP 端口不可用问题导致的。

使用 curl 测试 WHIP HTTP 或 HTTPS API:

```bash
curl "http://localhost:1985/rtc/v1/whip/?ice-ufrag=6pk11386&ice-pwd=l91z529147ri9163933p51c4&app=live&stream=livestream-$(date +%s)" \
-H 'Origin: http://localhost' -H 'Referer: http://localhost' \
-H 'Accept: */*' -H 'Content-type: application/sdp' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)' \
--data-raw 'v=0\r\no=- 7788101884696796876 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:J8X7\r\na=ice-pwd:Dpq7/fW/osYcPeLsCW2Ek1JH\r\na=ice-options:trickle\r\na=fingerprint:sha-256 26:04:DF:BF:5E:87:1F:94:CF:5C:DE:99:B4:53:6D:2A:86:F3:A5:BF:22:E4:CF:17:8E:CE:2E:D1:98:88:64:97\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=sendonly\r\na=msid:- a2f262a8-4780-4694-919b-32bc07275224\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=ssrc:3184534672 cname:TPpRJpEeliM/kmO3\r\na=ssrc:3184534672 msid:- a2f262a8-4780-4694-919b-32bc07275224\r\nm=video 9 UDP/TLS/RTP/SAVPF 106\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:J8X7\r\na=ice-pwd:Dpq7/fW/osYcPeLsCW2Ek1JH\r\na=ice-options:trickle\r\na=fingerprint:sha-256 26:04:DF:BF:5E:87:1F:94:CF:5C:DE:99:B4:53:6D:2A:86:F3:A5:BF:22:E4:CF:17:8E:CE:2E:D1:98:88:64:97\r\na=setup:actpass\r\na=mid:1\r\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:13 urn:3gpp:video-orientation\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendonly\r\na=msid:- df032417-2927-420b-a5c4-0944a9c7df3d\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:106 H264/90000\r\na=rtcp-fb:106 goog-remb\r\na=rtcp-fb:106 transport-cc\r\na=rtcp-fb:106 ccm fir\r\na=rtcp-fb:106 nack\r\na=rtcp-fb:106 nack pli\r\na=fmtp:106 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=ssrc-group:FID 512761356 684544361\r\na=ssrc:512761356 cname:TPpRJpEeliM/kmO3\r\na=ssrc:512761356 msid:- df032417-2927-420b-a5c4-0944a9c7df3d\r\na=ssrc:684544361 cname:TPpRJpEeliM/kmO3\r\na=ssrc:684544361 msid:- df032417-2927-420b-a5c4-0944a9c7df3d\r\n' \
-v -k
```

> Note: 您可以将 `http://localhost` 替换为 `https://yourdomain.com` 以测试 HTTPS API。
答案包含候选项,即 UDP 服务器 IP,例如 `127.0.0.1`

```
a=candidate:0 1 udp 2130706431 127.0.0.1 8000 typ host generation 0
```

使用 `nc` 向 SRS WHIP 服务器发送 UDP 数据包:

```bash
echo -en "\x00\x01\x00\x50\x21\x12\xa4\x42\x74\x79\x6d\x7a\x41\x51\x2b\x2f\x4a\x4b\x77\x52\x00\x06\x00\x0d\x36\x70\x6b\x31\x31\x33\x38\x36\x3a\x4a\x38\x58\x37\x00\x00\x00\xc0\x57\x00\x04\x00\x01\x00\x0a\x80\x2a\x00\x08\xda\xad\x1d\xce\xe8\x95\x5a\x83\x00\x24\x00\x04\x6e\x7f\x1e\xff\x00\x08\x00\x14\x56\x8f\x1e\x1e\x4f\x5f\x17\xf9\x2e\xa1\xec\xbd\x51\xd9\xa2\x27\xe4\xfd\xda\xb1\x80\x28\x00\x04\x84\xd3\x5a\x79" \
|nc -w 3 -u 127.0.0.1 8000 |od -Ax -c -t x1 |grep '000' && \
echo "Success" || echo "Failed"
```

> Note: 您还可以使用 `nc`[server.go](https://github.com/ossrs/srs/pull/3837) 作为测试的 UDP 服务器。
如果使用 SRS 作为 WHIP 服务器,应该响应:

```
0000000 001 001 \0 @ ! 022 244 B t y m z A Q + /
0000010 J K w R \0 006 \0 \r 6 p k 1 1 3 8 6
0000020 : J 8 X 7 \0 \0 \0 \0 \0 \b \0 001 376 `
0000030 ầ ** ** 027 \0 \b \0 024 206 263 + ʼn ** 025 G 215
0000040 I 335 P ^ " 7 } N ? 017 037 224 200 ( \0 004
0000050 303 < 250 272
0000054
Success
```

> Note: 应为 SRS 5.0.191+,请参阅 [#3837](https://github.com/ossrs/srs/pull/3837),您还可以使用
> [server.go](https://github.com/ossrs/srs/issues/2843) 作为测试的 UDP 服务器。
## RTMP to RTC

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,64 @@ ffmpeg -re -i ./doc/source.flv -c copy -f flv rtmp://localhost/live/livestream
## HTTP API

关于SRS的WebRTC API,请参考[publish](./http-api.md#webrtc-publish)[play](./http-api.md#webrtc-play).
SRS支持WHIP和WHEP协议。

* WHIP: [http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream](http://localhost:8080/players/whip.html)
* WHEP: [http://localhost:1985/rtc/v1/whep/?app=live&stream=livestream](http://localhost:8080/players/whep.html)

SRS也支持遗留的私有HTTP API,请参考[publish](./http-api.md#webrtc-publish)[play](./http-api.md#webrtc-play).

## Connection Failures

一些开发者来到 SRS 社区寻求帮助,因为他们在使用 OBS WHIP 连接到在线 WHIP 服务器时遇到了错误。这是因为在线服务器必须使用 HTTPS,
而且 UDP 端口可能更容易获得。此外,由于隐私或网络问题,很难调试或登录到在线服务器。

因此,我们找到了一些方法来解决 OBS WHIP 中的连接失败问题,通常是由于 HTTPS API 设置或 UDP 端口不可用问题导致的。

使用 curl 测试 WHIP HTTP 或 HTTPS API:

```bash
curl "http://localhost:1985/rtc/v1/whip/?ice-ufrag=6pk11386&ice-pwd=l91z529147ri9163933p51c4&app=live&stream=livestream-$(date +%s)" \
-H 'Origin: http://localhost' -H 'Referer: http://localhost' \
-H 'Accept: */*' -H 'Content-type: application/sdp' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)' \
--data-raw 'v=0\r\no=- 7788101884696796876 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:J8X7\r\na=ice-pwd:Dpq7/fW/osYcPeLsCW2Ek1JH\r\na=ice-options:trickle\r\na=fingerprint:sha-256 26:04:DF:BF:5E:87:1F:94:CF:5C:DE:99:B4:53:6D:2A:86:F3:A5:BF:22:E4:CF:17:8E:CE:2E:D1:98:88:64:97\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=sendonly\r\na=msid:- a2f262a8-4780-4694-919b-32bc07275224\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=ssrc:3184534672 cname:TPpRJpEeliM/kmO3\r\na=ssrc:3184534672 msid:- a2f262a8-4780-4694-919b-32bc07275224\r\nm=video 9 UDP/TLS/RTP/SAVPF 106\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:J8X7\r\na=ice-pwd:Dpq7/fW/osYcPeLsCW2Ek1JH\r\na=ice-options:trickle\r\na=fingerprint:sha-256 26:04:DF:BF:5E:87:1F:94:CF:5C:DE:99:B4:53:6D:2A:86:F3:A5:BF:22:E4:CF:17:8E:CE:2E:D1:98:88:64:97\r\na=setup:actpass\r\na=mid:1\r\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:13 urn:3gpp:video-orientation\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendonly\r\na=msid:- df032417-2927-420b-a5c4-0944a9c7df3d\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:106 H264/90000\r\na=rtcp-fb:106 goog-remb\r\na=rtcp-fb:106 transport-cc\r\na=rtcp-fb:106 ccm fir\r\na=rtcp-fb:106 nack\r\na=rtcp-fb:106 nack pli\r\na=fmtp:106 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=ssrc-group:FID 512761356 684544361\r\na=ssrc:512761356 cname:TPpRJpEeliM/kmO3\r\na=ssrc:512761356 msid:- df032417-2927-420b-a5c4-0944a9c7df3d\r\na=ssrc:684544361 cname:TPpRJpEeliM/kmO3\r\na=ssrc:684544361 msid:- df032417-2927-420b-a5c4-0944a9c7df3d\r\n' \
-v -k
```

> Note: 您可以将 `http://localhost` 替换为 `https://yourdomain.com` 以测试 HTTPS API。
答案包含候选项,即 UDP 服务器 IP,例如 `127.0.0.1`

```
a=candidate:0 1 udp 2130706431 127.0.0.1 8000 typ host generation 0
```

使用 `nc` 向 SRS WHIP 服务器发送 UDP 数据包:

```bash
echo -en "\x00\x01\x00\x50\x21\x12\xa4\x42\x74\x79\x6d\x7a\x41\x51\x2b\x2f\x4a\x4b\x77\x52\x00\x06\x00\x0d\x36\x70\x6b\x31\x31\x33\x38\x36\x3a\x4a\x38\x58\x37\x00\x00\x00\xc0\x57\x00\x04\x00\x01\x00\x0a\x80\x2a\x00\x08\xda\xad\x1d\xce\xe8\x95\x5a\x83\x00\x24\x00\x04\x6e\x7f\x1e\xff\x00\x08\x00\x14\x56\x8f\x1e\x1e\x4f\x5f\x17\xf9\x2e\xa1\xec\xbd\x51\xd9\xa2\x27\xe4\xfd\xda\xb1\x80\x28\x00\x04\x84\xd3\x5a\x79" \
|nc -w 3 -u 127.0.0.1 8000 |od -Ax -c -t x1 |grep '000' && \
echo "Success" || echo "Failed"
```

> Note: 您还可以使用 `nc`[server.go](https://github.com/ossrs/srs/pull/3837) 作为测试的 UDP 服务器。
如果使用 SRS 作为 WHIP 服务器,应该响应:

```
0000000 001 001 \0 @ ! 022 244 B t y m z A Q + /
0000010 J K w R \0 006 \0 \r 6 p k 1 1 3 8 6
0000020 : J 8 X 7 \0 \0 \0 \0 \0 \b \0 001 376 `
0000030 ầ ** ** 027 \0 \b \0 024 206 263 + ʼn ** 025 G 215
0000040 I 335 P ^ " 7 } N ? 017 037 224 200 ( \0 004
0000050 303 < 250 272
0000054
Success
```

> Note: 应为 SRS 5.0.191+,请参阅 [#3837](https://github.com/ossrs/srs/pull/3837),您还可以使用
> [server.go](https://github.com/ossrs/srs/issues/2843) 作为测试的 UDP 服务器。
## RTMP to RTC

Expand Down
Loading

0 comments on commit ec70b20

Please sign in to comment.