提交 e4d8b901 编写于 作者: O ojw28

Update supported-formats.md

上级 850de667
......@@ -4,11 +4,19 @@ title: Supported formats
weight: 2
---
ExoPlayer supports a wide range of media formats. When defining the formats that ExoPlayer supports, it's important to note that "media formats" are in fact defined at multiple levels. From the lowest level to the highest, these are:
* The format of the individual media samples (e.g. a frame of video or a frame of audio). We call these *sample formats*. Note that a typical video file will contain media in at least two sample formats; one for video (e.g. H.264) and one for audio (e.g. AAC).
* The format of the container that houses the media samples and associated metadata. We call these *container formats*. A media file has a single container format (e.g. MP4), which is commonly indicated by the file extension. Note that for some audio only formats (e.g. MP3), the sample and container formats may be the same.
* Adaptive streaming technologies such as DASH, SmoothStreaming and HLS. These are not media formats as such, however it's still necessary to define what level of support ExoPlayer providers.
ExoPlayer supports a wide range of media formats. When defining the formats that ExoPlayer supports,
it's important to note that "media formats" are in fact defined at multiple levels. From the lowest
level to the highest, these are:
* The format of the individual media samples (e.g. a frame of video or a frame of audio). We call
these *sample formats*. Note that a typical video file will contain media in at least two sample
formats; one for video (e.g. H.264) and one for audio (e.g. AAC).
* The format of the container that houses the media samples and associated metadata. We call these
*container formats*. A media file has a single container format (e.g. MP4), which is commonly
indicated by the file extension. Note that for some audio only formats (e.g. MP3), the sample and
container formats may be the same.
* Adaptive streaming technologies such as DASH, SmoothStreaming and HLS. These are not media formats
as such, however it's still necessary to define what level of support ExoPlayer providers.
The following sections define ExoPlayer's support at each of these levels, from highest to lowest.
......@@ -16,7 +24,10 @@ The following sections define ExoPlayer's support at each of these levels, from
### DASH ###
ExoPlayer supports DASH with the FMP4, WebM and Matroska container formats. Media streams must be demuxed, meaning that video, audio and text must be defined in distinct AdaptationSet elements in the DASH manifest. The contained sample formats must also be supported for the media to be playable. See the [sample formats](#sample-formats) section for details.
ExoPlayer supports DASH with the FMP4, WebM and Matroska container formats. Media streams must be
demuxed, meaning that video, audio and text must be defined in distinct AdaptationSet elements in
the DASH manifest. The contained sample formats must also be supported for the media to be playable.
See the [sample formats](#sample-formats) section for details.
| Feature | Supported | Comment |
|---------|:------------:|:---------------------|
......@@ -36,7 +47,10 @@ ExoPlayer supports DASH with the FMP4, WebM and Matroska container formats. Medi
### SmoothStreaming ###
ExoPlayer supports SmoothStreaming with the FMP4 container format. Media streams must be demuxed, meaning that video, audio and text must be defined in distinct StreamIndex elements in the SmoothStreaming manifest. The contained sample formats must also be supported for the media to be playable. See the [sample formats](#sample-formats) section for details.
ExoPlayer supports SmoothStreaming with the FMP4 container format. Media streams must be demuxed,
meaning that video, audio and text must be defined in distinct StreamIndex elements in the
SmoothStreaming manifest. The contained sample formats must also be supported for the media to be
playable. See the [sample formats](#sample-formats) section for details.
| Feature | Supported | Comment |
|---------|:------------:|:---------------------|
......@@ -50,7 +64,11 @@ ExoPlayer supports SmoothStreaming with the FMP4 container format. Media streams
### HLS ###
ExoPlayer supports HLS with the MPEG-TS, ADTS and MP3 container formats. The contained sample formats must also be supported for the media to be playable. See the [sample formats](#sample-formats) section for details. We recommend using DASH (or SmoothStreaming) rather than HLS where possible. You can read about some of the benefits of DASH [here](https://google.github.io/ExoPlayer/2015/05/08/the-benefits-of-dash.html).
ExoPlayer supports HLS with the MPEG-TS, ADTS and MP3 container formats. The contained sample
formats must also be supported for the media to be playable. See the
[sample formats](#sample-formats) section for details. We recommend using DASH (or SmoothStreaming)
rather than HLS where possible. You can read about some of the benefits of DASH
[here](https://google.github.io/ExoPlayer/2015/05/08/the-benefits-of-dash.html).
| Feature | Supported | Comment |
|---------|:------------:|:---------------------|
......@@ -69,7 +87,9 @@ ExoPlayer supports HLS with the MPEG-TS, ADTS and MP3 container formats. The con
## Standalone container formats ##
Media files in the following container formats can be played directly by ExoPlayer. The contained sample formats must also be supported for the media to be playable. See the [sample formats](#sample-formats) section for details.
Media files in the following container formats can be played directly by ExoPlayer. The contained
sample formats must also be supported for the media to be playable. See the
[sample formats](#sample-formats) section for details.
| Container format | Supported | Comment |
|------------------|:------------:|:---------------------|
......@@ -86,12 +106,22 @@ Media files in the following container formats can be played directly by ExoPlay
| ADTS (AAC) | YES | Not seekable* |
| Flac | YES | Using the [Flac extension][] only |
\* Seeking is unsupported because the container does not provide metadata (e.g. a sample index) to allow a media player to perform a seek in an efficient way. If seeking is required, we suggest using a more appropriate container format.
\* Seeking is unsupported because the container does not provide metadata (e.g. a sample index) to
allow a media player to perform a seek in an efficient way. If seeking is required, we suggest using
a more appropriate container format.
## Sample formats ##
By default ExoPlayer uses Android's platform decoders. Hence the supported sample formats depend on the underlying platform rather than on ExoPlayer. Supported sample formats for Android devices are documented [here](https://developer.android.com/guide/appendix/media-formats.html#core). Note that devices may provide support for additional sample formats.
In addition to using Android's platform decoders, ExoPlayer can also make use of software decoder extensions. These must be manually built and included in projects that wish to make use of them. We currently provide software decoder extensions for [VP9](https://github.com/google/ExoPlayer/tree/master/extensions/vp9), [Flac](https://github.com/google/ExoPlayer/tree/master/extensions/flac) and [Opus](https://github.com/google/ExoPlayer/tree/master/extensions/opus).
By default ExoPlayer uses Android's platform decoders. Hence the supported sample formats depend on
the underlying platform rather than on ExoPlayer. Supported sample formats for Android devices are
documented [here](https://developer.android.com/guide/appendix/media-formats.html#core). Note that
devices may provide support for additional sample formats.
In addition to using Android's platform decoders, ExoPlayer can also make use of software decoder
extensions. These must be manually built and included in projects that wish to make use of them. We
currently provide software decoder extensions for
[VP9](https://github.com/google/ExoPlayer/tree/master/extensions/vp9),
[Flac](https://github.com/google/ExoPlayer/tree/master/extensions/flac) and
[Opus](https://github.com/google/ExoPlayer/tree/master/extensions/opus).
[Flac extension]: https://github.com/google/ExoPlayer/tree/master/extensions/flac
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册