Why changing rtp timestamp (TimestampTranslation) in videobridge



Looking at the videobridge source code, I saw there’re some logic rewriting the downstream packets rtp timestamp. (Code attached below from SimulcastController.java) The rtp timestamp represents a frame’s capture time. What’s the intention to adjust that in the videobridge? Won’t that breaks a/v sync etc, which relies on the rtp timestamp?

                    long dstTs = tsTranslation.apply(srcTs);
                    if (dstTs != srcTs)



And the rtp timestamp rewriting happens to the audio stream as well, in ResumableStreamRewriter. We’ve seen some a/v sync issue and we suspect it’s related to the rtp timestamp rewriting in the bridge.

It will be great if someone can share the idea behind the rtp timestamp rewrite.

Thanks in advance!