MissiaL / hikvision-client

Client for Hikvision devices
MIT License
209 stars 43 forks source link

Picture time #35

Open filipaoliveirarente opened 1 year ago

filipaoliveirarente commented 1 year ago

Hello! I was wondering if it is possible to access the absolute timestamp of the pictures when they are captured. I've read the ISAPI protocol and it seems that this cannot be done, but after running some tests I found out that this information is present in the header of the channel, however it is not propagated to the header of the picture request. Example:

response = cam.Streaming.channels[102](method='get', type='opaque_data')
response.headers
{'Date': 'Wed, 16 Aug 2023 13:06:30 GMT', 'Server': 'webserver', 'X-Frame-Options': 'SAMEORIGIN', 'Cache-Control': 'no-cache', 'Content-Length': '1950', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=8, max=99', 'Content-Type': 'application/xml'}

response = cam.Streaming.channels[102].picture(method='get', type='opaque_data')
response.headers
{'Content-Type': 'image/jpeg; charset="UTF-8"', 'Connection': 'close', 'Content-Length': '198243'}

Do you have any solution for this? Thanks