Get streaming server list
1. API Description
This API is used to get the live streaming server list.
Request mode:
- V2.6.0 and above: POST [ip]/mwapi/V2.0/stream/get-default-stream-server-config
- V2.5.0 and below: POST [ip]/mwapi/get-default-stream-server-config
| Administrator Rights | Logged-in | 
|---|---|
| No | Yes | 
2. Input Parameters
None
3. Output Parameters
| Name | Type | Description | 
|---|---|---|
| result | Int | Status code | 
| message | String | Status description | 
| info | InfoData | Streaming server information | 
InfoData
| Name | Type | Description | 
|---|---|---|
| serverList | Array of ServerData | Array of streaming servers | 
| totalCount | Int | Total counts of streaming servers | 
ServerData
| Name | Type | Description | 
|---|---|---|
| authentication | Int | Whether authentication is required true: Yes; false: No | 
| autoSwitch | Int | Whether it is configured for automatic streaming, and can start live streaming by pressing a button true: Yes; false: No | 
| effective | Int | Whether it is a complete live streaming configuration true: Yes; false: No | 
| encoder | EncoderData | Encoding configuration parameters | 
| id | Int | Streaming server ID | 
| name | String | Streaming server name | 
| userName | String | Username, effective only when authentication is required | 
| password | String | Password, effective only when authentication is required | 
| streamKey | String | Streaming key | 
| url | String | Streaming address | 
| type | Int | Streaming type 1: RTMP | 
EncoderData
| Name | Required | Type | Description | 
|---|---|---|---|
| codeType | Yes | Int | Encoding type 0: H.264 | 
| encodingMode | Yes | Int | Bitrate mode 0: VBR; 1: CBR | 
| videoBitrate | Yes | Int | Video encoding bitrate, in Kbps | 
| profile | Yes | Int | Encoding profile 0: Baseline; 1: Main Profile; 2: High Profile | 
| audioBitrate | Yes | Int | Audio encoding parameters 48: 48Khz, aac, 48kbps 64: 48Khz, aac, 64kbps 96: 48Khz, aac, 96kbps 128: 48Khz, aac, 128kbps 192: 48Khz, aac, 192kbps 256: 48Khz, aac, 256kbps | 
| keyframeInterval | Yes | Int | Keyframe interval, in seconds | 
| duration | Yes | Int | Video frame rate 166666: 60 FPS; 333333: 30 FPS | 
| resolution | Yes | Int | Video resolution 1920x1080: 1080p; 1280x720: 720p | 
4. Example
Getting the live streaming server list.
Input Example
None
Output Example
{
    "info": {
        "serverList": [
            {
                "authentication": false,
                "autoSwitch": true,
                "effective": true,
                "encoder": {
                    "audioBitrate": 128,
                    "codeType": 0,
                    "duration": 166666,
                    "encodingMode": 1,
                    "keyframeInterval": 2,
                    "profile": 0,
                    "resolution": "1920x1080",
                    "videoBitrate": 2048
                },
                "id": 1001,
                "name": "11111",
                "password": "Admin",
                "streamKey": "Admin",
                "type": 1,
                "url": "10.10.10.12/live",
                "userName": ""
            }
        ],
        "totalCount": 1
    },
    "message": "success",
    "result": 0
}
5. Error Code
No error code related to the API business logic. For other error codes, see Common Error Codes.