我的 PTZ 摄像机自动对焦并调整平移倾斜变焦和某些物体上出现在摄像机中的图像。我想禁用这些功能。
我正在使用 python-onvif-zeep 库https://github.com/FalkTannhaeuser/python-onvif-zeep.git
onvif 的操作指南在这里 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.Fault:请求的设置不正确”谢谢大家!