rvi / ONVIFCamera

Pod and example on how to connect to an ONVIF camera
MIT License
88 stars 18 forks source link

Cannot getprofiles when connecting to hikvision #4

Closed chishi2612 closed 6 years ago

chishi2612 commented 6 years ago

I try to connect to Hikvision Camera. I get this problem:

Can't connect to the camera for an unknow reason. Status code: 500 SOAP REQUEST: Optional("http://www.onvif.org/ver20/media/wsdl/GetProfiles") response: Optional([AnyHashable("Body"): { Fault = { Code = { Subcode = { Subcode = { Value = { attributes = { }; value = "ter:InvalidOperation"; }; attributes = { }; }; Value = { attributes = { }; value = "ter:ActionNotSupported"; }; attributes = { }; }; Value = { attributes = { }; value = "env:Receiver"; }; attributes = { }; }; Reason = { Text = { attributes = { lang = en; }; value = "Optional Action Not Implemented"; }; attributes = { }; }; attributes = { }; }; attributes = { }; }])

Plz help me. Thanks

chishi2612 commented 6 years ago

It fixed. I changed "http://www.onvif.org/ver20/media/wsdl" --> "http://www.onvif.org/ver10/media/wsdl".

fukemy commented 6 years ago

hello. i can not get streamUri, can u help? i got 3 profiles, but none of these can used to get streamUri:

[ONVIFCamera.ONVIFCamera.Profile(name: "MediaProfile_Channel1_MainStream", token: "MediaProfile000"), ONVIFCamera.ONVIFCamera.Profile(name: "MediaProfile_Channel1_SubStream1", token: "MediaProfile001"), ONVIFCamera.ONVIFCamera.Profile(name: "mcMediaProfile", token: "mcMediaProfile")]