aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/conflicting/web/media/formats/index.html
blob: d6a5d3753e2354ccb535f0a940286b28f493ac25 (plain)
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
---
title: 'HTML的媒体支持:audio和video元素'
slug: Web/HTML/Supported_media_formats
tags:
  - HTML Media Video Audio
translation_of: Web/Media/Formats
translation_of_original: Web/HTML/Supported_media_formats
---
<p><span class="seoSummary">    {{HTMLElement("audio")}} 和 {{HTMLElement("video")}}是浏览器内置的播放音频或视频的元素;</span>视频和音频编解码器用来处理视频和音频,不同的编解码器提供不同级别的压缩率和分辨率;一个容器封装格式(多媒体容器格式)用来存储和传输编码后的视频和音频(如果视频带有音轨则同时;编解码器和多媒体容器格式有非常多的组合;尽管只有很少部分和WEB相关;<br>
    <br>
     由于专利的问题,不同的浏览器对HTML5的video和audio有不同的规范和实现;WEB上的媒体格式领域受到在包括美国、欧盟在内的许多国家的专利法的保护和制约;本文将讨论了不同的编解码器和封装格式在WEB上的各种组合,包括在桌面设备和其他设备上的浏览器的支持情况。</p>

<p>     想要在HTML5中播放视频,并且主流浏览器的最新版本中支持良好;可以使用WebM 和 MPEG H.264 AAC 编码格式;像下面一样使用{{HTMLElement("source")}}元素</p>

<pre class="brush: html">&lt;video controls&gt;
  &lt;source src="somevideo.webm" type="video/webm"&gt;
  &lt;source src="somevideo.mp4" type="video/mp4"&gt;
  I'm sorry; your browser doesn't support HTML5 video in WebM with VP8/VP9 or MP4 with H.264.
  &lt;!-- You can embed a Flash player here, to play your mp4 video in older browsers --&gt;
&lt;/video&gt;
</pre>

<h2 id="sect1"></h2>

<h2 id="Ogg_Theora_Vorbis">Ogg Theora Vorbis</h2>

<p>Ogg容器格式使用Theora视频编解码器和 Vorbis音频编解码器。在的桌面和移动端的Gecko(Firefox),Chrome和Opera;Safari(非IOS)可以通过添加扩展支持;但是不支持IE</p>

<p>WebM在可选的情况下是优选项;因为它能提供更高的压缩比,并且被更多的浏览器所支持;而Ogg容器格式主要用于支持低版本的浏览器(比如: Firefox 3.5/3.6就不支持WebM,但是支持Ogg)</p>

<p>Ogg的授权情况和WebM类似</p>

<p>Gecko提供下面3种Ogg文件格式的MIME type:</p>

<p><strong>audio/ogg</strong></p>

<p>一个只包含音频的Ogg文件</p>

<p><strong>video/ogg</strong></p>

<p>一个包含视频或音频的Ogg文件</p>

<p><strong>application/ogg</strong></p>

<p>一个不指定内容的Ogg文件,当你不知道内容的时候可以选择</p>

<h2 id="Ogg_Opus">Ogg Opus</h2>

<p>Ogg容器可以通过使用<a href="http://www.opus-codec.org/">Opus codec</a>包含音频编解码器;用来支持Gecko 15.0 (Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12) 或更新的版本</p>

<h2 id="Ogg_FLAC">Ogg FLAC</h2>

<p>Ogg容器可以通过使用<a href="https://xiph.org/flac/index.html">FLAC codec</a>包含音频编解码器;用来支持Gecko 51.0 {{geckoRelease("51.0")}} 或更新的版本, 但只适用于桌面浏览器</p>

<h2 id="MP4_FLAC">MP4 FLAC</h2>

<p>从Firefox 51开始,你就可以使用FLAC编解码器播放MP4了,不管你有没有安装 <a href="/en-US/docs/Web/API/Media_Source_Extensions_API">MediaSource Extensions</a>和DRM 扩展支持。</p>

<h2 id="MP3">MP3</h2>

<p>MP3 audio 编码对应浏览器&lt;audio&gt;的支持。其中Firefox/Firefox for Android/Firefox OS需要操作系统本身提供了MP3的解码器;而IE,Chrome,Safari则原生支持</p>

<h2 id="WAVE_PCM">WAVE PCM</h2>

<p>WAVE容器使用PCM音频编解码器;桌面和移动Gecko (Firefox) a、 Safari都支持,WAVE容器中的文件后缀为 ".wav"。</p>

<div class="note">See <a class="external" href="http://www.rfc-editor.org/rfc/rfc2361.txt">RFC 2361</a> for the WAVE codec registry.</div>

<p>Gecko提供下面4种WAVE文件格式的MIME type:</p>

<ul>
 <li><code>audio/wave</code> (preferred; does not work in Chrome)</li>
 <li><code>audio/wav</code></li>
 <li><code>audio/x-wav</code></li>
 <li><code>audio/x-pn-wav</code></li>
</ul>

<h2 id="FLAC">FLAC</h2>

<p>FLAC容器格式使用 FLAC 音频编解码器 (<a href="https://xiph.org/flac/index.html">FLAC codec</a>);桌面端受到Gecko Firefox 51.0 (Firefox 51.0 / Thunderbird 51.0 / SeaMonkey 2.48)的支持,文件后缀为 “.flac”</p>

<p>Gecko提供下面4种FLAC文件格式的MIME type:</p>

<ul>
 <li><code>audio/flac</code> (preferred)</li>
 <li><code>audio/x-flac</code></li>
</ul>

<h2 id="Media_Source_Extensions_(MSE)">Media Source Extensions (MSE)</h2>

<p>媒体源扩展(MSE)是一个W3C工作草案,计划扩展{{domxref("HTMLMediaElement")}}以允许JavaScript生成用于重放的媒体流。 允许JavaScript生成流以适应各种应用场景,如自适应流和时移实时流。 MSE支持仅限于MP4和WebM容器,但编解码器支持因底层平台而异。</p>

<p>例如:可以使用JavaScript实现MPEG-DASH,同时将解码解压缩到MSE。<br>
 <br>
 For example, <a href="http://msopentech.com/blog/2014/01/03/streaming_video_player/">you could implement MPEG-DASH using JavaScript while offloading the decoding to MSE</a>.</p>

<div class="note">
<p><strong>时间位移(Time shifting)</strong> 功能主要是将即时内容,录制在存储器上,可以暂时离开,一定时间回来后,可以从离开的时间通过内部的重播。</p>
</div>

<h2 id="浏览器兼容情况">浏览器兼容情况</h2>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>3.0</td>
   <td>{{CompatGeckoDesktop("1.9.1")}}</td>
   <td>9.0</td>
   <td>10.50</td>
   <td>3.1</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: PCM in WAVE</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatGeckoDesktop("1.9.1")}}</td>
   <td>{{CompatNo}}</td>
   <td>10.50</td>
   <td>3.1</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: Vorbis in WebM</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatGeckoDesktop("2.0")}}</td>
   <td>{{CompatNo}}</td>
   <td>10.60</td>
   <td>3.1<sup>[1]</sup></td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: Streaming Vorbis/Opus in WebM via MSE</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoDesktop("36.0")}}<sup>[2]</sup></td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: Vorbis in Ogg</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatGeckoDesktop("1.9.1")}}</td>
   <td>{{CompatNo}}</td>
   <td>10.50</td>
   <td>{{CompatNo}}</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: MP3</td>
   <td>{{CompatVersionUnknown}}<sup>[4]</sup></td>
   <td>{{CompatVersionUnknown}}<sup>[5]</sup></td>
   <td>9.0</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>3.1</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: MP3 in MP4</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: AAC in MP4</td>
   <td>{{CompatVersionUnknown}}<sup>[6]</sup></td>
   <td>{{CompatVersionUnknown}}<sup>[7]</sup></td>
   <td>9.0</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>3.1</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: Opus in Ogg</td>
   <td>27.0</td>
   <td>{{CompatGeckoDesktop("15.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: FLAC</td>
   <td>56.0</td>
   <td>{{CompatGeckoDesktop("51")}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>11</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: FLAC in Ogg</td>
   <td>56.0</td>
   <td>{{CompatGeckoDesktop("51")}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>: VP8 and Vorbis in WebM</td>
   <td>6.0</td>
   <td>{{CompatGeckoDesktop("2.0")}}</td>
   <td>9.0<sup>[8]</sup></td>
   <td>10.60</td>
   <td>3.1<sup>[9]</sup></td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>: VP9 and Opus in WebM</td>
   <td>29.0</td>
   <td>{{CompatGeckoDesktop("28.0")}}<sup>[36]</sup></td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>: Streaming WebM via MSE</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoDesktop("42.0")}}<sup>[35]</sup></td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>: Theora and Vorbis in Ogg</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatGeckoDesktop("1.9.1")}}</td>
   <td>{{CompatNo}}</td>
   <td>10.50</td>
   <td>{{CompatNo}}</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>: H.264 and MP3 in MP4</td>
   <td>{{CompatVersionUnknown}}<sup>[3]</sup></td>
   <td>{{CompatVersionUnknown}}<sup>[10]</sup></td>
   <td>9.0</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>: H.264 and AAC in MP4</td>
   <td>{{CompatVersionUnknown}}<sup>[4]</sup></td>
   <td>{{CompatVersionUnknown}}<sup>[11]</sup></td>
   <td>9.0</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>3.1</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>: FLAC in MP4</td>
   <td>62.0</td>
   <td>{{CompatGeckoDesktop(51)}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td>any other format</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>3.1<sup>[12]</sup></td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android Webview</th>
   <th>Chrome for Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>Firefox OS (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Opera Mini</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatChrome(29)}}</td>
   <td>24.0</td>
   <td>1.0.1</td>
   <td>10.0</td>
   <td>11.0</td>
   <td>{{CompatVersionUnknown}}<sup>[13]</sup></td>
   <td>3.2</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: PCM in WAVE</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>24.0</td>
   <td>1.0.1</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatVersionUnknown}}<sup>[14]</sup></td>
   <td>3.2</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: Vorbis in WebM</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>24.0</td>
   <td>1.0.1</td>
   <td>{{CompatNo}}</td>
   <td>11.0</td>
   <td>{{CompatVersionUnknown}}<sup>[15]</sup></td>
   <td>{{CompatNo}}</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: Streaming Vorbis in WebM via MSE</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: Vorbis in Ogg</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>24.0</td>
   <td>1.0.1</td>
   <td>{{CompatNo}}</td>
   <td>11.0</td>
   <td>{{CompatVersionUnknown}}<sup>[16]</sup></td>
   <td>{{CompatNo}}</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: MP3</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}<sup>[17]</sup></td>
   <td>{{CompatVersionUnknown}}<sup>[18]</sup></td>
   <td>10.0</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}<sup>[19]</sup></td>
   <td>3.2</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: MP3 in MP4</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: AAC in MP4</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}<sup>[20]</sup></td>
   <td>{{CompatVersionUnknown}}<sup>[21]</sup></td>
   <td>10.0</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}<sup>[22]</sup></td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
  <tr>
   <td><code>&lt;audio&gt;</code>: Opus in Ogg</td>
   <td>{{CompatNo}}</td>
   <td>71.0</td>
   <td>24.0</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatVersionUnknown}}<sup>[23]</sup></td>
   <td>{{CompatNo}}</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>:  VP8 and Vorbis in WebM</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatChrome(29)}}</td>
   <td>24.0</td>
   <td>1.0.1</td>
   <td>{{CompatNo}}</td>
   <td>16.0</td>
   <td>{{CompatVersionUnknown}}<sup>[24]</sup></td>
   <td>{{CompatNo}}</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>: VP9 and Opus in WebM</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>: Streaming WebM via MSE</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoDesktop("42.0")}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>: Theora and Vorbis in Ogg</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>24.0</td>
   <td>1.0.1</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatVersionUnknown}}<sup>[25]</sup></td>
   <td>{{CompatNo}}</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>:  H.264 and MP3 in MP4</td>
   <td>{{CompatVersionUnknown}}<sup>[26]</sup></td>
   <td>{{CompatChrome(29)}}</td>
   <td>24.0<sup>[33]</sup></td>
   <td>{{CompatVersionUnknown}}<sup>[27]</sup></td>
   <td>10.0</td>
   <td>16.0<sup>[28]</sup></td>
   <td>{{CompatVersionUnknown}}<sup>[29]</sup></td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>: H.264 and AAC in MP4</td>
   <td>{{CompatVersionUnknown}}<sup>[30]</sup></td>
   <td>{{CompatChrome(29)}}</td>
   <td>24.0<sup>[34]</sup></td>
   <td>{{CompatVersionUnknown}}<sup>[31]</sup></td>
   <td>10.0</td>
   <td>16.0<sup>[28]</sup></td>
   <td>{{CompatVersionUnknown}}<sup>[32]</sup></td>
   <td>3.2</td>
  </tr>
  <tr>
   <td><code>&lt;video&gt;</code>: FLAC in MP4</td>
   <td>{{CompatUnknown}}</td>
   <td>62.0</td>
   <td>{{CompatGeckoMobile(58)}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
  <tr>
   <td>any other format</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<p>[1] Must be installed separately.</p>

<p>[2] In Nightly/Dev Edition only.</p>

<p>[3] Only on platforms that don't support H.264.</p>

<p>[4] AAC is only supported in the MP4 container. Not in Chromium.</p>

<p>[5] To avoid patent issues, support for MP3 is not built directly into Firefox. Instead it relies on support from the OS. Firefox supports this format on the following platforms: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=825153">Windows Vista</a>+ since Firefox 22.0, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=748351">Android</a> since Firefox 20.0, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=714408">Firefox OS</a> since Firefox 15.0, Linux since Firefox 26.0 (relies on GStreamer codecs) and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=851290">OS X 10.7</a> since Firefox 35.0.</p>

<p>[6] Main only. Not in Chromium. AAC is only supported in the MP4 container.</p>

<p>[7] AAC is only supported in the MP4 container. To avoid patent issues, support for MPEG 4 and AAC is not built directly into Firefox. Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4). Firefox supports these formats on the following platforms: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=825153">Windows Vista</a>+ since Firefox 22.0, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=748351">Android</a> since Firefox 20.0, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=714408">Firefox OS</a> since Firefox 15.0, Linux since Firefox 26.0 (relies on GStreamer codecs) and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=851290">OS X 10.7</a> since Firefox 35.0.</p>

