API endpoint for snapshot rounding the timestamp?

Solved
theshmike
Getting noticed

API endpoint for snapshot rounding the timestamp?

Can anyone confirm, that the snapshot endpoint of the dashboard api does NOT return the camera snapshot of the exact given timestamp? To me, it seems that the camera is rounding off/up the millis of the given timestamp to the nearest full second.

 

When I export a single video frame at the exact given timestamp from the camera footage with ffmpeg, it's almost always slightly different from what the api returns for the same timestamp. When export the video frame at the timestamp rounded, its exactly the same as what the api returns.

 

I just wondered about this behavior. I am working on a project to further process objects detected by the camera. I just noticed, that the rectangle data of the MQTT data is only correct when you export the exact frame from the video footage.

 

 

1 Accepted Solution
DensyoV
Meraki Employee
Meraki Employee

Hi,

Looking at the help > API docs on my Dashboard, there is a sample response shown for generating a snapshot and the time format (ISO 8601) is not considering the milliseconds so it appears to be rounded off.

 

api snapshot.JPG

 

hope this helps.

Please hit kudos if you found this post helpful and/or click "accept as solution" if this solved your problem.

View solution in original post

2 Replies 2
DensyoV
Meraki Employee
Meraki Employee

Hi,

Looking at the help > API docs on my Dashboard, there is a sample response shown for generating a snapshot and the time format (ISO 8601) is not considering the milliseconds so it appears to be rounded off.

 

api snapshot.JPG

 

hope this helps.

Please hit kudos if you found this post helpful and/or click "accept as solution" if this solved your problem.

Thanks four your reply! Wikipedia says for ISO8601:

 

Decimal fractions may be added to any of the three time elements. However, a fraction may only be added to the lowest order time element in the representation. A decimal mark, either a comma or a dot (without any preference as stated in resolution 10 of the 22nd General Conference CGPM in 2003,[24] but with a preference for a comma according to ISO 8601:2004)[25] is used as a separator between the time element and its fraction. To denote "14 hours, 30 and one half minutes", do not include a seconds figure. Represent it as "14:30,5", "1430,5", "14:30.5", or "1430.5". There is no limit on the number of decimal places for the decimal fraction. However, the number of decimal places needs to be agreed to by the communicating parties. For example, in Microsoft SQL Server, the precision of a decimal fraction is 3, i.e., "yyyy-mm-ddThh:mm:ss[.mmm]"

 

...and so I considered that millis would work. But however, now that I know, I am going to find another solution 🙂

 

I hope that there will be some more api functionality on this in the future. Currently (in the worst case), I have to download the whole ~30 second footage clip from the camera to extract a single frame for the required timestamp (in the worst case). IT would be awesome to have some kind of batch processing where you can input a set of timestamps and rectangles (objects) and where you can download the result directly from the camera as soon as the processing is finished.

 

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.