On our test system, we are running xProtect 2026 R1, with Open Network Bridge (ONB). We integrated a Bosch Starlight MIC 7000i camera.
The problems are:
-
In the live stream, I see drifting of the calculated absolute packet timestamps (from RTP timestamp and latest Sender Report)
-
Replayed video is not from the requested time
Some info:
- Clock on the camera, on the Milestone system and the PC running our client software are in sync (within 1s) and correct.
- The camera embeds its date/time in the videostream.
Our own client software sets up an RTSP-stream through the Open Network Bridge to receive the live video stream. It handles the RTP packets and the Sender Reports. From the timestamp in the RTP header and the information provided in the Sender Report, it calculates the absolute time of each packet. In our client software, if the stream (for whatever reason) lags behind more than 10s, it closes and restarts the RTSP-session ‘to get back in sync‘. At least, that was the intention of the person who developed our client software…
What we see is this:
- Right after a restart of the Recording Server or the camera, the delta between the client’s wall clock time and the calculated absolute time (from RTP header timestamp and most recent SR) for each packet received by our client is very small. (<1s).
- However, this delta grows slowly but gradually over time. After a little while, the calculated absolute time for a packet indicates it was actually captured in the past.
- The delta grows with about 0.14s per hour, which means it is about 10s in three days.
- Even with such big deltas, the date/time stamped in the live video stream still very closely matches the wall clock of the camera, milestone server and client, which shows the video is still ‘live‘, even though the calculated absolute timestamps indicate that packets are ‘from the future‘.
- Stopping and restarting the RTSP session with the ONB doesn’t solve the delta. Each new session will start with the same delta as the one that was stopped.
- Only restarting the Recording Server or the camera puts the delta back to 0, after which it starts growing again. Having to restart the Recording Server or the camera regularly to keep the system working isn’t very nice, of course.
Of course we can ignore/disable the 10s ‘absolute timestamp delta check‘ in our client software (as we are viewing the live stream anyway), but the issue is also relevant and causing issues for recording/replay, completely without our own client software:
- If we replay the video (in SmartClient) from a period very shortly after a Recording Server restart, the ‘replay time‘ and the timestamp in the replayed video stream match very well (delta <1s).
- If we replay a period three days after the Recording Server restart (where the calculated absolute timestamps would have been off by ~10s off due to the above described drift), the ‘replay time‘ and the embedded timestamp in the video stream is also ~10s off! E.g. if the replay time in SmartClient indicates 9:00:00, the video stream shows 9:00:10. So we are not replaying the video of the exact time we requested to replay.
- The drift grows steadily, so after 30 days, the delta would be about 100s etc.
Without knowing the internals of the Milestone software (so I’m speculating here), it almost seems as if the Recording Server only handles/stores the very first Sender Report from the camera to sync the stream’s rtp header timestamp to the wall clock of the camera once, and then assumes that each tick of the rtp timestamp represents exactly 90.000kHz. Of course this is not the case (as it will always be something like 90.00001kHz or 89.9997kHz in real life), which will cause some drift, but each Sender Report received from the camera should fix the drifting (if handled properly). A restart of the Recording Server or the camera would trigger a re-setup of the RTSP-session between Recording Server and camera, including a fresh handling of the first Sender Report, which sets the drift to 0. But then it starts growing again…
Of course the speed/direction-of-drifting is hardware specific and will differ per camera, but with a properly implemented re-sync on Sender Reports, this should not be an issue.
Can someone at development look into this issue? Is it maybe something that was introduced with xProtect 2026 R1? As I can’t remember having the same issues (with the same camera) while it was connected to xProtect 2025 R2… (but maybe I didn’t look close enough at the time…)
Could it be related to this post?: RTP timestamp in WebRTC playback streams showing incorrect time - #5 by DavidSHS
Thanks a bunch!