1
+ < pre class ='metadata '>
2
+ Title: AVC (H.264) WebCodecs Registration
3
+ Repository: wicg/web-codecs
4
+ Status: CG-DRAFT
5
+ Shortname: webcodecs-avc-codec-registration
6
+ Level: none
7
+ Group: wicg
8
+ ED: none
9
+ Editor: Chris Cunningham, w3cid 114832, Google Inc. https://google.com/
10
+ Editor: Paul Adenot, w3cid 62410, Mozilla https://www.mozilla.org/
11
+ Editor: Bernard Aboba, w3cid 65611, Microsoft Corporation https://www.microsoft.com/
12
+ Boilerplate: omit conformance
13
+
14
+ Abstract: This registration is entered into the [[webcodecs-codec-registry]].
15
+ It describes, for AVC (H.264), the (1) fully qualified codec strings, (2)
16
+ the {{VideoDecoderConfig.description}} bytes, and (3) the
17
+ codec-specific extensions to the {{VideoEncoderConfig}}.
18
+
19
+ The registration is not intended to include any information on whether a
20
+ codec format is encumbered by intellectual property claims. Implementers and
21
+ authors are advised to seek appropriate legal counsel in this matter if they
22
+ intend to implement or use a specific codec format. Implementers of
23
+ WebCodecs are not required to support the AVC / H.264 codec.
24
+
25
+ This registration is non-normative.
26
+
27
+ Markup Shorthands:css no, markdown yes, dfn yes
28
+ !Participate: < a href ="https://github.com/wicg/web-codecs "> Git Repository.</ a >
29
+ !Participate: < a href ="https://github.com/wicg/web-codecs/issues/new "> File an issue.</ a >
30
+ !Version History: < a href ="https://github.com/wicg/web-codecs/commits "> https://github.com/wicg/web-codecs/commits</ a >
31
+ </ pre >
32
+
33
+ < pre class ='anchors '>
34
+ spec: webcodecs; urlPrefix: https://wicg.github.io/web-codecs/#
35
+ type: attribute
36
+ text: VideoDecoderConfig.description; url: dom-videodecoderconfig-description
37
+ type: interface
38
+ text: EncodedVideoChunk; url: encodedvideochunk
39
+ text: VideoEncoder; url: videoencoder
40
+ type: dictionary
41
+ text: VideoEncoderConfig; url: dictdef-videoencoderconfig
42
+ text: VideoDecoderConfig; url: dictdef-videodecoderconfig
43
+ </ pre >
44
+
45
+ < pre class ='biblio '>
46
+ {
47
+ "WEBCODECS": {
48
+ "href": "https://wicg.github.io/web-codecs/",
49
+ "title": "WebCodecs",
50
+ "publisher": "WICG"
51
+ },
52
+ "WEBCODECS-CODEC-REGISTRY": {
53
+ "href": "https://wicg.github.io/web-codecs/codec_registry.html",
54
+ "title": "WebCodecs Codec Registry",
55
+ "publisher": "WICG"
56
+ },
57
+ "ITU-T-REC-H.264": {
58
+ "href": "https://www.itu.int/rec/T-REC-H.264",
59
+ "title": "H.264 : Advanced video coding for generic audiovisual services",
60
+ "publisher": "ITU",
61
+ "date": "June 2019"
62
+ }
63
+ }
64
+ </ pre >
65
+
66
+ Fully qualified codec strings {#fully-qualified-codec-strings}
67
+ ==============================================================
68
+
69
+ The codec string must begin with the prefix "avc1.", and contain a suffix of 6
70
+ characters as described in Section 3.4 of [[rfc6381]].
71
+
72
+ NOTE: The common "avc3." prefix is intentionally not included. This prefix does
73
+ not signal a material difference to decoder inputs, so it is omitted for
74
+ simplification. For the purposes of this registration, authors should simply
75
+ map "avc3." to "avc1.".
76
+
77
+ VideoDecoderConfig description {#videodecoderconfig-description}
78
+ ================================================================
79
+
80
+ A {{VideoDecoderConfig.description}} may or may not be required by the
81
+ AVC codec depending on the bitstream format of the AVC content to be decoded.
82
+
83
+ If the {{VideoDecoderConfig.description}} includes an
84
+ `AVCDecoderConfigurationRecord`, as defined by [[iso14496-15]], section
85
+ 5.3.3.1, it will be assumed that the bitstream is in "avc" format.
86
+
87
+ NOTE: This format is commonly used in .MP4 files, where the player generally
88
+ has random access to the media data.
89
+
90
+ If the {{VideoDecoderConfig.description}} is not provided, it will be
91
+ assumed that the bitstream is in “annexb” format.
92
+
93
+ NOTE: "annexb" format is described in greater detail by [[ITU-T-REC-H.264]],
94
+ Annex B. This format is commonly used in live-streaming applications, where
95
+ including the SPS and PPS data periodically allows users to easily start
96
+ from the middle of the stream.
97
+
98
+ VideoEncoderConfig extensions {#videoencoderconfig-extensions}
99
+ ==============================================================
100
+
101
+ < pre class ='idl '>
102
+ < xmp >
103
+ partial dictionary VideoEncoderConfig {
104
+ AvcEncoderConfig avc;
105
+ };
106
+ </ xmp >
107
+ </ pre >
108
+
109
+ < dl >
110
+ < dt > < dfn dict-member for =VideoEncoderConfig > avc</ dfn > </ dt >
111
+ < dd >
112
+ Contains codec specific configuration options for the AVC (H.264) codec.
113
+ </ dd >
114
+ </ dl >
115
+
116
+ AvcEncoderConfig {#avc-encoder-config}
117
+ --------------------------------------
118
+ < pre class ='idl '>
119
+ < xmp >
120
+ dictionary AvcEncoderConfig {
121
+ AvcBitstreamFormat format = "avc";
122
+ };
123
+ </ xmp >
124
+ </ pre >
125
+
126
+ < dl >
127
+ < dt > < dfn dict-member for =AvcEncoderConfig > format</ dfn > </ dt >
128
+ < dd >
129
+ Configures the format of output {{EncodedVideoChunk}}s. See
130
+ {{AvcBitstreamFormat}}.
131
+ </ dd >
132
+ </ dl >
133
+
134
+ AvcBitstreamFormat {#avc-bitstream-format}
135
+ ------------------------------------------
136
+ < pre class ='idl '>
137
+ < xmp >
138
+ enum AvcBitstreamFormat {
139
+ "annexb",
140
+ "avc",
141
+ };
142
+ </ xmp >
143
+ </ pre >
144
+
145
+ The {{AvcBitstreamFormat}} determines the location of AVC Sequence Parameter
146
+ Set (SPS) and Picture Parameter Set (PPS) data, and mechanisms for packaging
147
+ the bitstream.
148
+
149
+ SPS and PPS are described in greater detail in sections G.3.41 and G.3.55 of
150
+ [[ITU-T-REC-H.264]].
151
+
152
+ < dl >
153
+ < dt > < dfn enum-value for =AvcBitstreamFormat > annexb</ dfn > </ dt >
154
+ < dd >
155
+ SPS and PPS data are included periodically throughout the bitstream.
156
+
157
+ NOTE: This format is described in greater detail by [[ITU-T-REC-H.264]],
158
+ Annex B. This format is commonly used in live-streaming applications,
159
+ where including the SPS and PPS data periodically allows users to easily
160
+ start from the middle of the stream.
161
+ </ dd >
162
+ < dt > < dfn enum-value for =AvcBitstreamFormat > avc</ dfn > </ dt >
163
+ < dd >
164
+ SPS and PPS data are not included in the bitstream and are instead emitted
165
+ via the {{VideoEncoder}} [[output callback]] as the
166
+ {{VideoDecoderConfig.description}} of the
167
+ {{VideoDecoderConfig}}.
168
+ < var ignore =''> output_config</ var > .
169
+
170
+ NOTE: This format is described in greater detail by [[iso14496-15]],
171
+ section 5.3.3.1. This format is commonly used in .MP4 files, where the
172
+ player generally has random access to the media data.
173
+ </ dl >
0 commit comments