<p>[8] <a class="external" href="http://blogs.msdn.com/b/ie/archive/2011/03/16/html5-video-update-webm-for-ie9.aspx">must be installed separately</a>, e.g. <a class="external" href="http://tools.google.com/dlpage/webmmf/">WebM MF</a>.</p>

<p>[9] Must be installed separately, e.g. <a class="external" href="http://perian.org/">Perian</a>.</p>

<p>[10] To avoid patent issues, support for MPEG 4, H.264 and MP3 is not built directly into Firefox. Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4). Firefox supports these formats on the following platforms: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=825153">Windows Vista</a>+ since Firefox 22.0, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=748351">Android</a> since Firefox 20.0, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=714408">Firefox OS</a> since Firefox 15.0, Linux since Firefox 26.0 (relies on GStreamer codecs) and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=851290">OS X 10.7</a> since Firefox 35.0.</p>

<p>[11] AAC is only supported in the MP4 container. To avoid patent issues, support for MPEG 4, H.264 and AAC is not built directly into Firefox. Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4). Firefox supports these formats on the following platforms: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=825153">Windows Vista</a>+ since Firefox 22.0, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=748351">Android</a> since Firefox 20.0, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=714408">Firefox OS</a> since Firefox 15.0, Linux since Firefox 26.0 (relies on GStreamer codecs) and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=851290">OS X 10.7</a> since Firefox 35.0.</p>

