AVC (H.264) WebCodecs Registration

W3C Working Draft,

This version:
https://www.w3.org/TR/2021/WD-webcodecs-avc-codec-registration-20210514/
Latest published version:
https://www.w3.org/TR/webcodecs-avc-codec-registration/
Editor's Draft:
https://w3c.github.io/webcodecs/avc_codec_registration.html
Previous Versions:
Issue Tracking:
GitHub
Editors:
Chris Cunningham (Google Inc.)
Paul Adenot (Mozilla)
Bernard Aboba (Microsoft Corporation)
Participate:
Git Repository.
File an issue.
Version History:
https://github.com/w3c/webcodecs/commits

Abstract

This registration is entered into the [webcodecs-codec-registry]. It describes, for AVC (H.264), the (1) fully qualified codec strings, (2) the VideoDecoderConfig.description bytes, and (3) the codec-specific extensions to the VideoEncoderConfig.

The registration is not intended to include any information on whether a codec format is encumbered by intellectual property claims. Implementers and authors are advised to seek appropriate legal counsel in this matter if they intend to implement or use a specific codec format. Implementers of WebCodecs are not required to support the AVC / H.264 codec.

This registration is non-normative.

Status of this document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.

Feedback and comments on this specification are welcome. GitHub Issues are preferred for discussion on this specification. Alternatively, you can send comments to the Media Working Group’s mailing-list, public-media-wg@w3.org (archives). This draft highlights some of the pending issues that are still to be discussed in the working group. No decision has been taken on the outcome of these issues including whether they are valid.

This document was published by the Media Working Group as a Working Draft.

Publication as a Working Draft does not imply endorsement by the W3C Membership.

This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the W3C Patent Policy. The group does not expect this document to become a W3C Recommendation. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

This document is governed by the 15 September 2020 W3C Process Document.

1. Fully qualified codec strings

The codec string must begin with the prefix "avc1.", and contain a suffix of 6 characters as described in Section 3.4 of [rfc6381].

NOTE: The common "avc3." prefix is intentionally not included. This prefix does not signal a material difference to decoder inputs, so it is omitted for simplification. For the purposes of this registration, authors should simply map "avc3." to "avc1.".

2. VideoDecoderConfig description

A VideoDecoderConfig.description may or may not be required by the AVC codec depending on the bitstream format of the AVC content to be decoded.

If the VideoDecoderConfig.description includes an AVCDecoderConfigurationRecord, as defined by [iso14496-15], section 5.3.3.1, it will be assumed that the bitstream is in "avc" format.

NOTE: This format is commonly used in .MP4 files, where the player generally has random access to the media data.

If the VideoDecoderConfig.description is not provided, it will be assumed that the bitstream is in “annexb” format.

NOTE: "annexb" format is described in greater detail by [ITU-T-REC-H.264], Annex B. This format is commonly used in live-streaming applications, where including the SPS and PPS data periodically allows users to easily start from the middle of the stream.

3. VideoEncoderConfig extensions

partial dictionary VideoEncoderConfig {
  AvcEncoderConfig avc;
};

avc, of type AvcEncoderConfig
Contains codec specific configuration options for the AVC (H.264) codec.

3.1. AvcEncoderConfig

dictionary AvcEncoderConfig {
  AvcBitstreamFormat format = "avc";
};

format, of type AvcBitstreamFormat, defaulting to "avc"
Configures the format of output EncodedVideoChunks. See AvcBitstreamFormat.

3.2. AvcBitstreamFormat

enum AvcBitstreamFormat {
  "annexb",
  "avc",
};

The AvcBitstreamFormat determines the location of AVC Sequence Parameter Set (SPS) and Picture Parameter Set (PPS) data, and mechanisms for packaging the bitstream.

SPS and PPS are described in greater detail in sections G.3.41 and G.3.55 of [ITU-T-REC-H.264].

annexb
SPS and PPS data are included periodically throughout the bitstream.

NOTE: This format is described in greater detail by [ITU-T-REC-H.264], Annex B. This format is commonly used in live-streaming applications, where including the SPS and PPS data periodically allows users to easily start from the middle of the stream.

avc
SPS and PPS data are not included in the bitstream and are instead emitted via the VideoEncoder [[output callback]] as the VideoDecoderConfig.description of the VideoDecoderConfig. output_config.

NOTE: This format is described in greater detail by [iso14496-15], section 5.3.3.1. This format is commonly used in .MP4 files, where the player generally has random access to the media data.

4. Privacy and Security Considerations

Please refer to the Privacy Considerations and Security Considerations sections in [WEBCODECS].

Index

Terms defined by this specification

Terms defined by reference

References

Normative References

[WEBCODECS]
Chris Cunningham; Paul Adenot; Bernard Aboba. WebCodecs. 13 May 2021. WD. URL: https://www.w3.org/TR/webcodecs/

Informative References

[ISO14496-15]
Information technology — Coding of audio-visual objects — Part 15: Carriage of network abstraction layer (NAL) unit structured video in the ISO base media file format. September 2019. Published. URL: https://www.iso.org/standard/74429.html
[ITU-T-REC-H.264]
H.264 : Advanced video coding for generic audiovisual services. June 2019. URL: https://www.itu.int/rec/T-REC-H.264
[RFC6381]
R. Gellens; D. Singer; P. Frojdh. The 'Codecs' and 'Profiles' Parameters for "Bucket" Media Types. August 2011. Proposed Standard. URL: https://datatracker.ietf.org/doc/html/rfc6381
[WEBCODECS-CODEC-REGISTRY]
Chris Cunningham; Paul Adenot; Bernard Aboba. WebCodecs Codec Registry. 13 May 2021. WD. URL: https://www.w3.org/TR/webcodecs-codec-registry/

IDL Index

partial dictionary VideoEncoderConfig {
  AvcEncoderConfig avc;
};


dictionary AvcEncoderConfig {
  AvcBitstreamFormat format = "avc";
};


enum AvcBitstreamFormat {
  "annexb",
  "avc",
};