Skip to content

Align streaming offers and frames with WebCodecs - #390

Draft
baylesj wants to merge 1 commit into
w3c:mainfrom
baylesj:baylesj/issue-381-webcodecs-decoder-config
Draft

baylesj wants to merge 1 commit into
w3c:mainfrom
baylesj:baylesj/issue-381-webcodecs-decoder-config

Conversation

@baylesj

@baylesj baylesj commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Addresses #381 (and follows up on #194 (comment)).

audio-encoding-offer, video-encoding-offer, and video-frame currently lack decoder initialization bytes, color space fields, and wire HDR metadata needed to remote demuxed MP4 or Matroska tracks without re-encoding.

This draft aligns those offers and frames directly with W3C WebCodecs (AudioDecoderConfig, VideoDecoderConfig, and VideoColorSpaceInit) and Media Capabilities (HdrMetadataType):

  • Adds sample-rate, number-of-channels, and description to audio-encoding-offer, plus end-of-stream to audio-frame.
  • Adds description, coded-resolution, display-aspect-ratio, color-space (VideoColorPrimaries, VideoTransferCharacteristics, VideoMatrixCoefficients, and full-range), and static hdr-metadata (HdrMetadataType + bytes, such as smpteSt2086) to video-encoding-offer.
  • Adds per-frame dynamic hdr-metadata (such as smpteSt2094-40 or smpteSt2094-10) and end-of-stream to video-frame.
  • Delegates container vs. start-code bitstream framing (for example, length-prefixed avc / hevc samples vs. annexb, or raw aac vs. adts) to the WebCodecs Codec Registry rules for whether description is present, avoiding a separate bitstream-format field.

audio-encoding-offer, video-encoding-offer, and video-frame lack the
decoder configuration and HDR metadata fields needed to remote
container-demuxed tracks without transcoding.

Add sample-rate, number-of-channels, and description to
audio-encoding-offer, add description, coded-resolution,
display-aspect-ratio, color-space, and static hdr-metadata to
video-encoding-offer, and add dynamic hdr-metadata and end-of-stream to
media frames, aligned with WebCodecs AudioDecoderConfig,
VideoDecoderConfig, VideoColorSpaceInit, and Media Capabilities
HdrMetadataType. Bitstream framing (such as length-prefixed avc/hevc vs.
annexb) follows the WebCodecs Codec Registry rules for description.

Fixes w3c#381

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant