MissiaL/hikvision-client

Download Images

Closed this issue · 11 comments

@MissiaL Is there a way to increase the resolution of the image? and also a way to declare the exact second to download the image? (I know that right now you run the code and it downloads the live-view image at 704x576, I could use a 1920x1800 image, live-view, or (better) an expecific time-selected image )

Thanks in advance for any help.

I've tested this in different cameras, and I can relate this:

if the DVR/NVR if configured to high resolution, the camera will download a 704x576 jpg image. In the other hand, if the net device is configured to a resolution lower than 704x576, then the downloaded image will have that lower resolution.

example:
dvr1 saves images at 1920x1800, downloaded image's size will be: 704x576
dvr2 saves images at 640x480, downloaded image's size will be: 640x480

In conclusion, maybe there is a parameter which is reducing the resolution of the image.

Resolution is depends on resolution what is setup-ed on camera.

On 16 May 2021, at 19:38, Emmanuel Morán Barreiro @.***> wrote: @MissiaL https://github.com/MissiaL Is there a way to increase the resolution of the image? and also a way to declare the exact second to download the image? (I know that right now you run the code and it downloads the live-view image at 704x576, I could use a 1920x1800 image, live-view, or (better) an expecific time-selected image ) Thanks in advance for any help. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#25>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFN4VR7P3XNA37FL6KQS23TN77HVANCNFSM447A4XEA.

@fnando1995 Did you find a way to do that? I'm currently stucked and probably my issue won't be resolved cause the creator doesn't have a HIKVision camera anymore

@AndrewMarines Saddly no. If you get the problem solved, please let me know.

@AndrewMarines Saddly no. If you get the problem solved, please let me know.

Even if it's bad, we just need to understand where to append ?videoResolutionWidth=1920&videoResolutionHeight=1080 to the url. This fixes the problem but idk where to append it in this code

@AndrewMarines I make this repo for wrapping the SDK. This works on normal PCs (x64 machines), but for others you should rebuild the sdk, and in cases like arm, there ir no way to rebuild.

Hi! I'm trying to help you
Try adding a field to your request

params={'videoResolutionWidth':'1920', 'videoResolutionHeight':'1080'}

For example

response = client.Streaming.channels[102].picture(method='get', type='opaque_data', params={'videoResolutionWidth':'1920', 'videoResolutionHeight':'1080'})

I'm not sure but maybe this should work

@fnando1995 could you try please? I gotta wait at least a week to see if this works fine while standing next to the customer

@AndrewMarines Just did, and worked. Thanks @MissiaL . I must say I would appreciated it more one year ago XD

Love you guys! Have a good day

The solution lies in the number of the stream which you want to use for the snapshot...

100 gives me 3840x2160 | 101 gives 3840x2160 | 102 gives 1280x720

response = cam1.Streaming.channels[100].picture(method='get', type='opaque_data')