获取 Web Camera 设置信息

1.接口描述

接口说明:获取 Web Camera 视频源设置信息。

请求方式:

  • 固件版本 V2.6.0 及以上:POST [ip]/mwapi/V2.0/input/get-webcam-config
  • 固件版本 V2.5.0 及以下:POST [ip]/mwapi/get-webcam-config
管理员权限 登录认证

2.输入参数

3.输出参数

参数名称 类型 描述
status Int 状态码
device-name String 设备名称
device-path String 设备身份标识
cur-width Int 当前视频宽度
cur-height Int 当前视频高度
cur-fps Int 当前帧率
cur-fourcc String 当前规格
out-mirror Boolean 是否启用镜像特效
true:是;false:否
formats Array of FormatData 可用格式列表
FormatData
参数名称 类型 描述
fourcc String 规格
resolutions ResolutionData 分辨率参数信息
ResolutionData
参数名称 类型 描述
width Int 视频宽度,像素数
height Int 视频高度,像素数
fps Int 帧率(fps X 100)

4.示例

获取 Web Camera 视频源设置信息。

输入示例
None
输出示例
{
    "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.错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码

错误码 定义 说明
16 MW_STATUS_NOT_EXIST 无接入设备

与“”相关结果约

    找不到与“”相关的结果