add-server

Use this interface to add streaming sessions, up to 16 tasks are supported to be added.

Different sessions with same configurations are not allowed, such as:

  • Custom RTMP servers with the same URL and StreamKey
  • Other RTMP servers(such as Twitch/YouTube/Facebook) with the same StreamKey
  • RTSP sessions with the same port number
  • SRT Caller sessions with the same IP address and port
  • SRT Listenersessions with the same port
  • HLS sessions with the same main stream name or sub stream name
  • TS over UDP/RTP sessions with the same IP address and port

HTTP Request

GET http://ip/usapi?method=add-server&type=xxx&url=xxx&key=xxx&...
Parameter Description
method add-server
type Indicates a stream type.
0: RTMP
1: Twitch
2: YouTube
3: Facebook
100: RTSP
120: SRT Caller
121: SRT Listener
130: NDI HX
131: HLS
132: TS over UDP
133: TS over RTP
name Indicates a session name, ranging from 1 to 32 characters, consisting of A to Z, a to z, 0 to 9, spaces ._-+'[](), and cannot start or end with space.
RTMP streaming settings
stream-index Indicates the stream type.
0: main stream
1: sub stream
url Indicates streaming destination address.
key Indicates stream key.
is-auth Indicates authentication status.
0: authentication is not required
1: authentication is required. Both username and password are mandatory.
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: Ethernet first
2: Wi-Fi first
RTSP streaming settings
port Indicates port number, the default port is 554.
max-connection Indicates number of clients for each RTSP stream.
is-auth Indicates authentication status.
0: authentication is not required
1: authentication is required. Both username and password are mandatory.
user Indicates user name.
passwd Indicates password.
is-main Indicates whether to enable the main stream.
0: disable the main stream.
1: enable the main stream.
main-stream-name Indicates the main stream name, ranging from 1 to 32 characters, consisting of 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 stream.
0: disable the sub stream.
1: enable the sub stream.
sub-stream-name Indicates the sub stream name, ranging from 1 to 32 characters, consisting of 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: disable audio.
1: enable audio.
SRT Caller streaming settings
stream-index Indicates the stream type.
0: main stream
1: sub stream
url Indicates destination address.
port Indicates port number.
latency Indicates delay time. You can obtain its value range by using get-info.
bandwidth Indicates the portion of the total bandwidth of a stream required for the exchange of SRT control and recovered packets. You can obtain its value range by using get-info.
aes Indicates the stream encryption algorithm to ensure the data security.
0: no encryption
16: AES-128
24: AES-192
32: AES-256
ase-word Indicates passphrase.
stream-id Optional
mtu Maximum transport unit ranges from 232 to 1500.
conn-timeout Connect timeout in milliseconds.
retry-duration Waiting time for reconnection in milliseconds.
net-mode Indicates network priority.
0: mobile broadband first
1: Ethernet first
2: Wi-Fi first
SRT Listener streaming settings
stream-index Indicates the stream type.
0: main stream
1: sub stream
port Indicates service port number. The default port is 8000.
max-connection Indicates max client number.
latency Indicates delay time. You can obtain its value range by using get-info.
bandwidth the portion of the total bandwidth of a stream required for the exchange of SRT control and recovered packets. You can obtain its value range by using get-info.
aes Indicates the stream encryption algorithm to ensure the data security.
0: no encryption
16: AES-128
24: AES-192
32: AES-256
ase-word Indicates passphrase.
mtu Maximum transmission unit ranges from 232 to 1500.
NDI HX streaming settings
source-name By default, it is serial number.
group-name Indicates the Group name which the source belongs to. By default, it is public.
enable-discovery Whether to enable discovery server.
discovery-server Indicates the IP address of discovery server.
transport-mode The parameter is required when transporting via multicast. Obtain transport mode related parameters using get-info.
mcast-addr Multicast address
mcast-mask Multicast mask
mcast-ttl Time to live for multicast ranges from 1 to 255.
enable-fail-over Whether to enable fail over.
fail-over-ndi-name Indicates the backup NDI channel name.
fail-over-ip-addr Indicates the backup NDI channel IP address.
enable-web-control Whether to allow to open the Web UI by clicking the gear icon in the NDI Studio Monitor application.
HLS streaming settings
is-main Whether to push streams over main stream.
0: disable
1: enable
main-stream-name Indicates the main stream name, ranging from 1 to 32 characters, consisting of A to Z, a to z, 0 to 9, spaces, and special characters ._-+'[](). The name should not start or end with spaces.
is-sub Whether to push streams over sub stream
0: disable
1: enable
sub-stream-name Indicates the sub stream name, ranging from 1 to 32 characters, consisting of A to Z, a to z, 0 to 9, spaces, and special characters ._-+'[](). The name should not start or end withe spaces.
TS over UDP/RTP streaming settings
stream-index Indicates the stream type.
0: main stream
1: sub stream
url Indicates the destination address.
port Indicates the stream port
net-mode Indicates the network priority.
0: Mobile broadband first
1: Ethernet first
2: Wi-Fi first

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.

results matching ""

    No results matching ""

    results matching ""

      No results matching ""