add-server
Use the interface to add streaming servers, 16 servers are supported at most.
Different servers with same configurations are not allowed, such as:
- Custom RTMP servers with the same URL and StreamKey
- Other RTMP servers(Twitch/YouTube/Facebook) with the same StreamKey
- RTSP streams with the same port number
HTTP Request
GET http://ip/usapi?method=add-server&type=xxx&url=xxx&key=xxx&...
Parameter | Description |
---|---|
method | add-server |
type | Indicates server type. 0: RTMP 1: Twitch 2: YouTube 3: Facebook 100: RTSP |
name | Indicates server name, the characters contain 1. 1 to 32 characters 2. A to Z, a to z, 0 to 9, spaces ._-+'[](), and cannot start or end with space. |
RTMP streaming settings | |
url | Indicates streaming server address. |
key | Indicates stream key. |
is-auth | Indicates authentication status. 0: authentication is not needed 1: authentication is needed. Username and password are required. |
user | Indicates user name. |
passwd | Indicates password. |
token | Indicates Token. |
event-data | Indicates streaming event. |
net-mode | Indicates the network priority. 0: Mobile broadband first 1: wired Ethernet first 2: Wi-Fi first |
RTSP streaming settings | |
port | Indicates port number, the default value is 554. |
is-main | Indicates whether to enable the main code stream. 0 indicates to disable the main stream. 1 indicates to enable the main stream. |
main-stream-name | Indicates the main code stream name, ranging from 1 to 32 characters, including A to Z, a to z, 0 to 9, spaces, and special characters ._-+'[](). The name should not start or end withe spaces. |
is-sub | Indicates whether to enable the sub code stream. 0 indicates to disable the sub stream. 1 indicates to enable the sub stream. |
sub-stream-name | Indicates the sub code stream name, ranging from 1 to 32 characters, including A to Z, a to z, 0 to 9, spaces, and special characters ._-+'[](). The name should not start or end withe spaces. |
is-audio | Indicates whether to enable audio. 0 indicates to disable audio. 1 indicates to enable audio. |
Response Body
{
"result": 0
}
Item | Description |
---|---|
result | 0 indicates that the request was accepted successfully. Refer to API Status Codes to find specific description for other values. |