v145 · WebRTC · Jitter Tracker
RTP jitter tracker
Sample synthetic rtpTimestamp values from a generator, compute inter-arrival jitter via the standard RFC 3550 formula, and plot it live. Models what an Insertable Streams pipeline would see in real call.
Webcam optional. The page synthesises an RTP-clocked timestamp stream so you
can see jitter math live. If you press "Use webcam" we set up an actual VideoFrame pipeline
and read
rtpTimestamp off real frames where available.
controls
frames seen0
last rtpTimestamp—
jitter (RFC 3550)— ms
peak jitter— ms
media clock90 kHz
code
// Chrome 145: VideoFrameMetadata exposes rtpTimestamp on frames
// coming through Insertable Streams from a WebRTC transceiver.
const reader = new MediaStreamTrackProcessor({ track }).readable.getReader();
let prev = null;
while (true) {
const { value: frame, done } = await reader.read();
if (done) break;
const meta = frame.metadata(); // { rtpTimestamp, captureTime, ... }
if (prev) {
const d = Math.abs(meta.rtpTimestamp - prev.rtpTimestamp) / 90; // ms
jitter += (Math.abs(d - prevD) - jitter) / 16; // RFC 3550
}
frame.close();
}