The RTP timestamp is a media-clock value in the header of every RTP packet, marking the sampling instant of the data it carries. It is not wall-clock time and it runs on a per-stream clock — typically 48 kHz for Opus audio — so audio and video in a call advance on independent RTP timelines that can't be compared directly. The bridge is the RTCP sender report, which periodically pairs a stream's RTP timestamp with an absolute NTP wall-clock time; the receiver uses those mappings to place both streams on one true timeline and achieve lip-sync. RTP timestamps also let the jitter buffer order packets and measure jitter, independent of how they arrived.

Book cover: Audio for Video, Volume 5 of the Fora Soft Video Engineering Handbook

The book · Volume 5 of 7

Audio for Video: A Complete Guide to Sound in Video Products: From Jitter Buffers and Lip Sync to Atmos, Quality Metrics, and Neural Codecs

RTP timestamps run on separate clocks per stream, so audio and video cannot be compared until RTCP maps them to wall-clock time. This volume covers the RTP timestamp in depth with Sender Reports, NTP, clock domains and drift correction, so you can find exactly where a sync error enters a call. Written by Nikolay Sapunov, CEO at Fora Soft.

Read it on Amazon →Kindle & paperback · Fora Soft Video Engineering Handbook

Audio and video RTP timestamps drifting apart in your real-time app?

Share captures from an affected call and we will trace RTP timestamp handling, find the drift source and recommend a fix. 250+ video products shipped since 2005.

Book a 30-min call →WhatsApp →Email us →