Skip to content

Add codec initialization data and HDR metadata to streaming offers and frames #381

Backlog

Description

@baylesj

PR #300 (closing #194) added color-gamut and hdr-formats to receive-video-capability, and #194 (comment) noted that sending HDR metadata on the wire still needed protocol fields. Today video-encoding-offer and audio-encoding-offer only carry encoding-id, codec-name, time-scale, default-duration, and default-rotation.

When remoting demuxed MP4 or Matroska tracks without transcoding, the receiver decoder also needs the fields from WebCodecs VideoDecoderConfig and AudioDecoderConfig:

  • Codec initialization bytes (description, such as avcC, hvcC, av1C, AudioSpecificConfig, or OpusHead) and bitstream framing (annexb vs. length-prefixed samples) so the sender does not have to rewrite containers into Annex-B.
  • Coded resolution on video-encoding-offer, plus sample-rate and channel-count on audio-encoding-offer.
  • Track color space (ITU-T H.273 primaries, transfer, matrix, and range) and static HDR metadata (SMPTE ST 2086 / CTA-861.3) on video-encoding-offer.
  • Per-frame dynamic HDR metadata (SMPTE ST 2094-40 ITU-T T.35 bytes) and an end-of-stream flag on video-frame (see MIME types and metadata encoding for Dolby Vision formats #306 for Dolby Vision).

Does the group prefer to align these field names and types with WebCodecs VideoDecoderConfig and VideoColorSpaceInit?

Activity

  1. added a commit that references this issue on Nov 24, 2026
    8968514
  2. baylesj commented on Nov 24, 2026

    @baylesj
    ContributorAuthor

    I opened a draft PR in #390 that aligns audio-encoding-offer, video-encoding-offer, and video-frame with WebCodecs (AudioDecoderConfig, VideoDecoderConfig, and VideoColorSpaceInit) and Media Capabilities (HdrMetadataType).

    Following the WebCodecs Codec Registry rules for description (where presence vs. absence of codec init bytes defines length-prefixed vs. Annex-B/ADTS framing) lets us drop a separate bitstream-format field. Happy to adjust any of the CDDL keys or HDR metadata framing if the group prefers a different shape.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions