Android Supported Media Formats

來源:互聯網
上載者:User
Network Protocols

The following network protocols are supported for audio and video playback:

  • RTSP (RTP, SDP)
  • HTTP/HTTPS progressive streaming
  • HTTP/HTTPS live streaming draft protocol:
    • MPEG-2 TS media files only
    • Protocol version 3 (Android 4.0 and above)
    • Protocol version 2 (Android 3.x)
    • Not supported before Android 3.0

Note: HTTPS is not supported before Android 3.1.

Core Media Formats

The table below describes the media format support built into the Android platform. Note that any given mobile device may provide support for additional formats or file types not listed in the table.

Note: Media codecs that are not guaranteed to be available on all Android platform versions are accordingly noted in parentheses—for example "(Android 3.0+)".

Table 1. Core media format and codec support.

Type Format / Codec Encoder Decoder Details Supported File Type(s) / Container Formats
Audio AAC LC/LTP Mono/Stereo content in any combination of standard bit rates up to 160 kbps and sampling rates from 8 to 48kHz • 3GPP (.3gp) • MPEG-4 (.mp4, .m4a) • ADTS raw AAC (.aac, decode in Android 3.1+, encode in Android 4.0+, ADIF not supported) • MPEG-TS (.ts, not seekable, Android 3.0+)
HE-AACv1 (AAC+)  
HE-AACv2 (enhanced AAC+)  
AMR-NB 4.75 to 12.2 kbps sampled @ 8kHz   3GPP (.3gp)
AMR-WB 9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16kHz   3GPP (.3gp)
FLAC   (Android 3.1+) Mono/Stereo (no multichannel). Sample rates up to 48 kHz (but up to 44.1 kHz is recommended on devices with 44.1 kHz output, as the 48 to 44.1 kHz downsampler does not include a low-pass filter). 16-bit recommended; no dither applied for 24-bit.   FLAC (.flac) only
MP3   Mono/Stereo 8-320Kbps constant (CBR) or variable bit-rate (VBR)   MP3 (.mp3)
MIDI   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) • RTTTL/RTX (.rtttl, .rtx) • OTA (.ota) • iMelody (.imy)
Vorbis     • Ogg (.ogg) • Matroska (.mkv, Android 4.0+)
PCM/WAVE   8- and 16-bit linear PCM (rates up to limit of hardware)   WAVE (.wav)
Image JPEG Base+progressive   JPEG (.jpg)
GIF     GIF (.gif)
PNG   PNG (.png)
BMP     BMP (.bmp)
WEBP (Android 4.0+) (Android 4.0+)     WebP (.webp)
Video H.263   • 3GPP (.3gp) • MPEG-4 (.mp4)
H.264 AVC (Android 3.0+) Baseline Profile (BP) • 3GPP (.3gp) • MPEG-4 (.mp4) • MPEG-TS (.ts, AAC audio only, not seekable, Android 3.0+)
MPEG-4 SP     3GPP (.3gp)
VP8   (Android 2.3.3+) Streamable only in Android 4.0 and above • WebM (.webm) • Matroska (.mkv, Android 4.0+)
Video Encoding Recommendations

Table 2, below, lists examples of video encoding profiles and parameters that the Android media framework supports for playback. In addition to these encoding parameter recommendations, a device's available video recording profiles can be used as a proxy for media playback capabilities. These profiles can be inspected using the CamcorderProfile class, which is available since API level 8.

Table 2. Examples of supported video encoding parameters.

  SD (Low quality) SD (High quality) HD (Not available on all devices)
Video codec H.264 Baseline Profile H.264 Baseline Profile H.264 Baseline Profile
Video resolution 176 x 144 px 480 x 360 px 1280 x 720 px
Video frame rate 12 fps 30 fps 30 fps
Video bitrate 56 Kbps 500 Kbps 2 Mbps
Audio codec AAC-LC AAC-LC AAC-LC
Audio channels 1 (mono) 2 (stereo) 2 (stereo)
Audio bitrate 24 Kbps 128 Kbps 192 Kbps

For video content that is streamed over HTTP or RTSP, there are additional requirements:

  • For 3GPP and MPEG-4 containers, the moov atom must precede any mdat atoms, but must succeed the      ftyp atom.
  • For 3GPP, MPEG-4, and WebM containers, audio and video samples corresponding to the same time offset may be no more than 500 KB apart.      To minimize this audio/video drift, consider interleaving audio and video in smaller chunk sizes.

linking: http://developer.android.com/guide/appendix/media-formats.html

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.