<p>[12] Plays all formats available via QuickTime.</p>

<p>[13] Opera Mini itself doesn't support any video or audio, but any video or audio is passed to the device to play if it has support for that format. Opera Mobile also does this with unsupported formats.</p>

<p>[14] Opera Mini itself doesn't support any video or audio, but any video or audio is passed to the device to play if it has support for that format. Opera Mobile also does this with unsupported formats.</p>

<p>[15] Opera Mini itself doesn't support any video or audio, but any video or audio is passed to the device to play if it has support for that format. Opera Mobile also does this with unsupported formats.</p>

<p>[16] Opera Mini itself doesn't support any video or audio, but any video or audio is passed to the device to play if it has support for that format. Opera Mobile also does this with unsupported formats.</p>

<p>[17] To avoid patent issues, support for MP3 is not built directly into Firefox Mobile (Android). Instead it relies on support from the OS or hardware.</p>

<p>[18] To avoid patent issues, support for MP3 is not built directly into Firefox OS. Instead it relies on support from the OS or hardware.</p>

<p>[19] Opera Mini itself doesn't support any video or audio, but any video or audio is passed to the device to play if it has support for that format. Opera Mobile also does this with unsupported formats.</p>

<p>[20] AAC is only supported in the MP4 container. To avoid patent issues, support for MPEG 4 and AAC is not built directly into Firefox Mobile (Android). Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4).</p>

