I am capturing images from hikvision camera using this client.
For of most of the camera's I am able to capture the image but however for couple of camera it's failing.
It is giving below error.
Here is code
`
def camera_capture_cred(camera_ip,username,password,name,capturepath):
try:
cam = Client('http://'+camera_ip, username, password, timeout=10)
Get and save picture from camera
response = cam.Streaming.channels[102].picture(method='get', type='opaque_data')
path = os.path.join(capturepath, name).replace('\\', '/')
print(path)
with open(path, 'wb') as f:
for chunk in response.iter_content(chunk_size=1024):
if chunk:
f.write(chunk)
return path
except Exception as ex:
return "-1"
`
It would be great if someone can provide me insights about this issue.
Hello,
I am capturing images from hikvision camera using this client. For of most of the camera's I am able to capture the image but however for couple of camera it's failing. It is giving below error.
Here is code ` def camera_capture_cred(camera_ip,username,password,name,capturepath): try: cam = Client('http://'+camera_ip, username, password, timeout=10)
Get and save picture from camera
`
It would be great if someone can provide me insights about this issue.