使用PythonNonIfzeep禁用IP PTZ摄像机自动对焦

2024-09-29 07:26:16 发布

您现在位置:Python中文网/ 问答频道 /正文

我的云台相机自动对焦和调整云台变焦和一些物体出现在相机。 我想禁用这些功能。在

我使用的是python onvif zeep库https://github.com/FalkTannhaeuser/python-onvif-zeep.git

操作指南在这里 https://www.onvif.org/onvif/ver20/util/operationIndex.html

我想发送请求的具体函数是SetImagingSettings https://www.onvif.org/onvif/ver20/imaging/wsdl/imaging.wsdl#op.SetImagingSettings

我尝试创建如下请求

request = controller.imaging.create_type('SetImagingSettings')
video_sources = controller.media.GetVideoSources() # get video source to fetch token

request.VideoSourceToken = video_sources[0].token
request.ImagingSettings = {
    'Brightness': 200,
    'Focus': {
        'AutoFocusMode': 'MANUAL'
    }
}

controller.imaging.SetImagingSettings(request)

没有“焦点”部分,代码可以很好地更新亮度值。在

我的期望是:图像设置更新,禁用自动对焦。在

但我得到一个普遍的错误说zeep.exceptions.故障:请求的设置不正确“ 谢谢大家!在


Tags: httpsorgtokenrequestwwwvideowsdl物体