add-channel
Use the interface to add sources to preset list. Supported protocols are ntkndi, rtsp, http, rtmp, udp, srt, and rtp.
HTTP Request
GET http://ip/mwapi?method=add-channel&name=xxx&url=xxx
Parameter |
Description |
method |
add-channel |
name |
Indicates the source name which should be identical. The source name ranges from 1 to 120 english characters. |
url |
Indicates the source URL. |
Parameters of URL vary for different protocols. For details, refer to the following description.
1. NTKNDI
ntkndi://ndi?name=test&url=192.168.1.90%3A5963&mw-buffer-duration=60
URL components |
Description |
ntkndi |
Indicates the NDI protocol developed by NewTek. |
ndi |
Indicates the default host name and it cannot be modified. |
name |
Indicates the NDI stream name. |
url |
Indicates the NDI URL. |
mw-buffer-duration |
Indicates the NDI buffer duration in ms. You can get the value range using get-buffer-limit. |
2. RTSP
rtsp://192.168.1.58:899?mw-buffer-duration=60
URL components |
Description |
rtsp://192.168.1.58:899 |
Indicates a valid RTSP URL. |
mw-buffer-duration |
Indicates the RTSP buffer duration in ms. You can get the value range using get-buffer-limit. |
3. HTTP
http://192.168.1.88:8585?mw-buffer-duration=60
URL components |
Description |
http://192.168.1.88:8585 |
Indicates a valid HTTP URL. |
mw-buffer-duration |
Indicates the HTTP buffer duration in ms. You can get the value range using get-buffer-limit. |
4. RTMP
// RTMP Pull
rtmp://url/stream-key?mw-buffer-duration=60
// RTMP Push
rtmp://127.0.0.1/live/stream-key?mw-buffer-duration=80
URL components |
Description |
url |
RTMP Pull: Indicates a RTMP URL. RTMP Push: rtmp://127.0.0.1/live/. |
stream-key |
Indicates the stream key which follows URL. Slashes (/) is not supported. |
mw-buffer-duration |
Indicates the RTMP buffer duration in ms. You can get the value range using get-buffer-limit. |
5. MPEG-TS over UDP
// Multicast
udp://ip:port?mw-audio-track=1&mw-buffer-duration=80
// Unicast
udp://0.0.0.0:port?mw-audio-track=1&mw-buffer-duration=80
URL components |
Description |
ip |
Unicast IP address: 0.0.0.0 The range of multicast IP address is from 224.0.0.0 to 239.255.255.255. |
port |
Indicates the port number which ranges from 1 to 65535. |
mw-audio-track |
Audio track, ranges from 1 to 8 |
mw-buffer-duration |
Indicates the UDP buffer duration in ms. You can get the value range using get-buffer-limit. |
6. MPEG-TS over SRT
// Caller
srt://ip:port?mode=caller&latency=125&passphrase=1234567890&streamid=test&mw-audio-track=1&mw-buffer-duration=80
// Listener
srt://0.0.0.0:port?mode=listener&latency=125&streamid=test&mw-audio-track=1&mw-buffer-duration=80
URL components |
Description |
ip |
Listener: 0.0.0.0 caller: a valid IP address. 0.0.0.0 is excluded. |
port |
Indicates the port number which ranges from 1 to 65535. |
mode |
Indicates the SRT modes including Caller and Listener. |
latency |
Indicates the latency time ranges from 20 to 8000 in ms. |
passphrase |
Indicates the encrypted password. It is optional unless the encryption is required. |
streamid |
Stream ID |
mw-audio-track |
Audio track, ranges from 1 to 8 |
mw-buffer-duration |
Indicates the SRT buffer duration in ms. You can get the value range using get-buffer-limit. |
7. MPEG-TS over RTP
// Multicast
rtp://ip:port?mw-ts-progid=100&mw-audio-track=1&mw-buffer-duration=80
// Unicast
rtp://0.0.0.0:port?mw-ts-progid=100&mw-audio-track=1&mw-buffer-duration=80
URL components |
Description |
ip |
Unicast IP address: 0.0.0.0 Multicast IP address: the IP address ranges from 224.0.0.0 to 239.255.255.255. |
port |
Indicates the port number which ranges from 1 to 65535. |
mw-ts-progid |
TS ProgID, ranges from 1 to 10000000 |
mw-audio-track |
Audio track, ranges from 1 to 8 |
mw-buffer-duration |
Indicates the RTP buffer duration in ms. You can get the value range using get-buffer-limit. |
8. TVU ISSP
issp://192.168.1.88?mw-buffer-duration=60
URL components |
Description |
issp://192.168.1.88 |
Indicates a valid HTTP URL. |
mw-buffer-duration |
Indicates the HTTP buffer duration in ms. You can get the value range using get-buffer-limit. |
Response Body
{
"status": 0
}
Name |
Description |
status |
0 indicates that the request was accepted successfully. Refer to API Status Codes to find specific description for other values. |