<p>[21] AAC is only supported in the MP4 container. To avoid patent issues, support for MPEG 4 and AAC is not built directly into Firefox OS. Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4).</p>

<p>[22] Opera Mini itself doesn't support any video or audio, but any video or audio is passed to the device to play if it has support for that format. Opera Mobile also does this with unsupported formats. AAC is only supported in the MP4 container.</p>

<p>[23] Opera Mini itself doesn't support any video or audio, but any video or audio is passed to the device to play if it has support for that format. Opera Mobile also does this with unsupported formats.</p>

<p>[24] Opera Mini itself doesn't support any video or audio, but any video or audio is passed to the device to play if it has support for that format. Opera Mobile also does this with unsupported formats.</p>

<p>[25] Opera Mini itself doesn't support any video or audio, but any video or audio is passed to the device to play if it has support for that format. Opera Mobile also does this with unsupported formats.</p>

<p>[26] To get the default Android browser to play H.264 video, you need to jump through some hoops, as <a href="http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/">explained by Peter Gasston</a>.</p>

<p>[27] In Firefox OS 1.0.1, when detecting <code>&lt;video&gt;</code> support for different formats, <code>HTMLMediaElement.prototype.canPlayType</code> incorrectly reports <code>true</code> for h.264 video whereas in actual fact h.264 is not supported. In Firefox OS 1.1 this problem has been fixed.<br>
 To avoid patent issues, support for MPEG 4, H.264 and MP3 is not built directly into Firefox Mobile (Android) and Firefox OS. Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4).</p>

