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
|
---
title: Форматы медиа поддерживаемые HTML audio и video элементами
slug: Web/HTML/Поддерживаемые_медиа_форматы
translation_of: Web/Media/Formats
translation_of_original: Web/HTML/Supported_media_formats
---
<p><span class="seoSummary">{{ HTMLElement("audio") }} и {{ HTMLElement("video") }} элементы предоставляют поддержку для проигрывания аудио и видео медиа без нужды в плагинах. </span>Формат медиафайла состоит из контейнера, содержащего один или несколько потоков данных, закодированных с использованием формата сжатия, называемого кодеком. Контейнер идентифицируется по расширению файла. Потоки внутри контейнера имеют несколько типов, которые могут включать в себя видео, аудио, данные или титры. Один контейнер (т. е. медиафайл) может содержать несколько потоков одного типа. В аудио- и видео- потоках находятся кодеки. Кодек — сокращенние слов "кодера-декодер" — является алгоритмом сжатия данных в файле. Каждый тип контейнера имеет только определенные кодеки, которые он поддерживает.</p>
<p>Важно понять, почему в Интернете нужны разные медиаформаты. По разным причинам, выходящим за рамки данной статьи, различные браузеры поддерживают разные медиаформаты. Кроме того, область медиаформатов в Интернете сильно пострадала от патентного права во многих странах, включая США и страны ЕС. (Примечания к патентам в этой статье предоставляются как есть, так и без каких-либо гарантий.) В этой статье рассматриваются наиболее важные для Интернета форматы, включая поддержку в браузерах как мобильных, так и десктопных .</p>
<p> </p>
<h3 id="Отображение_медиа">Отображение медиа</h3>
<p> </p>
<p>Ниже краткий обзор того, как медиа-элементы отображаются в HTML. Более подробную информацию смотрите в статьях для каждого элемента.</p>
<p>HTML5 поддерживает несколько элементов мультимедиа. Элементы {{HTMLElement ("video")}} и {{HTMLElement ("audio")}} могут использоваться отдельно или в сочетании с элементом {{HTMLElement ("source")}}. Наш краткий пример отображает это. Хотя элементы <code><video></code> и <code><audio></code> содержат атрибуты src, этот пример использует элемент <code><source></code> для предоставления видеофайлов в нескольких форматах, позволяя каждому браузеру выбирать элемент, который он поддерживает.</p>
<pre class="brush: html"><video controls>
<source src="somevideo.webm" type="video/webm">
<source src="somevideo.mp4" type="video/mp4">
Сожалею; ваш браузер не поддерживает HTML5 видео в WebM с VP8 или MP4 с H.264.
<!-- Ты можешь встроить флеш плеер сюда, для воспроизведения твоего mp4 видео в старых браузерах -->
</video>
</pre>
<h2 id="WebM">WebM</h2>
<p>Формат <a class="external" href="http://www.webmproject.org/" title="http://www.webmproject.org/">WebM</a> основан на ограниченной версии формата контейнера <a class="external" href="http://corecodec.com/products/matroska" title="http://corecodec.com/products/matroska">Matroska</a>. Формат всегда использует видео кодек VP8 или VP9 и аудио кодек Vorbis или Opus. WebM нативно поддерживается в десктопной и мобильной версиях Gecko (Firefox), Chrome и Opera. Поддержка формата может быть добавлена в Internet Explorer и Safari (но не на iOS) установкой плагина. Нативная поддержка VP9 WebM в Edge сейчас в стадии разработки.</p>
<p>Формат WebM, а точнее видеокодек VP8, подвергся претензиям в нарушениях патентов от ряда компаний, отвечающих на требования, MPEG LA о фомировании списка патентов, но при этом <a href="http://www.businesswire.com/news/home/20130307006192/en/Google-MPEG-LA-Announce-Agreement-Covering-VP8">MPEG LA дала согласие на лицензирование этих патентов для Google</a> под лицензией "<a href="http://xiphmont.livejournal.com/59893.html?thread=310261#t310261">perpetual, transferable, royalty free license"</a>. Это фактически означает, что все известные патенты, относящиеся к формату WebM лицензированы для свободного использования всеми.</p>
<p>Движок Gecko распознаёт следующие типы MIME как файлы WebM:</p>
<dl>
<dt><code>video/webm</code></dt>
<dd>файл WebM, содержащий видео (а возможно, также и аудио).</dd>
<dt><code>audio/webm</code></dt>
<dd>Файл WebM, содержащий только аудиоданные.</dd>
</dl>
<h2 id="Ogg_Theora_Vorbis">Ogg Theora Vorbis</h2>
<p>The Ogg container format with the Theora video codec and the Vorbis audio codec is supported in desktop/mobile Gecko (Firefox), Chrome, and Opera, and support for the format can be added to Safari (but not on iOS) by installing an add-on. The format is not supported in Internet Explorer in any way.</p>
<p>WebM is generally preferred over Ogg Theora Vorbis when available, because it provides a better compression to quality ratio and is supported in more browsers. The Ogg format can however be used to support older browser versions (for example Firefox 3.5/3.6 don't support WebM, but do support Ogg.)</p>
<p>The patent situation of Theora is similar to that of WebM.</p>
<p>You can learn more about creating Ogg media by reading the <a class="external" href="http://en.flossmanuals.net/ogg-theora/" title="http://en.flossmanuals.net/ogg-theora/">Theora Cookbook</a>.</p>
<p>Gecko recognizes the following MIME types as Ogg files:</p>
<dl>
<dt><code>audio/ogg</code></dt>
<dd>An Ogg file containing only audio.</dd>
<dt><code>video/ogg</code></dt>
<dd>An ogg file containing video (and possibly also audio).</dd>
<dt><code>application/ogg</code></dt>
<dd>An Ogg file with unspecified content. Using one of the other two MIME types is preferred, but you can use this if you don't know what the contents of the file are.</dd>
</dl>
<h2 id="Ogg_Opus">Ogg Opus</h2>
<p>The Ogg container can also contain audio encoded using the <a class="external" href="http://www.opus-codec.org/" title="http://www.opus-codec.org/">Opus codec</a>. Support for this is available in Gecko 15.0 {{ geckoRelease("15.0") }} and later, on desktop and mobile browsers.</p>
<h2 id="MP4_H.264_(AAC_or_MP3)">MP4 H.264 (AAC or MP3)</h2>
<p>The MP4 container format with the H.264 video codec and the AAC audio codec is natively supported by desktop/mobile Internet Explorer, Safari and Chrome, but Chromium and Opera do not support the format. IE and Chrome also support the MP3 audio codec in the MP4 container, but Safari does not. Firefox/Firefox for Android/Firefox OS supports the format in some cases, but only when a third-party decoder is available, and the device hardware can handle the profile used to encode the MP4.</p>
<div class="note">
<p><strong>Note</strong>: MP4s encoded with a high profile will not run on lower end hardware, such as low end Firefox OS phones.</p>
</div>
<p>The MPEG media formats are covered by patents, which are not freely licensed. All the necessary licenses can be bought from MPEG LA. Since H.264 is currently not a royalty free format, it is unfit for the open web platform, according to Mozilla [<a class="external" href="http://shaver.off.net/diary/2010/01/23/html5-video-and-codecs/" title="http://shaver.off.net/diary/2010/01/23/html5-video-and-codecs/">1</a>, <a class="external" href="http://robert.ocallahan.org/2010/01/video-freedom-and-mozilla_23.html" title="http://robert.ocallahan.org/2010/01/video-freedom-and-mozilla_23.html">2</a>], Google [<a class="external" href="http://blog.chromium.org/2011/01/html-video-codec-support-in-chrome.html" title="http://blog.chromium.org/2011/01/html-video-codec-support-in-chrome.html">1</a>, <a class="external" href="http://blog.chromium.org/2011/01/more-about-chrome-html-video-codec.html" title="http://blog.chromium.org/2011/01/more-about-chrome-html-video-codec.html">2</a>] and Opera. However, since royalty free formats are not supported by Internet Explorer and Safari, <a href="https://hacks.mozilla.org/2012/03/video-mobile-and-the-open-web/" title="https://hacks.mozilla.org/2012/03/video-mobile-and-the-open-web/">Mozilla has decided to support the format anyway</a>, and Google never fulfilled their promise to <span class="external">remove support for it in Chrome</span>.</p>
<h2 id="MP3">MP3</h2>
<p>MP3 аудио формат (.mp3, <code>audio/mpeg</code>; в отличии от выше MP3 аудио в случае MP4 контейнера) поддерживается в <code><audio></code> Firefox/Firefox для Android/Firefox OS когда операционая система обеспечивает MP3 декодер, и Internet Explorer, Chrome и Safari.</p>
<h2 id="WAVE_PCM">WAVE PCM</h2>
<p>The WAVE container format, with the PCM audio codec (WAVE codec "1") is supported by desktop/mobile Gecko (Firefox) and Safari. Files in the WAVE container format typically end with the ".wav" extension.</p>
<div class="note"><strong>Note: </strong>See <a class="external" href="http://www.rfc-editor.org/rfc/rfc2361.txt" title="http://www.rfc-editor.org/rfc/rfc2361.txt">RFC 2361</a> for the WAVE codec registry.</div>
<p>Gecko recognizes the following MIME types as WAVE audio files:</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="Media_Source_Extensions_(MSE)">Media Source Extensions (MSE)</h2>
<p><a href="https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html">Media Source Extensions</a> is a W3C working draft that plans to extend {{ domxref("HTMLMediaElement") }} to allow JavaScript to generate media streams for playback. Allowing JavaScript to generate streams facilitates a variety of use cases like adaptive streaming and time shifting live streams. This currently has experimental support in Firefox desktop, and other browsers too.<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>Note</strong>: Time Shifting is the process of consuming a live stream some time after it happened.</p>
</div>
<h2 id="Browser_compatibility">Browser compatibility</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><audio></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><audio></code>: Vorbis in WebM</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>{{ CompatGeckoDesktop("2.0") }}</td>
<td>{{ CompatNo() }}</td>
<td>10.60</td>
<td>3.1 (must be installed separately)</td>
</tr>
<tr>
<td><code><audio></code>: Streaming Vorbis in WebM via <a href="https://w3c.github.io/media-source/">Media Source Extensions (MSE)</a></td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatGeckoDesktop("36.0") }} in Nightly/Dev edition only</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
</tr>
<tr>
<td><code><audio></code>: Vorbis in Ogg</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>{{ CompatGeckoDesktop("1.9.1") }}</td>
<td>{{ CompatNo() }}</td>
<td>10.50</td>
<td>3.1 (must be installed separately, e.g. <a class="external" href="http://www.xiph.org/quicktime/" title="http://www.xiph.org/quicktime/">XiphQT</a>)</td>
</tr>
<tr>
<td><audio>: MP3</td>
<td>{{ CompatVersionUnknown() }} (Not in Chromium)</td>
<td>Partial (see below)</td>
<td>9.0</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>3.1</td>
</tr>
<tr>
<td><code><audio></code>: MP3 in MP4</td>
<td>
<p>{{ CompatUnknown() }}</p>
</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatVersionUnknown() }}</td>
</tr>
<tr>
<td><code><audio></code>: AAC in MP4</td>
<td>
<p>{{ CompatVersionUnknown() }} (Main only) (Not in Chromium)</p>
</td>
<td>
<p>Partial (see below)</p>
</td>
<td>9.0</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>3.1</td>
</tr>
<tr>
<td><code><audio></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><video></code>: VP8 and Vorbis in WebM</td>
<td>6.0</td>
<td>{{ CompatGeckoDesktop("2.0") }}</td>
<td>9.0 (<a class="external" href="http://blogs.msdn.com/b/ie/archive/2011/03/16/html5-video-update-webm-for-ie9.aspx" title="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/" title="http://tools.google.com/dlpage/webmmf/">WebM MF</a>)</td>
<td>10.60</td>
<td>3.1 (must be installed separately, e.g. <a class="external" href="http://perian.org/" title="http://perian.org/">Perian</a>)</td>
</tr>
<tr>
<td><code><video></code>: VP9 and Opus in WebM</td>
<td>29.0</td>
<td>{{ CompatGeckoDesktop("28.0") }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
</tr>
<tr>
<td><code><video></code>: Streaming VP9 and Opus/VP8 and Opus in WebM via <a href="https://w3c.github.io/media-source/">Media Source Extensions (MSE)</a></td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatGeckoDesktop("36.0") }} in Nightly/Dev edition only</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
</tr>
<tr>
<td><code><video></code>: Theora and Vorbis in Ogg</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>{{ CompatGeckoDesktop("1.9.1") }}</td>
<td>{{ CompatNo() }}</td>
<td>10.50</td>
<td>3.1 (must be installed separately, e.g. <a class="external" href="http://www.xiph.org/quicktime/" title="http://www.xiph.org/quicktime/">XiphQT</a>)</td>
</tr>
<tr>
<td><code><video></code>: H.264 and MP3 in MP4</td>
<td>
<p>{{ CompatVersionUnknown() }} (Not in Chromium)</p>
</td>
<td>Partial (see below)</td>
<td>9.0</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>{{ CompatVersionUnknown() }}</td>
</tr>
<tr>
<td><code><video></code>: H.264 and AAC in MP4</td>
<td>
<p>{{ CompatVersionUnknown() }} (Not in Chromium)</p>
</td>
<td>Partial (see below)</td>
<td>9.0</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>3.1</td>
</tr>
<tr>
<td>any other format</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
<td>3.1 (plays all formats available via QuickTime)</td>
</tr>
</tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>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>
<th>Chrome for Android</th>
</tr>
<tr>
<td>Basic support</td>
<td>2.3</td>
<td>24.0</td>
<td>1.0.1</td>
<td>10.0</td>
<td>11.0</td>
<td>Partial (see below)</td>
<td>3.2</td>
<td>29.0</td>
</tr>
<tr>
<td><code><audio></code>: PCM in WAVE</td>
<td>{{ CompatUnknown() }}</td>
<td>24.0</td>
<td>1.0.1</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
<td>Partial (see below)</td>
<td>3.2</td>
<td>{{ CompatUnknown() }}</td>
</tr>
<tr>
<td><code><audio></code>: Vorbis in WebM</td>
<td>{{ CompatUnknown() }}</td>
<td>24.0</td>
<td>1.0.1</td>
<td>{{ CompatNo() }}</td>
<td>11.0</td>
<td>Partial (see below)</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatUnknown() }}</td>
</tr>
<tr>
<td><code><audio></code>: Streaming Vorbis in WebM via <a href="https://w3c.github.io/media-source/">Media Source Extensions (MSE)</a></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><audio></code>: Vorbis in Ogg</td>
<td>{{ CompatUnknown() }}</td>
<td>24.0</td>
<td>1.0.1</td>
<td>{{ CompatNo() }}</td>
<td>11.0</td>
<td>Partial (see below)</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatUnknown() }}</td>
</tr>
<tr>
<td><code><audio></code>: MP3</td>
<td>{{ CompatUnknown() }}</td>
<td>Partial (see below)</td>
<td>Partial (see below)</td>
<td>10.0</td>
<td>{{ CompatUnknown() }}</td>
<td>Partial (see below)</td>
<td>3.2</td>
<td>{{ CompatUnknown() }}</td>
</tr>
<tr>
<td><code><audio></code>: MP3 in MP4</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
</tr>
<tr>
<td><code><audio></code>: AAC in MP4</td>
<td>{{ CompatUnknown() }}</td>
<td>Partial (see below)</td>
<td>Partial (see below)</td>
<td>10.0</td>
<td>{{ CompatUnknown() }}</td>
<td>Partial (see below)</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>{{ CompatUnknown() }}</td>
</tr>
<tr>
<td><code><audio></code>: Opus in Ogg</td>
<td>{{ CompatNo() }}</td>
<td>24.0</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
<td>Partial (see below)</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
</tr>
<tr>
<td><code><video></code>: VP8 and Vorbis in WebM</td>
<td>2.3</td>
<td>24.0</td>
<td>1.0.1</td>
<td>{{ CompatNo() }}</td>
<td>16.0</td>
<td>Partial (see below)</td>
<td>{{ CompatNo() }}</td>
<td>29.0</td>
</tr>
<tr>
<td><code><video></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><video></code>: Streaming VP9 and Opus/VP8 and Opus in WebM via <a href="https://w3c.github.io/media-source/">Media Source Extensions (MSE)</a></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><video></code>: Theora and Vorbis in Ogg</td>
<td>{{ CompatNo() }}</td>
<td>24.0</td>
<td>1.0.1</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
<td>Partial (see below)</td>
<td>{{ CompatNo() }}</td>
<td>{{ CompatNo() }}</td>
</tr>
<tr>
<td><code><video></code>: H.264 and MP3 in MP4</td>
<td>Partial (see below)</td>
<td>24.0</td>
<td>Partial (see below)</td>
<td>10.0</td>
<td>Partial since 11.0, full since 16.0</td>
<td>Partial (see below)</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>29.0</td>
</tr>
<tr>
<td><code><video></code>: H.264 and AAC in MP4</td>
<td>Partial (see below)</td>
<td>24.0</td>
<td>Partial (see below)</td>
<td>10.0</td>
<td>Partial since 11.0, full since 16.0</td>
<td>Partial (see below)</td>
<td>3.2</td>
<td>29.0</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>Notes:</p>
<ul>
<li>AAC is only supported in the MP4 container.</li>
<li>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.</li>
<li>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>.</li>
<li>In Firefox OS 1.0.1, when detecting <code><video></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.</li>
<li>To avoid patent issues, support for MPEG 4, H.264, MP3 and AAC is not built directly into Firefox on desktop and 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). Firefox desktop supports these formats on the following platforms:</li>
</ul>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Platform</th>
<th scope="col">Firefox version</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=825153" title="https://bugzilla.mozilla.org/show_bug.cgi?id=825153">Windows Vista</a>+</td>
<td>22.0+</td>
</tr>
<tr>
<td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=748351" title="https://bugzilla.mozilla.org/show_bug.cgi?id=748351">Android</a></td>
<td>20.0+</td>
</tr>
<tr>
<td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=714408" title="https://bugzilla.mozilla.org/show_bug.cgi?id=714408">Firefox OS</a></td>
<td>15.0+</td>
</tr>
<tr>
<td>Linux</td>
<td>
<p>26.0+ (relies on GStreamer codecs)</p>
</td>
</tr>
<tr>
<td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=851290">OS X 10.7+</a></td>
<td>35.0+</td>
</tr>
</tbody>
</table>
<ul>
<li><a class="external" href="http://dev.opera.com/articles/view/introduction-html5-video/#codecs" title="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" title="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" title="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" title="http://www.chromium.org/audio-video">Audio & Video codecs in Chrome</a></li>
</ul>
<h2 id="See_also">See also</h2>
<ul>
<li><a class="internal" href="/en/Using_HTML5_audio_and_video" title="En/Using audio and video in Firefox">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" title="http://www.whatwg.org/specs/web-apps/current-work/#media-elements">Media elements</a> (HTML 5 specification)</li>
<li><code><a class="internal" href="/en/HTML/Element/Video" title="En/HTML/Element/Video">video</a></code></li>
<li><a class="internal" href="/en/HTML/Element/Audio" title="En/HTML/Element/Audio"><code>audio</code></a></li>
</ul>
|