Android Supported Media Formats

This document describes the media codec, container, and network protocol support provided by the Android platform.

As an application developer, you are free to make use of any media codec that is available on any Android-powered device, including those provided by the Android platform and those that are device-specific. However, it is a best practice to use media encoding profiles that are device-agnostic.

Network Protocols

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

  • RTSP (RTP, SDP)
  • HTTP progressive streaming
  • HTTP live streaming draft protocol (Android 3.0 and above)

Note: HTTPS is not supported at this time.

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+)".

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) and MPEG-4 (.mp4, .m4a). No support for raw AAC (.aac)
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)
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). Also RTTTL/RTX (.rtttl, .rtx), OTA (.ota), and iMelody (.imy)
Ogg Vorbis     Ogg (.ogg)
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)
Video H.263   3GPP (.3gp) and MPEG-4 (.mp4)
H.264 AVC
(Android 3.0+)
Baseline Profile (BP) 3GPP (.3gp) and MPEG-4 (.mp4)
MPEG-4 SP     3GPP (.3gp)

Video Encoding Recommendations

Below are examples of video encoding profiles and parameters that the Android media framework supports for playback.

  • Lower quality video
    Video codec H.264 Baseline Profile
    Video resolution 176 x 144 px
    Video frame rate 12 fps
    Video bitrate 56 Kbps
    Audio codec AAC-LC
    Audio channels 1 (mono)
    Audio bitrate 24 Kbps
  • Higher quality video
    Video codec H.264 Baseline Profile
    Video resolution 480 x 360 px
    Video frame rate 30 fps
    Video bitrate 500 Kbps
    Audio codec AAC-LC
    Audio channels 2 (stereo)
    Audio bitrate 128 Kbps

In addition to the encoding parameters above, 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.

↑ Go to top