← Back to release summary

Expose rtpTimestamp from WebRTC video frames via VideoFrame.metadata()

Category
Multimedia
Type
Chromium catches up
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Adds a VideoFrame.metadata() method that returns a dictionary containing the rtpTimestamp field, if the underlying VideoFrame has this field in its native metadata. An empty dictionary is returned otherwise. Only video frames originating from WebRTC sources will have the rtpTimestamp metadata attached. Additional metadata fields are already present in the native implementation and may be exposed to JavaScript over time, as outlined in the proposed spec: https://www.w3.org/TR/webcodecs-video-frame-metadata-registry/#dom-videoframemetadata

Motivation

This feature exposes the rtpTimestamp field on the JavaScript facing VideoFrame.metadata dictionary when it is present in the underlying native media::VideoFrameMetadata. It allows applications using MediaStreamTrackProcessor (e.g., to render decoded WebRTC frames to a canvas) or WebCodecs (e.g., for custom decoding pipelines) to correlate each exposed frame with its original RTP transport timestamp. This is useful for: Media synchronization across tracks Jitter or latency diagnostics Aligning decoded video with captured or received audio Spec link: https://www.w3.org/TR/webcodecs-video-frame-metadata-registry/#dom-videoframemetadata-rtptimestamp Chromium implementation CL: https://chromium-review.googlesource.com/c/chromium/src/+/6499588 Chromium bug: https://crbug.com/414545889

Standards & signals

View on chromestatus.com