forked from w3c/media-source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webm-byte-stream-format.html
666 lines (575 loc) · 30.6 KB
/
webm-byte-stream-format.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
<!DOCTYPE html SYSTEM "about:legacy-compat"><html lang="en" dir="ltr"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="generator" content="ReSpec 20.11.1"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><style>/* --- ISSUES/NOTES --- */
div.issue-title, div.note-title , div.ednote-title, div.warning-title {
padding-right: 1em;
min-width: 7.5em;
color: #b9ab2d;
}
div.issue-title { color: #e05252; }
div.note-title, div.ednote-title { color: #2b2; }
div.warning-title { color: #f22; }
div.issue-title span, div.note-title span, div.ednote-title span, div.warning-title span {
text-transform: uppercase;
}
div.note, div.issue, div.ednote, div.warning {
margin-top: 1em;
margin-bottom: 1em;
}
.note > p:first-child, .ednote > p:first-child, .issue > p:first-child, .warning > p:first-child { margin-top: 0 }
.issue, .note, .ednote, .warning {
padding: .5em;
border-left-width: .5em;
border-left-style: solid;
}
div.issue, div.note , div.ednote, div.warning {
padding: 1em 1.2em 0.5em;
margin: 1em 0;
position: relative;
clear: both;
}
span.note, span.ednote, span.issue, span.warning { padding: .1em .5em .15em; }
.issue {
border-color: #e05252;
background: #fbe9e9;
}
.note, .ednote {
border-color: #52e052;
background: #e9fbe9;
}
.warning {
border-color: #f11;
border-width: .2em;
border-style: solid;
background: #fbe9e9;
}
.warning-title:before{
content: "⚠"; /*U+26A0 WARNING SIGN*/
font-size: 3em;
float: left;
height: 100%;
padding-right: .3em;
vertical-align: top;
margin-top: -0.5em;
}
li.task-list-item {
list-style: none;
}
input.task-list-item-checkbox {
margin: 0 0.35em 0.25em -1.6em;
vertical-align: middle;
}
.issue a.respec-gh-label {
padding: 5px;
margin: 0 2px 0 2px;
font-size: 10px;
text-transform: none;
text-decoration: none;
font-weight: bold;
border-radius: 4px;
position: relative;
bottom: 2px;
}
.issue a.respec-label-dark {
color: #fff;
background-color: #000;
}
.issue a.respec-label-light {
color: #000;
background-color: #fff;
}
</style>
<title>WebM Byte Stream Format</title>
<!--<script src="respec-w3c-common.js" class="remove"></script>-->
<!-- script to register bugs -->
<!-- Disabled unless/until it supports GitHub issues.
<script src="https://w3c.github.io/webcomponents/assets/scripts/bug-assist.js"></script>
<meta name="bug.short_desc" content="[MSE] ">
<meta name="bug.product" content="HTML WG">
<meta name="bug.component" content="Media Source Extensions">
-->
<link rel="stylesheet" href="mse.css">
<style id="respec-mainstyle">/*****************************************************************
* ReSpec 3 CSS
* Robin Berjon - http://berjon.com/
*****************************************************************/
/* Override code highlighter background */
.hljs {
background: transparent !important;
}
/* --- INLINES --- */
h1 abbr,
h2 abbr,
h3 abbr,
h4 abbr,
h5 abbr,
h6 abbr,
a abbr {
border: none;
}
dfn {
font-weight: bold;
}
a.internalDFN {
color: inherit;
border-bottom: 1px solid #99c;
text-decoration: none;
}
a.externalDFN {
color: inherit;
border-bottom: 1px dotted #ccc;
text-decoration: none;
}
a.bibref {
text-decoration: none;
}
cite .bibref {
font-style: normal;
}
code {
color: #c83500;
}
th code {
color: inherit;
}
/* --- TOC --- */
.toc a,
.tof a {
text-decoration: none;
}
a .secno,
a .figno {
color: #000;
}
ul.tof,
ol.tof {
list-style: none outside none;
}
.caption {
margin-top: 0.5em;
font-style: italic;
}
/* --- TABLE --- */
table.simple {
border-spacing: 0;
border-collapse: collapse;
border-bottom: 3px solid #005a9c;
}
.simple th {
background: #005a9c;
color: #fff;
padding: 3px 5px;
text-align: left;
}
.simple th[scope="row"] {
background: inherit;
color: inherit;
border-top: 1px solid #ddd;
}
.simple td {
padding: 3px 10px;
border-top: 1px solid #ddd;
}
.simple tr:nth-child(even) {
background: #f0f6ff;
}
/* --- DL --- */
.section dd > p:first-child {
margin-top: 0;
}
.section dd > p:last-child {
margin-bottom: 0;
}
.section dd {
margin-bottom: 1em;
}
.section dl.attrs dd,
.section dl.eldef dd {
margin-bottom: 0;
}
#issue-summary > ul,
.respec-dfn-list {
column-count: 2;
}
#issue-summary li,
.respec-dfn-list li {
list-style: none;
}
details.respec-tests-details {
margin-left: 1em;
display: inline-block;
vertical-align: top;
}
details.respec-tests-details > * {
padding-right: 2em;
}
details.respec-tests-details[open] {
z-index: 999999;
position: absolute;
border: thin solid #cad3e2;
border-radius: .3em;
background-color: white;
padding-bottom: .5em;
}
details.respec-tests-details[open] > summary {
border-bottom: thin solid #cad3e2;
padding-left: 1em;
margin-bottom: 1em;
line-height: 2em;
}
details.respec-tests-details > ul {
width: 100%;
margin-top: -0.3em;
}
details.respec-tests-details > li {
padding-left: 1em;
}
@media print {
.removeOnSave {
display: none;
}
}
</style><link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2016/W3C-ED"><link rel="canonical" href="https://www.w3.org/TR/mse-byte-stream-format-webm/"><script id="initialUserConfig" type="application/json">{
"specStatus": "ED",
"shortName": "mse-byte-stream-format-webm",
"edDraftURI": "https://w3c.github.io/media-source/webm-byte-stream-format.html",
"prevVersion": "https://www.w3.org/2013/12/byte-stream-format-registry/webm-byte-stream-format.html",
"editors": [
{
"name": "Matthew Wolenetz",
"url": "",
"company": "Google Inc.",
"companyURL": "http://www.google.com/"
},
{
"name": "Jerry Smith",
"url": "",
"company": "Microsoft Corporation",
"companyURL": "http://www.microsoft.com/"
},
{
"name": "Aaron Colwell (until April 2015)",
"url": "",
"company": "Google Inc.",
"companyURL": "http://www.google.com/"
}
],
"mseDefGroupName": "webm-byte-stream-format",
"mseUnusedGroupNameExcludeList": [
"media-source"
],
"mseContributors": [
"Chris Cunningham",
"Frank Galligan",
"Philip Jägenstedt"
],
"wg": "HTML Media Extensions Working Group",
"wgURI": "https://www.w3.org/html/wg/",
"wgPublicList": "public-html-media",
"wgPatentURI": "https://www.w3.org/2004/01/pp-impl/40318/status",
"noIDLIn": true,
"scheme": "https",
"otherLinks": [
{
"key": "Repository",
"data": [
{
"value": "We are on GitHub",
"href": "https://github.com/w3c/media-source/"
},
{
"value": "File a bug",
"href": "https://github.com/w3c/media-source/issues"
},
{
"value": "Commit history",
"href": "https://github.com/w3c/media-source/commits/gh-pages/webm-byte-stream-format-respec.html"
}
]
},
{
"key": "Mailing list",
"data": [
{
"value": "public-html-media@w3.org",
"href": "https://lists.w3.org/Archives/Public/public-html-media/"
}
]
}
],
"preProcess": [
null,
null
],
"definitionMap": {},
"postProcess": [
null
],
"localBiblio": {
"INBANDTRACKS": {
"title": "Sourcing In-band Media Resource Tracks from Media Containers into HTML",
"href": "https://dev.w3.org/html5/html-sourcing-inband-tracks/",
"authors": [
"Bob Lund",
"Silvia Pfeiffer"
],
"publisher": "W3C"
},
"VP09CODECSPARAMETERSTRING": {
"title": "VP Codec ISO Media File Format Binding",
"href": "http://www.webmproject.org/vp9/mp4/#codecs-parameter-string",
"authors": [
"Frank Galligan",
"Kilroy Hughes",
"Thomás Inskip",
"David Ronca"
],
"publisher": "WebM Project"
},
"MSE-REGISTRY": {
"title": "Media Source Extensions™ Byte Stream Format Registry",
"href": "byte-stream-format-registry.html",
"authors": [
"Matthew Wolenetz",
"Jerry Smith",
"Aaron Colwell"
],
"publisher": "W3C"
},
"MSE-FORMAT-WEBM": {
"title": "WebM Byte Stream Format",
"href": "webm-byte-stream-format.html",
"authors": [
"Matthew Wolenetz",
"Jerry Smith",
"Aaron Colwell"
],
"publisher": "W3C"
},
"MSE-FORMAT-ISOBMFF": {
"title": "ISO BMFF Byte Stream Format",
"href": "isobmff-byte-stream-format.html",
"authors": [
"Matthew Wolenetz",
"Jerry Smith",
"Mark Watson",
"Aaron Colwell",
"Adrian Bateman"
],
"publisher": "W3C"
},
"MSE-FORMAT-MP2T": {
"title": "MPEG-2 Transport Streams Byte Stream Format",
"href": "mp2t-byte-stream-format.html",
"authors": [
"Matthew Wolenetz",
"Jerry Smith",
"Mark Watson",
"Aaron Colwell",
"Adrian Bateman"
],
"publisher": "W3C"
},
"MSE-FORMAT-MPEG-AUDIO": {
"title": "MPEG Audio Byte Stream Format",
"href": "mpeg-audio-byte-stream-format.html",
"authors": [
"Dale Curtis",
"Matthew Wolenetz",
"Aaron Colwell"
],
"publisher": "W3C"
}
},
"publishISODate": "2018-05-22T00:00:00.000Z",
"generatedSubtitle": "Editor's Draft 22 May 2018"
}</script></head>
<body class="h-entry"><div class="head">
<a href="https://www.w3.org/" class="logo">
<img alt="W3C" width="72" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C">
</a>
<h1 id="title" class="title p-name">WebM Byte Stream Format</h1>
<h2 id="w3c-editor-s-draft-22-may-2018"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published" datetime="2018-05-22">22 May 2018</time></h2>
<dl>
<dt>This version:</dt><dd><a class="u-url" href="https://w3c.github.io/media-source/webm-byte-stream-format.html">https://w3c.github.io/media-source/webm-byte-stream-format.html</a></dd><dt>Latest published version:</dt><dd><a href="https://www.w3.org/TR/mse-byte-stream-format-webm/">https://www.w3.org/TR/mse-byte-stream-format-webm/</a></dd>
<dt>Latest editor's draft:</dt><dd><a href="https://w3c.github.io/media-source/webm-byte-stream-format.html">https://w3c.github.io/media-source/webm-byte-stream-format.html</a></dd>
<dt>Editors:</dt>
<dd class="p-author h-card vcard"><span class="p-name fn">Matthew Wolenetz</span> (<a class="p-org org h-org h-card" href="http://www.google.com/">Google Inc.</a>)</dd><dd class="p-author h-card vcard"><span class="p-name fn">Jerry Smith</span> (<a class="p-org org h-org h-card" href="http://www.microsoft.com/">Microsoft Corporation</a>)</dd><dd class="p-author h-card vcard"><span class="p-name fn">Aaron Colwell (until April 2015)</span> (<a class="p-org org h-org h-card" href="http://www.google.com/">Google Inc.</a>)</dd>
<dt>Repository:</dt><dd>
<a href="https://github.com/w3c/media-source/">We are on GitHub</a>
</dd><dd>
<a href="https://github.com/w3c/media-source/issues">File a bug</a>
</dd><dd>
<a href="https://github.com/w3c/media-source/commits/gh-pages/webm-byte-stream-format-respec.html">Commit history</a>
</dd><dt>Mailing list:</dt><dd>
<a href="https://lists.w3.org/Archives/Public/public-html-media/">public-html-media@w3.org</a>
</dd>
</dl>
<p class="copyright">
<a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
2018
<a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup>
(<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
<a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
<a href="https://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>).
<abbr title="World Wide Web Consortium">W3C</abbr> <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
<a rel="license" href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">permissive document license</a>
rules apply.
</p>
<hr title="Separator for header">
</div>
<section id="abstract" class="introductory"><h2 id="abstract-0">Abstract</h2>
This specification defines a <a href="index.html#">Media Source Extensions™</a> [<cite><a class="bibref" href="#bib-MEDIA-SOURCE">MEDIA-SOURCE</a></cite>] byte stream format specification based on the WebM container format.
</section>
<section id="sotd" class="introductory"><h2 id="status-of-this-document">Status of This Document</h2><p>
<em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision of this technical report can be found in the <a href="https://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports index</a> at https://www.w3.org/TR/.</em>
</p><p>The working group maintains <a href="https://github.com/w3c/media-source/issues">a list of all bug reports that the editors have not yet tried to address</a>; there may also be open bugs in the <a href="http://w3.org/brief/Mjcw">previous bug tracker</a>.</p><p>Implementors should be aware that this specification is not stable. <strong>Implementors who are not taking part in the discussions are likely to find the specification changing out from under them in incompatible ways.</strong> Vendors interested in implementing this specification before it eventually reaches the Candidate Recommendation stage should join the mailing list mentioned below and take part in the discussions.</p><p>
This document was published by the <a href="https://www.w3.org/html/wg/">HTML Media Extensions Working Group</a> as an Editor's Draft.
Comments regarding this document are welcome. Please send them to
<a href="mailto:public-html-media@w3.org">public-html-media@w3.org</a>
(<a href="mailto:public-html-media-request@w3.org?subject=subscribe">subscribe</a>,
<a href="https://lists.w3.org/Archives/Public/public-html-media/">archives</a>).
</p><p>
Publication as an Editor's Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr>
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.
</p><p>
This document was produced by
a group
operating under the
<a href="https://www.w3.org/Consortium/Patent-Policy/"><abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
<abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a rel="disclosure" href="https://www.w3.org/2004/01/pp-impl/40318/status">public list of any patent
disclosures</a>
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
<a href="https://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential
Claim(s)</a> must disclose the information in accordance with
<a href="https://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section
6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
</p><p>This document is governed by the <a id="w3c_process_revision" href="https://www.w3.org/2018/Process-20180201/">1 February 2018 <abbr title="World Wide Web Consortium">W3C</abbr> Process Document</a>.
</p></section><nav id="toc"><h2 class="introductory" id="table-of-contents">Table of Contents</h2><ol class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a href="#webm-mime-parameters" class="tocxref"><span class="secno">2. </span>MIME-type parameters</a></li><li class="tocline"><a href="#webm-init-segments" class="tocxref"><span class="secno">3. </span>Initialization Segments</a></li><li class="tocline"><a href="#webm-media-segments" class="tocxref"><span class="secno">4. </span>Media Segments</a></li><li class="tocline"><a href="#webm-random-access-points" class="tocxref"><span class="secno">5. </span>Random Access Points</a></li><li class="tocline"><a href="#conformance" class="tocxref"><span class="secno">6. </span>Conformance</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">7. </span>Acknowledgments</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">A. </span>References</a><ol class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">A.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">A.2 </span>Informative references</a></li></ol></li></ol></nav>
<section id="introduction">
<!--OddPage--><h2 id="x1-introduction"><span class="secno">1. </span>Introduction</h2>
<p>This specification describes a byte stream format based on the WebM container format [<cite><a class="bibref" href="#bib-WEBM">WEBM</a></cite>]. It defines the MIME-type parameters used to signal codecs, and provides
the necessary format specific definitions for <a href="index.html#init-segment">initialization segments</a>, <a href="index.html#media-segment">media segments</a>, and <a href="index.html#random-access-point">random access points</a> required by
the <a href="index.html#byte-stream-formats">byte stream formats section</a> of the Media Source Extensions spec.</p>
</section>
<section id="webm-mime-parameters">
<!--OddPage--><h2 id="x2-mime-type-parameters"><span class="secno">2. </span>MIME-type parameters</h2>
<p>This section specifies the parameters that can be used in the MIME-type passed to <code><a href="index.html#dom-mediasource-istypesupported">isTypeSupported()</a></code> or <code><a href="index.html#dom-mediasource-addsourcebuffer">addSourceBuffer()</a></code>.</p>
<dl>
<dt>codecs</dt>
<dd>
A comma separated list of codec IDs used to specify what codecs will be used in the byte stream.
<table class="old-table">
<thead>
<tr>
<th>Codec ID</th>
<th>Valid with "audio/webm"</th>
<th>Valid with "video/webm"</th>
</tr>
</thead>
<tbody>
<tr>
<td>vorbis</td>
<td>true</td>
<td>true</td>
</tr>
<tr>
<td>opus</td>
<td>true</td>
<td>true</td>
</tr>
<tr>
<td>vp8</td>
<td>false</td>
<td>true</td>
</tr>
<tr>
<td>vp9</td>
<td>false</td>
<td>true</td>
</tr>
<tr>
<td>vp09... as described in the VP Codec ISO Media File Format Binding document[<cite><a class="bibref" href="#bib-VP09CODECSPARAMETERSTRING">VP09CODECSPARAMETERSTRING</a></cite>]</td>
<td>false</td>
<td>true</td>
</tr>
</tbody>
</table>
<div class="note" id="issue-container-generatedID"><div role="heading" class="note-title marker" id="h-note" aria-level="3"><span>Note</span></div><div class="">
Implementations <em class="rfc2119" title="SHOULD">SHOULD</em> support all of the codec IDs mentioned in the table above.
</div></div>
<div class="note" id="issue-container-generatedID-0"><div role="heading" class="note-title marker" id="h-note-0" aria-level="3"><span>Note</span></div><div class="">
Implementations <em class="rfc2119" title="SHOULD">SHOULD</em> encourage applications to prefer the "vp09..." codec ID over "vp9". The "vp09..." format provides detailed profile and color information, enabling implementations to give more accurate answers for codec support.
</div></div>
<p>Examples of valid MIME-types with a codecs parameter.</p>
<ul>
<li>audio/webm;codecs="vorbis"</li>
<li>video/webm;codecs="vorbis"</li>
<li>video/webm;codecs="vp8"</li>
<li>video/webm;codecs="vp8,vorbis"</li>
<li>video/webm;codecs="vp9,opus"</li>
<li>video/webm;codecs="vp09.00.10.08"</li>
<li>video/webm;codecs="vp09.02.10.10.01.09.16.09.01,opus"</li>
</ul>
</dd>
</dl>
</section>
<section id="webm-init-segments">
<!--OddPage--><h2 id="x3-initialization-segments"><span class="secno">3. </span>Initialization Segments</h2>
<p>A WebM <a href="index.html#init-segment">initialization segment</a> <em class="rfc2119" title="MUST">MUST</em> contain a subset of the elements at the start of a typical WebM file.</p>
<p>The user agent <em class="rfc2119" title="MUST">MUST</em> run the <a href="index.html#sourcebuffer-append-error">append error algorithm</a> if any of the following conditions are not met:</p>
<ol>
<li>The <a href="index.html#init-segment">initialization segment</a> <em class="rfc2119" title="MUST">MUST</em> start with an <a href="http://www.webmproject.org/docs/container/#ebml-basics">EBML Header</a> element, followed by a <a href="http://www.webmproject.org/docs/container/#segment">Segment</a> header.</li>
<li>The size value in the <a href="http://www.webmproject.org/docs/container/#segment">Segment</a> header <em class="rfc2119" title="MUST">MUST</em> signal an "unknown size" or contain a value large enough to include the <a href="http://www.webmproject.org/docs/container/#segment-information">Segment Information</a> and <a href="http://www.webmproject.org/docs/container/#track">Tracks</a> elements that follow.</li>
<li>A <a href="http://www.webmproject.org/docs/container/#segment-information">Segment Information</a> element and a <a href="http://www.webmproject.org/docs/container/#track">Tracks</a> element <em class="rfc2119" title="MUST">MUST</em> appear, in that order, after the <a href="http://www.webmproject.org/docs/container/#segment">Segment</a> header and before any further <a href="http://www.webmproject.org/docs/container/#ebml-basics">EBML Header</a> or <a href="http://www.webmproject.org/docs/container/#cluster">Cluster</a> elements.
</li>
</ol>
<p>The user agent <em class="rfc2119" title="MUST">MUST</em> accept and ignore any elements other than an <a href="http://www.webmproject.org/docs/container/#ebml-basics">EBML Header</a> or a <a href="http://www.webmproject.org/docs/container/#cluster">Cluster</a> that occur before, in between, or after the <a href="http://www.webmproject.org/docs/container/#segment-information">Segment Information</a> and
<a href="http://www.webmproject.org/docs/container/#track">Tracks</a> elements.</p>
<p>The user agent <em class="rfc2119" title="MUST">MUST</em> source attribute values for id, kind, label and language for <code><a href="https://www.w3.org/TR/html51/semantics-embedded-content.html#audiotrack-audiotrack">AudioTrack</a></code>, <code><a href="https://www.w3.org/TR/html51/semantics-embedded-content.html#videotrack-videotrack">VideoTrack</a></code> and
<code><a href="https://www.w3.org/TR/html51/semantics-embedded-content.html#texttrack-texttrack">TextTrack</a></code> objects as described for WebM in the in-band tracks spec [<cite><a class="bibref" href="#bib-INBANDTRACKS">INBANDTRACKS</a></cite>].</p>
</section>
<section id="webm-media-segments">
<!--OddPage--><h2 id="x4-media-segments"><span class="secno">4. </span>Media Segments</h2>
<p>A WebM <a href="index.html#media-segment">media segment</a> is a single <a href="http://www.webmproject.org/docs/container/#cluster">Cluster</a> element.</p>
<p>The user agent uses the following rules when interpreting content in a <a href="http://www.webmproject.org/docs/container/#cluster">Cluster</a>:</p>
<ol>
<li>The TimecodeScale in the <a href="#webm-init-segments">WebM initialization segment</a> most recently appended applies to all timestamps in the <a href="http://www.webmproject.org/docs/container/#cluster">Cluster</a></li>
<li>The Timecode element in the <a href="http://www.webmproject.org/docs/container/#cluster">Cluster</a> contains a <a href="index.html#presentation-timestamp">presentation timestamp</a> in TimecodeScale units.</li>
<li>The Cluster header <em class="rfc2119" title="MAY">MAY</em> contain an "unknown" size value. If it does then the end of the cluster is reached when another <a href="http://www.webmproject.org/docs/container/#cluster">Cluster</a> header or an element header that indicates the start
of an <a href="#webm-init-segments">WebM initialization segment</a> is encountered.</li>
</ol>
<p>The user agent <em class="rfc2119" title="MUST">MUST</em> run the <a href="index.html#sourcebuffer-append-error">append error algorithm</a> if any of the following conditions are not met:</p>
<ol>
<li>The Timecode element <em class="rfc2119" title="MUST">MUST</em> appear before any Block & SimpleBlock elements in a <a href="http://www.webmproject.org/docs/container/#cluster">Cluster</a>.</li>
<li>Block & SimpleBlock elements are in time increasing order consistent with the <a href="http://www.webmproject.org/docs/container/#webm-guidelines">WebM spec</a>.</li>
<li>If the most recent <a href="#webm-init-segments">WebM initialization segment</a> describes multiple tracks, then blocks from all the tracks <em class="rfc2119" title="MUST">MUST</em> be interleaved in time increasing order. At least one block from all audio and video
tracks <em class="rfc2119" title="MUST">MUST</em> be present.</li>
</ol>
<p>The user agent <em class="rfc2119" title="MUST">MUST</em> accept and ignore <a href="http://www.webmproject.org/docs/container/#cueing-data">Cues</a> or <a href="http://www.webmproject.org/docs/container/#chapters">Chapters</a> elements that follow a <a href="http://www.webmproject.org/docs/container/#cluster">Cluster</a> element.</p>
</section>
<section id="webm-random-access-points">
<!--OddPage--><h2 id="x5-random-access-points"><span class="secno">5. </span>Random Access Points</h2>
<p>Either a SimpleBlock element with its Keyframe flag set, or a BlockGroup element having no ReferenceBlock elements, signals the location of a <a href="index.html#random-access-point">random access point</a> for that track. The order of multiplexed blocks within a <a href="index.html#media-segment">media segment</a> <em class="rfc2119" title="MUST">MUST</em> conform to the <a href="http://www.webmproject.org/docs/container/#muxer-guidelines">WebM Muxer Guidelines</a>.</p>
</section>
<section id="conformance"><!--OddPage--><h2 id="x6-conformance"><span class="secno">6. </span>Conformance</h2><p>
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples,
and notes in this specification are non-normative. Everything else in this specification is
normative.
</p><p id="respecRFC2119">The key words <em class="rfc2119">MAY</em>, <em class="rfc2119">MUST</em>, and <em class="rfc2119">SHOULD</em> are
to be interpreted as described in [<cite><a class="bibref" href="#bib-RFC2119">RFC2119</a></cite>].
</p></section>
<section id="acknowledgements">
<!--OddPage--><h2 id="x7-acknowledgments"><span class="secno">7. </span>Acknowledgments</h2>
The editors would like to thank Chris Cunningham, Frank Galligan, and Philip Jägenstedt for their contributions to this specification.
</section>
<section id="references" class="appendix"><!--OddPage--><h2 id="a-references"><span class="secno">A. </span>References</h2><section id="normative-references"><h3 id="a-1-normative-references"><span class="secno">A.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-MEDIA-SOURCE">[MEDIA-SOURCE]</dt><dd><a href="https://www.w3.org/TR/media-source/"><cite>Media Source Extensions™</cite></a>. Matthew Wolenetz; Jerry Smith; Mark Watson; Aaron Colwell; Adrian Bateman. W3C. 17 November 2016. W3C Recommendation. URL: <a href="https://www.w3.org/TR/media-source/">https://www.w3.org/TR/media-source/</a>
</dd><dt id="bib-RFC2119">[RFC2119]</dt><dd><a href="https://tools.ietf.org/html/rfc2119"><cite>Key words for use in RFCs to Indicate Requirement Levels</cite></a>. S. Bradner. IETF. March 1997. Best Current Practice. URL: <a href="https://tools.ietf.org/html/rfc2119">https://tools.ietf.org/html/rfc2119</a>
</dd><dt id="bib-WEBM">[WEBM]</dt><dd><a href="https://www.webmproject.org/docs/container/"><cite>WebM Container Guidelines</cite></a>. The WebM Project. 26 April 2016. URL: <a href="https://www.webmproject.org/docs/container/">https://www.webmproject.org/docs/container/</a>
</dd></dl></section><section id="informative-references"><h3 id="a-2-informative-references"><span class="secno">A.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-INBANDTRACKS">[INBANDTRACKS]</dt><dd><a href="https://dev.w3.org/html5/html-sourcing-inband-tracks/"><cite>Sourcing In-band Media Resource Tracks from Media Containers into HTML</cite></a>. Bob Lund; Silvia Pfeiffer. W3C. URL: <a href="https://dev.w3.org/html5/html-sourcing-inband-tracks/">https://dev.w3.org/html5/html-sourcing-inband-tracks/</a>
</dd><dt id="bib-VP09CODECSPARAMETERSTRING">[VP09CODECSPARAMETERSTRING]</dt><dd><a href="http://www.webmproject.org/vp9/mp4/#codecs-parameter-string"><cite>VP Codec ISO Media File Format Binding</cite></a>. Frank Galligan; Kilroy Hughes; Thomás Inskip; David Ronca. WebM Project. URL: <a href="http://www.webmproject.org/vp9/mp4/#codecs-parameter-string">http://www.webmproject.org/vp9/mp4/#codecs-parameter-string</a>
</dd></dl></section></section><p role="navigation" id="back-to-top"><a href="#title"><abbr title="Back to Top">↑</abbr></a></p><script src="https://www.w3.org/scripts/TR/2016/fixup.js"></script></body></html>