Set preview quality
1. API Description
This API is used to set the encoding parameters for preview.
Request mode:
- V2.6.0 and above: POST [ip]/mwapi/V2.0/app/set-encoder-format
- V2.5.0 and below: POST [ip]/mwapi/set-encoder-format
Administrator Rights | Logged-in |
---|---|
No | Yes |
2. Input Parameters
Name | Required | Type | Description |
---|---|---|---|
encodeMode | Yes | Int | The preview quality of scenes on the App. 0: 720p; 1: 1080p; 2: Auto; 3: Customize |
resolution | No | String | The resolution, effective only when encodeMode is 3 |
duration | No | Int | The frame interval * 1000, in ms, effective only when encodeMode is 3 |
video-bitrate | No | Int | The video bitrate, effective only when encodeMode is 3 |
3. Output Parameters
Name | Type | Description |
---|---|---|
status | Int | Status code |
message | String | Status description |
4. Example
Setting the preview quality to Customize.
Input Example
{
"encodeMode":3,
"resolution":"1920x1080",
"duration":333333,
"video-bitrate":2048
}
Output Example
{
"message": "success",
"status": 0
}
5. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Status | Definition | Description |
---|---|---|
49 | MW_STATUS_INVALID_DATA | The parameters are missing or incorrect |