add-rtmp

Use the interface to add RTMP stream servers.

Request Mode

 POST http://ip/mwapi/add-rtmp
{
    "type":1,
    "name":"rtmp",
    "url":"10.10.7.10/live/",
    "streamKey":"yxy",
    "authentication":false,
    "userName":"userName",
    "password":"password",
    "autoSwitch":false,
    "encoder":{
        "codeType":0,
        "encodingMode":1,
        "videoBitrate":2048,
        "keyframeInterval":2,
        "duration":166666,
        "resolution":"1920x1080",
        "audioBitrate":128,
        "profile":0
    }
}
Parameter Description
type The server type. 1: RTMP
name The server name
url The URL of streaming destination
streamKey The stream key
autoSwitch Whether auto stream is enabled, if yes, it supports start streaming by press the specified button. True: yes, False: no.
authentication Whether authentication is required. True: yes, False: no.
userName The username, only taking effect when authentication is required.
password The password, only taking effect when authentication is required.
encoder The parameters of encoder
Name Description
resolution The video resolution, 1920x1080:1080p 1280x720:720p
duration The framerate, 166666:60 FPS 333333:30 FPS
videoBitrate The video bitrate, in Kbps
audioBitrate The audio bitrate.
48: 48Khz,aac,48bps
64: 48Khz,aac,64bps
96: 48Khz,aac,96bps
128: 48Khz,aac,128bps
192: 48Khz,aac,192bps
256: 48Khz,aac,256bps
codeType The encoding type. 0: H.264
encodingMode The encoding mode. 0: VBR, 1: CBR
keyframeInterval The keyframe interval, in seconds
profile The encoding profile. 0: Baseline, 1: Main Profile, 2: High Profile

Response Body

JSON structure is as follows:

{
  "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.

results matching ""

    No results matching ""