Time Differential
Good Afternoon,
We are currently trying to retrieve screenshots from timestamps/event alerts. In most cases, the requested timestamp is either the current time or within the last few seconds (typically less than 5 seconds old).
During testing, we observed that the image returned by the API is consistently offset from the requested timestamp. The returned frame can differ by 1–15 seconds, with the majority appearing around 10 seconds off from the exact timestamp requested. As a result, the image received does not accurately correspond to the timestamp passed in the request.
Testing across a range of timestamps, including current-time requests as well as requests going back several seconds and minutes. When comparing the requested timestamp against the timestamp displayed directly on the returned camera frame. The results consistently showed a measurable offset between the requested frame time and the actual frame returned, confirming that the behavior is reproducible and not isolated to a single event or request.
For reference, I am attaching a CSV containing the detailed test results. The primary columns included are:
- time_of_request — Wall-clock time when the HTTP request was sent
- requested_time — The timestamp provided to the API request
- difference — The age of the requested frame at the time the request was sent (time_of_request − requested_time)
- time_received — The timestamp displayed directly on the returned camera image
- time_diff_seconds — The variance between the requested timestamp and the timestamp of the returned frame (time_received − requested_time)
At this time, we are trying to determine what is causing this offset, we have confirmed that the timeline is accurate and that they display the correct time when going through the timeline and cameras. When we get images from email alert triggers, they seem to be within 1-3 seconds of the trigger. The API we are using to grab the image is below, is this correct or should we be trying to use a different API? Any help with this would be greatly appreciated.
/rest/v4/devices/{camera_id}/image?timestampMs={timestamp_ms}
Please sign in to leave a comment.
Comments
0 comments