Android支持的媒体格式
Android平台支持的基本媒体格式列表如下表:
Type |
Format |
Encoder |
Decoder |
Details |
File Type(s) Supported |
Audio |
AAC LC/LTP |
|
X |
Mono/Stereo content in any combination of standard bit rates up to 160 kbps and sampling rates from 8 to 48kHz |
3GPP (.3gp) and MPEG-4 (.mp4, .m4a). No support for raw AAC (.aac) |
HE-AACv1 (AAC+) |
|
X | |||
HE-AACv2 (enhanced AAC+) |
|
X | |||
AMR-NB |
X |
X |
4.75 to 12.2 kbps sampled @ 8kHz |
3GPP (.3gp) | |
AMR-WB |
|
X |
9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16kHz |
3GPP (.3gp) | |
MP3 |
|
X |
Mono/Stereo 8-320Kbps constant (CBR) or variable bit-rate (VBR) |
MP3 (.mp3) | |
MIDI |
|
X |
MIDI Type 0 and 1. DLS Version 1 and 2. XMF and Mobile XMF. Support for ringtone formats RTTTL/RTX, OTA, and iMelody |
Type 0 and 1 (.mid, .xmf, .mxmf). Also RTTTL/RTX (.rtttl, .rtx), OTA (.ota), and iMelody (.imy) | |
Ogg Vorbis |
|
X |
|
Ogg (.ogg) | |
PCM/WAVE |
|
X |
8- and 16-bit linear PCM (rates up to limit of hardware) |
WAVE (.wav) | |
Image |
JPEG |
X |
X |
Base+progressive |
JPEG (.jpg) |
GIF |
|
X |
|
GIF (.gif) | |
PNG |
|
X |
|
PNG (.png) | |
BMP |
|
X |
|
BMP (.bmp) | |
Video |
H.263 |
X |
X |
|
3GPP (.3gp) and MPEG-4 (.mp4) |
H.264 AVC |
|
X |
|
3GPP (.3gp) and MPEG-4 (.mp4) | |
MPEG-4 SP |
|
X |
|
3GPP (.3gp) |
除了上面列出的基本的媒体格式外,不同硬件的手机还可能具有自己特有的一些媒体格式的编解码能力,这一点需要开发者留意。
T-Mobile G1 额外支持的媒体格式:
Type |
Format |
Encoder |
Decoder |
Comment |
File Type(s) Supported |
Audio |
WMA |
|
X |
Supports WMA standard L1-L3: · L1: 64 kbps - 161 kbps @ 44.1kHz · L2: <=161 kbps <=48 kHz · L3: <385 kbps <=48 kHz Mono and stereo profiles with 16-bits per sample. Decoder does not support WMA Pro, Lossless, or Speech codecs. |
Windows Media Audio (.wma) |
Video |
WMV |
|
X |
Versions 7, 8 and 9. Simple profile only |
Windows Media Video (.wmv) |
H.264AVC |
|
X |
On the G1, this decoder is limited to baseline profile up to 480x320, and 600 kbps average bitrate for the video stream. |
3GPP (.3gp) and MPEG-4 (.mp4) |
参考资料:
Android1.5SDK官方文档:android-sdk-windows-1.5_r3/docs/guide/appendix/media-formats.html