Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Sep 5, 2024
1 parent e5db2a2 commit f7a7547
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ curl -X POST http://127.0.0.1:12025/api/v1/srs/register \
"http": ["8082"],
"api": ["19853"],
"srt": ["10082"],
"rtc": ["8001"]
"rtc": ["udp://0.0.0.0:8001"]
}'
#{"code":0,"pid":"53783"}
```
Expand All @@ -405,6 +405,13 @@ curl -X POST http://127.0.0.1:12025/api/v1/srs/register \
* `rtc`: Optional, the WebRTC listen endpoints of backend server. Proxy server will connect backend server via this port for WebRTC protocol.
* `device_id`: Optional, the device id of backend server. Used as a label for the backend server.

The listen endpoint format is `port`, or `protocol://ip:port`, or `protocol://:port`, for example:

* `1935`: Listen on port 1935 and any IP for RTMP protocol.
* `tcp://:1935`: Listen on port 1935 and any IP for RTMP protocol.
* `tcp://0.0.0.0:1935`: Listen on port 1935 and any IP for RTMP protocol.
* `tcp://192.168.3.10:1935`: Listen on port 1935 and specified IP for RTMP protocol.

You can also use SRS 5.0+ as backend server, which supports `heartbeat` feature to register itself
to proxy server.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ curl -X POST http://127.0.0.1:12025/api/v1/srs/register \
"http": ["8082"],
"api": ["19853"],
"srt": ["10082"],
"rtc": ["8001"]
"rtc": ["udp://0.0.0.0:8001"]
}'
#{"code":0,"pid":"53783"}
```
Expand All @@ -371,6 +371,13 @@ curl -X POST http://127.0.0.1:12025/api/v1/srs/register \
* `rtc`: 可选,后端服务器的 WebRTC 监听端点。proxy server将通过此端口连接后端服务器以使用 WebRTC 协议。
* `device_id`: 可选,后端服务器的设备 ID。用作后端服务器的标签。

监听端点的格式可以是 `port`,或者 `protocol://ip:port`,或者 `protocol://:port`,例如:

* `1935`: 监听 RTMP 协议的 1935 端口,适用于任何 IP。
* `tcp://:1935`: 监听 RTMP 协议的 1935 端口,适用于任何 IP。
* `tcp://0.0.0.0:1935`: 监听 RTMP 协议的 1935 端口,适用于任何 IP。
* `tcp://192.168.3.10:1935`: 监听 RTMP 协议的 1935 端口,适用于指定的 IP。

您还可以使用 SRS 5.0+ 作为后端服务器,它支持 `heartbeat` 功能,可以自动注册到proxy server。

此外,您可以编写一个 curl 脚本来注册后端服务器,或者使用一个专门的后端服务器管理服务。例如,如果您不想修改 nginx-rtmp 代码,
Expand Down

0 comments on commit f7a7547

Please sign in to comment.