set-video-config 接口
修改视频配置信息。
请求方式
GET http://ip/mwapi?method=set-video-config¶m1=value1¶m2=value2...
返回数据
{
"status": 0
}
| 属性 |
说明 |
| status |
返回状态。0:设置成功,返回其它值请参考 API 状态码。 |
接口示例
1. 输入色彩空间设置
http://ip/mwapi?method=set-video-config&in-auto-color-fmt=false&in-color-fmt=rgb
| 参数 |
说明 |
| method |
方法名称:set-video-config |
| in-auto-color-fmt |
输入色彩空间是否自动获取,修改时值必须为 false。 |
| in-color-fmt |
输入色彩空间值,有效值:rgb、bt.601、bt.709、bt.2020。 |
2. 输入量化范围设置
http://ip/mwapi?method=set-video-config&in-auto-quant-range=false&in-quant-range=limited
| 参数 |
说明 |
| method |
方法名称:set-video-config |
| in-auto-quant-range |
输入量化范围是否自动获取,修改时值必须为 false。 |
| in-quant-range |
输入量化范围值,有效值:full、limited。 |
3. 色彩处理设置
http://ip/mwapi?method=set-video-config&brightness=0&contrast=0&hue=0&saturation=0
| 参数 |
说明 |
| method |
方法名称:set-video-config |
| brightness |
亮度,整数,取值范围:-100 ~ +100。 |
| contrast |
对比度,整数,取值范围:50 ~ 200。 |
| hue |
色调,整数,取值范围:-90 ~ 90。 |
| saturation |
饱和度,整数,取值范围:0 ~ 200。 |
4. 去隔行设置
http://ip/mwapi?method=set-video-config&deinterlace=wave
| 参数 |
说明 |
| method |
方法名称:set-video-config |
| deinterlace |
去隔行,有效值:none、top-field、bottom-field。 |
4. 特殊效果设置
http://ip/mwapi?method=set-video-config&out-mirror=false
| 参数 |
说明 |
| method |
方法名称:set-video-config |
| out-mirror |
镜像,有效值:true、false。 |
5. 输出分辨率设置
http://ip/mwapi?method=set-video-config&out-raw-resolution=false&out-cx=1280&out-cy=720
| 参数 |
说明 |
| method |
方法名称:set-video-config |
| out-raw-resolution |
输出分辨率是否与输入一致,修改时值必须为 false。 |
| out-cx |
输出分辨率宽度像素值,整数且为 4 的整数倍。 |
| out-cy |
输出分辨率高度像素值,整数且为 2 的整数倍。 |
5. 输出帧率设置
http://ip/mwapi?method=set-video-config&out-fr-convertion=frame-rate-raw
| 参数 |
说明 |
| method |
方法名称:set-video-config |
| out-fr-convertion |
输出帧率,有效值:raw、half、one-third、quarter。 |
6. 输出宽高比设置
http://ip/mwapi?method=set-video-config&out-auto-aspect=false&out-aspect-x=16&out-aspect-y=9
| 参数 |
说明 |
| method |
方法名称:set-video-config |
| out-auto-aspect |
输出宽高比是否与输入一致,修改时值必须为 false。 |
| out-aspect-x |
输出宽高比,宽度值。 |
| out-aspect-y |
输出宽高比,高度值。 |
7. 位率控制
http://ip/mwapi?method=set-video-config&bit-rate-ratio=150
| 参数 |
说明 |
| method |
方法名称:set-video-config |
| bit-rate-ratio |
位率大小,取值范围:50 ~ 200,默认值 100。 |
8. 其它输出信息设置
http://ip/mwapi?method=set-video-config&out-auto-color-fmt=false&out-color-fmt=rgb&out-auto-sat-range=false&out-sat-range=limited&out-auto-quant-range=false&out-quant-range=limited&low-res-full-fr=true&
| 参数 |
说明 |
| method |
方法名称:set-video-config |
| out-auto-color-fmt |
输出色彩空间是否自动获取,修改时值必须为 false。 |
| out-color-fmt |
输出色彩空间值,有效值:bt.601、bt.709、bt.2020。 |
| out-auto-sat-range |
输出饱和度是否自动获取,修改时值必须为 false。 |
| out-sat-range |
输出饱和度值,有效值:full、limited、extended。 |
| out-auto-quant-range |
输出量化范围是否自动获取,修改时值必须为 false。 |
| out-quant-range |
输出量化范围值,有效值:full、limited。 |
| low-res-full-fr |
是否启用低带宽全帧率模式,有效值:true/false。 |