set-server
Use the interface to modify stream server.
HTTP Request
GET http://ip/usapi?method=set-server&id=xxx&type=xxx&url=xxx&key=xxx&...
Parameter | Description |
---|---|
method | set-server |
type | Indicates server type. 0: RTMP 1: Twitch 2: YouTube 3: Facebook 100: RTSP |
name | Indicates server 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 with spaces. |
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, requiring users to filled with username and password. |
user | Indicates user name. |
passwd | Indicates password. |
token | Indicates Token. |
event-data | Indicates streaming event. |
net-mode | Indicates the network priority. 0: Mobile network first 1: wired Ethernet first 2: Wi-Fi first |
RTSP streaming settings | |
port | Indicates port number, the default port 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 with 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 with 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 | Returned status. 0 indicates that the request was accepted successfully. Refer to API Status Codes to find specific description for other values. |