<p>[28] Partial since 11.0. AAC is only supported in the MP4 container.</p>

<p>[29] Opera Mini itself doesn't support any video or audio, but any video or audio is passed to the device to play if it has support for that format. Opera Mobile also does this with unsupported formats.</p>

<p>[30] AAC is only supported in the MP4 container. To get the default Android browser to play H.264 video, you need to jump through some hoops, as <a href="http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/">explained by Peter Gasston</a>.</p>

<p>[31] In Firefox OS 1.0.1, when detecting <code>&lt;video&gt;</code> support for different formats, <code>HTMLMediaElement.prototype.canPlayType</code> incorrectly reports <code>true</code> for h.264 video whereas in actual fact h.264 is not supported. In Firefox OS 1.1 this problem has been fixed. AAC is only supported in the MP4 container.<br>
 To avoid patent issues, support for MPEG 4, H.264 and ACC is not built directly into Firefox OS. Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4).</p>

<p>[32] Opera Mini itself doesn't support any video or audio, but any video or audio is passed to the device to play if it has support for that format. Opera Mobile also does this with unsupported formats. AAC is only supported in the MP4 container.</p>

<p>[33] To avoid patent issues, support for MPEG 4, H.264 and MP3 is not built directly into Firefox Mobile (Android). Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4).</p>

<p>[34] To avoid patent issues, support for MPEG 4, H.264 and ACC is not built directly into Firefox Mobile (Android). Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4).</p>

<p>[35] VP8/VP9 video codecs are only available in MSE when H.264 hardware decoders are not available. Checking for availability via MediaSource.isTypeSupported() is recommended.</p>

<p>[36] Starting in Firefox 46, when attempting to initiate a WebRTC call using {{domxref("RTCPeerConnection.createOffer()")}} uses VP9 by default; in the past, VP8 was the default video format.</p>

<h2 id="See_also">See also</h2>

<ul>
 <li><a class="internal" href="/en-US/docs/Web/Guide/HTML/Using_HTML5_audio_and_video">Using audio and video in Firefox</a></li>
 <li><a href="http://bluishcoder.co.nz/2013/08/21/html-media-support-in-firefox.html">HTML media support in Firefox</a></li>
 <li><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/#media-elements">Media elements</a> (HTML 5 specification)</li>
 <li>{{HTMLElement("video")}}</li>
 <li>{{HTMLElement("audio")}}</li>
 <li><a class="external" href="http://dev.opera.com/articles/view/introduction-html5-video/#codecs">Video codecs in Opera</a></li>
 <li><a class="external" href="http://msdn.microsoft.com/en-us/library/ff975073%28v=VS.85%29.aspx">Video codecs in Internet Explorer</a></li>
 <li><a class="external" href="http://msdn.microsoft.com/en-us/library/ff975061%28v=vs.85%29.aspx">Audio codecs in Internet Explorer</a></li>
 <li><a href="http://www.chromium.org/audio-video">Audio &amp; Video codecs in Chrome</a></li>
</ul>