forked from w3c/media-source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
isobmff-byte-stream-format-respec.html
249 lines (212 loc) · 14.2 KB
/
isobmff-byte-stream-format-respec.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
<!DOCTYPE html SYSTEM "about:legacy-compat">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ISO BMFF Byte Stream Format</title>
<script src="https://www.w3.org/Tools/respec/respec-w3c-common" class="remove"></script>
<!--<script src="respec-w3c-common.js" class="remove"></script>-->
<script src="media-source.js" class="remove"></script>
<script class="remove">
(function() {
var isobmffContainerSpecDefinitions = {
'iso-14496-12': { fragment: 'http://standards.iso.org/ittf/PubliclyAvailableStandards/c061988_ISO_IEC_14496-12_2012.zip', link_text: 'ISO/IEC 14496-12', },
'movie-fragment-relative-addressing': { fragment: '#movie-fragment-relative-addressing', link_text: 'movie-fragment relative addressing'}
};
mediaSourceAddDefinitionInfo("isobmff-byte-stream-format", "", isobmffContainerSpecDefinitions);
})();
</script>
<script class="remove">
var respecConfig = {
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus: "ED",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "mse-byte-stream-format-isobmff",
// if there a publicly available Editor's Draft, this is the link
edDraftURI: "https://w3c.github.io/media-source/isobmff-byte-stream-format.html",
// if this is a LCWD, uncomment and set the end of its review period
// lcEnd: "2009-08-05",
//publishDate: "2015-03-09",
prevVersion: "https://www.w3.org/2013/12/byte-stream-format-registry/isobmff-byte-stream-format.html",
// editors, add as many as you like
// only "name" is required
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: "Mark Watson", url: "", company: "Netflix Inc.", companyURL: "http://www.netflix.com/" },
{ name: "Aaron Colwell (until April 2015)", url: "", company: "Google Inc.", companyURL: "http://www.google.com/" },
{ name: "Adrian Bateman (until April 2015)", url: "", company: "Microsoft Corporation", companyURL: "http://www.microsoft.com/" },
],
mseDefGroupName: "isobmff-byte-stream-format",
mseUnusedGroupNameExcludeList: ["media-source"],
mseContributors: [
"Steven Robertson",
"Kevin Streeter",
"Joe Steele",
"Michael Thornburgh",
"John Simmons",
"Jerry Smith",
"Cyril Concolato",
"David Singer",
"Chris Poole",
"Jer Noble"
],
// name of the WG
wg: "HTML Media Extensions Working Group",
// URI of the public WG page
wgURI: "https://www.w3.org/html/wg/",
// name (without the @w3c.org) of the public mailing to which comments are due
wgPublicList: "public-html-media",
// URI of the patent status for this WG, for Rec-track documents
// !!!! IMPORTANT !!!!
// This is important for Rec-track documents, do not copy a patent URI from a random
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood
// Team Contact.
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/isobmff-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: [ mediaSourceAddMainSpecDefinitionInfos, mediaSourcePreProcessor ],
// Empty definitions for objects declared in the document are here to
// prevent error messages from being displayed for references to these objects.
definitionMap: {},
postProcess: [ mediaSourcePostProcessor ],
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",
}
}
};
</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>
.iso-box { font-weight: bold; }
.iso-var { font-style: italic; }
</style>
</head>
<body>
<section id="abstract">
This specification defines a <a def-id="mse-spec"></a> [[!MEDIA-SOURCE]] byte stream format specification based on the ISO Base Media
File Format.
</section>
<section id="sotd">
<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>
</section>
<section id="introduction">
<h2>Introduction</h2>
<p>This specification defines segment formats for implementations that choose to support the ISO Base Media File Format
<a def-id="iso-14496-12"></a> [[!ISOBMFF]].</p> It defines the MIME-type parameters used to signal codecs, and provides
the necessary format specific definitions for <a def-id="init-segments"></a>, <a def-id="media-segments"></a>, and <a def-id="random-access-points"></a> required by
the <a def-id="byte-stream-formats-section"></a> of the Media Source Extensions spec.</p>
</section>
<section id="mime-parameters">
<h2>MIME-type parameters</h2>
<p>This section specifies the parameters that can be used in the MIME-type passed to <a def-id="isTypeSupported"></a> or <a def-id="addSourceBuffer"></a>.</p>
<p>MIME-types for this specification MUST conform to the rules outlined for "audio/mp4" and "video/mp4" in <a href="http://tools.ietf.org/html/rfc6381">RFC 6381</a>.
</p>
<div class="note">Implementations MAY only implement a subset of the codecs and profiles mentioned in the RFC.</div>
</section>
<section id="iso-init-segments">
<h4>Initialization Segments</h4>
<p>An ISO BMFF <a def-id="init-segment"></a> is defined in this specification as a single File Type Box (<span class="iso-box">ftyp</span>) followed by a single Movie Box (<span class="iso-box">moov</span>).</p>
<p>The user agent MUST run the <a def-id="append-decode-error-algorithm"></a> if any of the following conditions are met:</p>
<ol>
<li>A File Type Box contains a <span class="iso-var">major_brand</span> or <span class="iso-var">compatible_brand</span> that the user agent does not support.</li>
<li>A box or field in the Movie Box is encountered that violates the requirements mandated
by the <span class="iso-var">major_brand</span> or one of the
<span class="iso-var">compatible_brands</span> in the File Type Box.</li>
<li>The tracks in the Movie Box contain samples (i.e., the <span class="iso-var">entry_count</span> in the
<span class="iso-box">stts</span>, <span class="iso-box">stsc</span> or <span class="iso-box">stco</span> boxes are not set to zero).</li>
<li>A Movie Extends (<span class="iso-box">mvex</span>) box is not contained in the Movie (<span class="iso-box">moov</span>) box to indicate that Movie Fragments are to be expected.</li>
</ol>
<p>The user agent MUST support setting the offset from media composition time to movie presentation time by handling an Edit Box (<span class="iso-box">edts</span>) containing a single Edit List Box
(<span class="iso-box">elst</span>) that contains a single edit with media rate one. This edit MAY have a duration of 0 (indicating that it spans all subsequent media) or MAY have a non-zero duration
(indicating the total duration of the movie including fragments).</p>
<p>The user agent MUST support codec configurations stored out-of-band in the sample entry, and for codecs which allow codec configurations stored inband in the samples themselves, the user agent SHOULD support codec configurations stored inband.</p>
<p class="note">For example, for codecs which include SPS and PPS parameter sets, for maximum content interoperability, user agents are strongly advised to support both inband (e.g., as defined for avc3/avc4) and out-of-band (e.g., as defined for avc1/2) storage of the SPS and PPS.</p>
<p>Valid top-level boxes such as <span class="iso-box">pdin</span>, <span class="iso-box">free</span>, and <span class="iso-box">sidx</span> are
allowed to appear before the <span class="iso-box">moov</span> box. These boxes MUST be accepted and ignored by the user agent and are not
considered part of the <a def-id="init-segment"></a> in this specification.</p>
<p>The user agent MUST source attribute values for id, kind, label and language for <a def-id="audio-track"></a>, <a def-id="video-track"></a> and
<a def-id="text-track"></a> objects as described for MPEG-4 ISOBMFF in the in-band tracks spec [[INBANDTRACKS]].</p>
</section>
<section id="iso-media-segments">
<h4>Media Segments</h4>
<p>An ISO BMFF <a def-id="media-segment"></a> is defined in this specification as one optional
Segment Type Box (<span class="iso-box">styp</span>) followed by a single Movie Fragment Box
(<span class="iso-box">moof</span>) followed by one or more Media Data Boxes (<span class="iso-box">mdat</span>).
If the Segment Type Box is not present, the segment MUST conform to the brands listed in the
File Type Box (<span class="iso-box">ftyp</span>) in the <a def-id="init-segment"></a>.</p>
<p>Valid top-level boxes defined in <a def-id="iso-14496-12"></a> other than <span class="iso-box">ftyp</span>,
<span class="iso-box">moov</span>, <span class="iso-box">styp</span>, <span class="iso-box">moof</span>, and <span class="iso-box">mdat</span> are allowed to appear between the end of an
<a def-id="init-segment"></a> or <a def-id="media-segment"></a> and before the beginning of a new <a def-id="media-segment"></a>.
These boxes MUST be accepted and ignored by the user agent and are not considered part of the <a def-id="media-segment"></a> in this
specification.
</p>
<p>The user agent MUST run the <a def-id="append-decode-error-algorithm"></a> if any of the following conditions are met:</p>
<ol>
<li>A box or field in the Movie Fragment Box is encountered that violates the requirements mandated
by the <span class="iso-var">major_brand</span> or one of the
<span class="iso-var">compatible_brands</span> in the Segment Type Box in this
<a def-id="media-segment"></a> or the File Type Box in the <a def-id="init-segment"></a> if a
Segment Type Box is not present.</li>
<li>This <a def-id="media-segment"></a> contains a Segment Type Box that is not compatible with the
File Type Box in the <a def-id="init-segment"></a>.</li>
<li>The Movie Fragment Box does not contain at least one Track Fragment Box (<span class="iso-box">traf</span>).</li>
<li>The Movie Fragment Box does not use <a def-id="movie-fragment-relative-addressing"></a>.</li>
<li>External data references are being used.</li>
<li>At least one Track Fragment Box does not contain a Track Fragment Decode Time Box (<span class="iso-box">tfdt</span>)</li>
<li>The Media Data Boxes do not contain all the samples referenced by the Track Fragment Run Boxes (<span class="iso-box">trun</span>) of the Movie Fragment Box.</li>
<li>Inband parameter sets are not present in the appropriate samples and parameter sets are not present in the last initialization segment appended.</li>
</ol>
<p>A Movie Fragment Box uses <dfn id="movie-fragment-relative-addressing">movie-fragment relative addressing</dfn>
when the first Track Fragment Run(<span class="iso-box">trun</span>) box in each Track Fragment Box
has the <span class="iso-var">data-offset-present</span> flag set and either of the following
conditions are met:</p>
<ul>
<li>Every Track Fragment Box in a Movie Fragment Box has the <span class="iso-var">default-base-is-moof</span> flag set.
<p class="note">This implies that the <span class="iso-var">base-data-offset-present</span> flag
is not set.</p>
</li>
<li>The Movie Fragment Box contains a single Track Fragment Box and that box does not have the <span class="iso-var">base-data-offset-present</span> flag set.</li>
</ul>
</section>
<section id="iso-random-access-points">
<h4>Random Access Points</h4>
<p>A <a def-id="random-access-point"></a> as defined in this specification corresponds to a Stream Access Point of type 1 or 2 as defined in Annex I of <a def-id="iso-14496-12"></a>.</p>
</section>
<section id="conformance"></section>
<section id="acknowledgements">
<h2>Acknowledgments</h2>
The editors would like to thank <a def-id="contributors"></a> for their contributions to this specification.
</section>
</body>
</html>