WebRtc Stream Timestamps Invalid

Version: 2025 R2

We are connecting a webrtc client (not browser) to the milestone VMS’s webrtc stream, and we see choppy video. Our analysis shows:

The WebRTC video stream generated by the Milestone XProtect VMS contains invalid RTP (Real-time Transport Protocol) timestamps. While the Session Description Protocol (SDP) specifies a clock-rate of 90,000 Hz for the video stream, the source is incorrectly generating timestamps at a much lower frequency.

RTP Timestamp Clock Rate Mismatch

In a standard H.264 WebRTC stream, the RTP timestamp must advance at the rate defined in the SDP (90,000 Hz) to ensure proper synchronization.

  • The Milestone source is delivering timestamps at a rate of approximately 1,000 Hz.

  • Because the timestamps are off by a factor of 90, the receiving client cannot correctly calculate the presentation time for the video frames.

Required Resolution

To resolve this issue on the Milestone side, the WebRTC egress component must be updated as follows:

  1. Correct Timestamp Scaling: Update the RTP timestamp generation to ensure it scales at the 90,000 Hz clock rate required for H.264 video, rather than the current 1,000 Hz rate.

  2. Clock-Rate Alignment: Ensure the internal clock used to generate these timestamps matches the frequency negotiated in the SDP to prevent continuous synchronization resets.

I also have this problem with 2025r2

Milestone Development will start an investigation.

any updates you can provide? technical support closed my case on this noting it was with the development team.

There is no feedback on this investigation yet.
If you had a support case it shouldn’t be closed until the investigation pertaining to your case is done and you get the reply. It is completely valid to have a support case for your development using Milestone’s API or SDK.

Thank you Bo. I have opened another case, 00026715.
The previously closed one was 00017641.

Milestone Development have created a new API Gateway that includes a fix, for now this is an experimental fix, not an official fix. Your feedback on the fix is important for us, whether it fixes the issue or not.
Find the fix here.

Thank you @Bo_Ellegard_Andersen - I have installed this on my local system and streaming is now smooth.