Get configuration of Web Camera
1. API Description
This API is used to get the configuration information of the Web Camera video source.
Request mode:
- V2.6.0 and above: POST [ip]/mwapi/V2.0/input/get-webcam-config
- V2.5.0 and below: POST [ip]/mwapi/get-webcam-config
Administrator Rights | Logged-in |
---|---|
No | Yes |
2. Input Parameters
None
3. Output Parameters
Name | Type | Description |
---|---|---|
status | Int | Status code |
device-name | String | Device name |
device-path | String | Device identifier |
cur-width | Int | Current video width |
cur-height | Int | Current video height |
cur-fps | Int | Current frame rate |
cur-fourcc | String | Current format |
out-mirror | Boolean | Whether mirror effect is enabled true: Yes; false: No |
formats | Array of FormatData | List of available formats |
FormatData
Name | Type | Description |
---|---|---|
fourcc | String | Format |
resolutions | ResolutionData | Resolution parameters |
ResolutionData
Name | Type | Description |
---|---|---|
width | Int | Video width, in px |
height | Int | Video height, in px |
fps | Int | Frame rate (fps X 100) |
4. Example
Getting the configuration information of the Web Camera video source.
Input Example
None
Output Example
{
"status": 0,
"device-name": "OBSBOT Tail Air: OBSBOT Tail Ai",
"device-path": "L2Rldi92aWRlbzI=",
"cur-width": 1280,
"cur-height": 720,
"cur-fps": 6000,
"cur-fourcc": "MJPG",
"out-mirror": false,
"formats": [
{
"fourcc": "MJPG",
"resolutions": [
{
"width": 1920,
"height": 1080,
"fps": 6000
},
{
"width": 1280,
"height": 720,
"fps": 6000
}
]
},
{
"fourcc": "YUYV",
"resolutions": [
{
"width": 640,
"height": 360,
"fps": 3000
},
{
"width": 640,
"height": 480,
"fps": 3000
}
]
},
{
"fourcc": "H264",
"resolutions": [
{
"width": 1920,
"height": 1080,
"fps": 6000
},
{
"width": 1280,
"height": 720,
"fps": 6000
}
]
}
]
}
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 |
---|---|---|
16 | MW_STATUS_NOT_EXIST | No device is connected |