forked from w3c/media-source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mpeg-audio-byte-stream-format-respec.html
186 lines (157 loc) · 10.6 KB
/
mpeg-audio-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
<!DOCTYPE html SYSTEM "about:legacy-compat">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>MPEG Audio 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 mpegContainerSpecDefinitions = {
'iso-11172-3': { fragment: 'http://www.iso.org/iso/catalogue_detail.htm?csnumber=22412', link_text: 'ISO/IEC 11172-3:1993', },
'iso-13818-3': { fragment: 'http://www.iso.org/iso/catalogue_detail.htm?csnumber=26797', link_text: 'ISO/IEC 13818-3:1998', },
'iso-14496-3': { fragment: 'http://www.iso.org/iso/catalogue_detail.htm?csnumber=53943', link_text: 'ISO/IEC 14496-3:2009', },
'id3v1': { fragment: 'http://id3.org/ID3v1', link_text: 'ID3v1', },
'id3v2': { fragment: 'http://id3.org/id3v2.3.0', link_text: 'ID3v2', },
'icecast-headers': { fragment: '#icecast-header', link_text: 'Icecast headers', },
'mpeg-mime-type': { fragment: '#mime-types', link_text: 'MIME-type', },
'mpeg-mime-types': { fragment: '#mime-types', link_text: 'MIME-types', },
'mpeg-audio-frame': { fragment: '#mpeg-audio-frame', link_text: 'MPEG Audio Frame', },
'mpeg-audio-frames': { fragment: '#mpeg-audio-frame', link_text: 'MPEG Audio Frames', },
'mpeg-audio-metadata-frames': { fragment: '#mpeg-metadata', link_text: 'Metadata Frames', },
};
mediaSourceAddDefinitionInfo("mpeg-byte-stream-format", "", mpegContainerSpecDefinitions);
})();
</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-mpeg-audio",
// if there a publicly available Editor's Draft, this is the link
edDraftURI: "https://w3c.github.io/media-source/mpeg-audio-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/mpeg-audio-byte-stream-format.html",
// editors, add as many as you like
// only "name" is required
editors: [
{ name: "Dale Curtis", url: "", company: "Google Inc.", companyURL: "http://www.google.com/" },
{ name: "Matthew Wolenetz", url: "", company: "Google Inc.", companyURL: "http://www.google.com/" },
{ name: "Aaron Colwell (until April 2015)", url: "", company: "Google Inc.", companyURL: "http://www.google.com/" },
],
mseDefGroupName: "mpeg-byte-stream-format",
mseUnusedGroupNameExcludeList: ["media-source"],
mseContributors: [
],
// 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/mpeg-audio-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 ]
};
</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">
</head>
<body>
<section id="abstract">
This specification defines a <a def-id="mse-spec"></a> [[!MEDIA-SOURCE]] byte stream format specification based on MPEG audio streams.
</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 MPEG audio streams specified in <a def-id="iso-11172-3"></a>, <a def-id="iso-13818-3"></a>, and <a def-id="iso-14496-3"></a>.</p>
<p>It defines the <a def-id="mpeg-mime-types"></a> 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. It also defines extra behaviors and state that only apply to this byte stream format.</p>
</section>
<section id="mime-types">
<h2>MIME-types</h2>
<p>This section specifies the MIME-types that may be passed to <a def-id="isTypeSupported"></a> or <a def-id="addSourceBuffer"></a> for byte streams that conform to this specification.</p>
<ul>
<li>"audio/aac" for sequences of ADTS frames, as specified in <a def-id="iso-14496-3"></a>.</li>
<li>"audio/mpeg" for MPEG-1/2/2.5 Layer I/II/III streams, as specified in <a href="http://tools.ietf.org/html/rfc3003">RFC 3003</a> [[!RFC3003]].</li>
</ul>
<p>The "codecs" MIME-type parameter MUST NOT be used with these MIME-types.</p>
</section>
<section id="mpeg-audio-frames">
<h2>MPEG Audio Frames</h2>
<p>The format of an <dfn id="mpeg-audio-frame">MPEG Audio Frame</dfn> depends on the <a def-id="mpeg-mime-type"></a> used.</p>
<ul>
<li>If the "audio/aac" MIME-type is used, an MPEG Audio Frame is a sequence of bytes that conform to the adts_frame() syntax specified in Table 1.A.5 of <a def-id="iso-14496-3"></a>.</li>
<li>If the "audio/mpeg" MIME-type is used, an MPEG Audio Frame is a sequence of bytes that conform to the frame() syntax element specified in Section 2.4.1.2 of <a def-id="iso-11172-3"></a> or the corresponding definition in <a def-id="iso-13818-3"></a>.</li>
</ul>
</section>
<section id="mpeg-metadata">
<h4>Metadata Frames</h4>
<p>Since <a def-id="id3v1"></a>, <a def-id="id3v2"></a> metadata frames, and <a def-id="icecast-headers"></a> are common in existing MPEG audio streams, implementations SHOULD gracefully handle such frames. Zero or more of these metadata frames are allowed to occur before, after, or between <a def-id="mpeg-audio-frames"></a>. Minimal implementations MUST accept, consume, and ignore these frames. More advanced implementations MAY choose to expose the metadata information via an inband <a def-id="text-track"></a> or some other mechanism.</p>
<section id="icecast">
<h3>Icecast headers</h3>
<p>There is no normative spec for <a href="http://en.wikipedia.org/wiki/Icecast">Icecast</a>/<a href="http://en.wikipedia.org/wiki/SHOUTcast">SHOUTcast</a> headers, just <a href="http://forums.radiotoolbox.com/viewtopic.php?t=74">examples</a>. For the purpose of this specification, an <dfn id="icecast-header">Icecast header</dfn> is defined as beginning with the 4 character sequence "ICY "(U+0049 I, U+0043 C, U+0059 Y, U+0020 SPACE) and ending with a pair of carriage-return line-feed sequences (U+000D CARRIAGE RETURN, U+000A LINE FEED, U+000D CARRIAGE RETURN, U+000A LINE FEED).</p>
<p class="note">Icecast headers are allowed in the byte streams because some Icecast and SHOUTcast
servers return a status line that looks like "ICY OK 200" instead of a standard HTTP status line.
User-agent network stacks typically interpret this as an HTTP 0.9 response and include the
header in the response body. Allowing these headers to appear provides a simple way to
interoperate with these servers.</p>
</section>
</section>
<section id="mpeg-segments">
<h4>Segment Definitions</h4>
<p>The MPEG audio byte stream is a combination of one or more <a def-id="mpeg-audio-frames"></a> and zero or more <a def-id="mpeg-audio-metadata-frames"></a>.</p>
<ul>
<li>Every <a def-id="mpeg-audio-frame"></a> is a <a def-id="random-access-point"></a>.</li>
<li>Every <a def-id="mpeg-audio-frame"></a> header is an <a def-id="init-segment"></a>.</li>
<li>The coded audio in each <a def-id="mpeg-audio-frame"></a> is a <a def-id="media-segment"></a>.</li>
</ul>
</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>