Get default streaming configuration
1. API Description
This API is used to get the default live streaming configuration (the user has not yet configured the streaming server).
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 |
---|---|---|
status | Int | Status code |
message | String | Status description |
info | InfoData | Default streaming configuration |
InfoData
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 default live streaming configuration.
Input Example
None
Output Example
{
"info": {
"authentication": false,
"autoSwitch": false,
"effective": false,
"encoder": {
"audioBitrate": 128,
"codeType": 0,
"duration": 166666,
"encodingMode": 1,
"keyframeInterval": 2,
"profile": 0,
"resolution": "1920x1080",
"videoBitrate": 2048
},
"id": 0,
"name": "RTMP Server (2)",
"password": "",
"streamKey": "",
"type": 1,
"url": "",
"userName": ""
},
"message": "message",
"status": 0
}
5. Error Code
No error code related to the API business logic. For other error codes, see Common Error Codes.