MV snapshot API not consistent

webfrank
Getting noticed

MV snapshot API not consistent

Hi, I'm working with MV snapshot API but I got non consistent picture.

 

If I try to get a snapshot on the past using this url:

 

{{baseUrl}}/networks/{{networkId}}/cameras/{{serial}}/snapshot (with proper values set)

 

and with this body (an example)

 

{
"timestamp": "2019-03-13T12:01:58+00:00"
}
 
I got a snapshot with non person inside, but if I view the video at the same time point I have a person. I have no way to identify the real timespan of the snapshot as this would require to have a timestamp overlay on the picture (which id desirable) or the cam looking at a precise clock to compare time differences.
 
I suspect the snapshot takes the nearest keyframe from the video which is not always the required timestamp.
10 REPLIES 10
chengineer
Meraki Alumni (Retired)
Meraki Alumni (Retired)

Hi webfrank, this issue should be fixed. Are you still seeing snapshots returning a different photo/frame when passing in a historical timestamp, from what you see in dashboard?

Solutions Architect @ Cisco Meraki | API & Developer Ecosystem

Hi, with latest firmware, 3.28, I can retrieve the correct snapshot. I cannot get it immediately but I should wait about 3 minutes before calling the api otherwise I got error. 

chengineer
Meraki Alumni (Retired)
Meraki Alumni (Retired)

I'm testing on 3.29, and the wait time goes down to about 30 seconds. If you need something faster than that, then make the API call without passing in the historical timestamp parameter.

Solutions Architect @ Cisco Meraki | API & Developer Ecosystem

Hello @chengineer do i need to enable something to be able to call the snapshot API? I only get 404

chengineer
Meraki Alumni (Retired)
Meraki Alumni (Retired)

Hi @Rafaetero, make sure your API key has write access (since it's a POST call), and also in the headers, only pass in the "X-Cisco-Meraki-API-Key" key/value, and not "Content-Type": "application/json" (since there's a bug if you do).

Solutions Architect @ Cisco Meraki | API & Developer Ecosystem

Sorry @chengineer  but what i am saying is that when the API returns the snapshot URL I can not fetch that image. I can only access to it via a browser. I can not make a http get request to the image url and get it back, do you have any example of that? 

 

 

Fetching any image on the internet works with my code, but the Snapshot URL only returns HTML, not an image

 I don't know why, it started working. Now it returns the image and not the HTML anymore

Found the problem, i can only get the image through code after i visited it through the browser...

Nop! I got some support, it happens that the image takes 5 seconds to be generated

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.