quatanium / python-onvif

ONVIF Client Implementation in Python
MIT License
474 stars 321 forks source link

onvif.exceptions.ONVIFError: the parameter value is illegal #54

Open zkf-qwj opened 7 years ago

zkf-qwj commented 7 years ago

为什么我获取媒体流url的时候出现这个错误,请问GetStreamUri的参数是什么格式的? 下面是我的源代码: from onvif import ONVIFService

device_service = ONVIFService('http://192.168.1.64/onvif/device_service','admin', '@vsea.tv','/etc/onvif/wsdl/devicemgmt.wsdl') ret=device_service.GetServiceCapabilities() print ret

device_service = ONVIFService('http://192.168.1.64/onvif/Media','admin', '@vsea.tv','/etc/onvif/wsdl/media.wsdl') profiles=device_service.GetProfiles() for profile in profiles: print profile._token,profile.Name param={"StreamSetup":profile.Name,"ProfileToken":profile._token} MediaUri=device_service.GetStreamUri(param) print MediaUri.Uri

zkf-qwj commented 7 years ago

`from onvif import ONVIFService

device_service = ONVIFService('http://192.168.1.64/onvif/device_service','admin', '@vsea.tv','/etc/onvif/wsdl/devicemgmt.wsdl') ret=device_service.GetServiceCapabilities() print ret

device_service = ONVIFService('http://192.168.1.64/onvif/Media','admin', '@vsea.tv','/etc/onvif/wsdl/media.wsdl') profiles=device_service.GetProfiles() for profile in profiles: print profile._token,profile.Name param={"StreamSetup":profile.Name,"ProfileToken":profile._token} MediaUri=device_service.GetStreamUri(param) print MediaUri.Uri `