List of Supported Audio Formats on Android

Android supports a wide variety of audio formats and codecs that allow you to play music and other audio content on your device.

Here is a comprehensive list of the audio formats and codecs that are supported across different versions of Android.

AAC

AAC stands for Advanced Audio Coding. It was designed to improve on MP3 audio quality while reducing file sizes. AAC is the default audio format for YouTube, iTunes stores, Nintendo Switch etc.

AAC encoders can optimize the encoding process for quality or speed. Two primary encoders are Fraunhofer FDK AAC the Apple AAC encoder.

On the Android platform, AAC decoding is natively supported on versions 3.1 and above. The Android MediaCodec API decodes the AAC bitstream into PCM audio.

AAC metadata is available through MP4 containers. Android can directly access relevant ID3 tag-equivalent data to organize AAC music files.

Here are the different types of AAC support:

  • AAC LC – Supported for encoding and decoding mono/stereo/5.0/5.1 content with standard sampling rates from 8 to 48 kHz. Supported container formats include 3GPP, MPEG-4, ADTS, and MPEG-TS.
  • HE-AACv1 (AAC+) – Supported for decoding starting with Android 4.1. Provides efficient audio compression.
  • HE-AACv2 (enhanced AAC+) – Supported for decoding starting with Android 2.3.3. Provides improved compression efficiency over AAC+.
  • AAC ELD (enhanced low delay AAC) – Supported for encoding and decoding on Android 4.1 and higher. Optimized for low latency audio playback.

AMR

AMR (Adaptive Multi-Rate) audio is commonly used for speech encoding in telephony:

  • AMR-NB – Supported for encoding and decoding mono content at bitrates from 4.75 to 12.2 kbps and sampling rate of 8 kHz. Common container formats are 3GPP and AMR.
  • AMR-WB – Supported for encoding and decoding at 9 bitrates from 6.6 to 23.85 kbps with 16 kHz sampling rate.

FLAC

FLAC stands for Free Lossless Audio Codec. As an open and royalty-free codec, it lets you compress audio without losing any information.

FLAC uses linear prediction and other techniques to exactly encode the original audio while reducing file sizes by 30-50% compared to uncompressed WAV or AIFF.

Android does not have native FLAC support built-in. FLAC playback requires third-party apps. These apps include custom FLAC decoders compiled for Android to play the files.

FLAC metadata like album covers, song details etc. are stored in the file headers. FLAC-compatible Android apps parse this metadata when playing music.

FLAC support on Android includes:

  • Decoding supported since Android 3.1.
  • Encoding supported since Android 4.1.
  • Sampling rates up to 48 kHz.
  • 16/24-bit depth.
  • Mono/stereo (no multichannel surround sound).
  • Common container formats are FLAC and MPEG-4.

MIDI

Android provides native support for MIDI (Musical Instrument Digital Interface) playback for ringtones, music, and other use cases. This includes:

  • MIDI file types 0 and 1.
  • DLS (Downloadable Sounds) versions 1 and 2.
  • Mobile XMF and XMF file formats.
  • RTTTL (Ringtone Text Transfer Language) and RTX ringtones.
  • OTA (Over-The-Air) and iMelody ringtone formats.

MP3

MP3 stands for MPEG-1/2 Audio Layer III. It uses perceptual audio coding and psychoacoustic models to discard audio information that is less audible to human hearing. This allows it to drastically reduce the raw PCM audio data bandwidth.

MP3 encoders vary in their complexity and efficiency. LAME and Fraunhofer are two of the most popular and well-tested MP3 encoder software.

On Android, MP3 decoding is natively supported in the Android media framework. The Android AudioTrack class handles playback directly from the compressed MP3 bitstream.

MP3 metadata like ID3 tags is also parsed by the framework. Apps can access metadata fields like title, artist, album etc. to correctly display and organize MP3s.

MP3 is the most widely supported audio format on Android with decoding supported across all versions:

  • Mono and stereo content.
  • Constant or variable bitrates from 8 to 320 kbps.
  • Common container formats are MP3, MPEG-4, Matroska, and more.

Opus

The Opus audio format provides efficient compression and low latency. Support includes:

  • Decoding supported since Android 5.0.
  • Encoding supported since Android 10.
  • Commonly used in Ogg and Matroska containers.

PCM/WAVE

PCM (Pulse Code Modulation) is an uncompressed digital audio format. PCM support on Android includes:

  • Decoding supported across all versions of Android.
  • Encoding supported since Android 4.1.
  • 8/16-bit linear PCM with sampling rates up to hardware limits.
  • Common container format is WAVE.

Vorbis

Vorbis is an open-source audio format that performs lossy audio compression. It was developed as a patent-free alternative to commercial formats like MP3 and AAC.

The reference Vorbis encoder uses entropy encoding techniques to compress audio data. Several tuned Vorbis encoders like aoTuV also exist.

Android has included native Vorbis support since Android 1.5 through the OpenCore media framework. The Android AudioTrack class can directly render decoded PCM audio from a Vorbis bitstream.

Vorbis metadata information like title, artist etc. is available from the Ogg container format used by Vorbis files. Android can access this metadata to organize music collections.

Android supports Vorbis in the following ways:

  • Decoding supported across all versions.
  • Commonly used in Ogg, Matroska and MPEG-4 containers.

Supported Media Containers

In addition to codecs, Android also supports playback of audio content from the following media container formats:

  • 3GPP (.3gp)
  • MPEG-4 (.mp4, .m4a)
  • ADTS (.aac)
  • MPEG-TS (.ts)
  • FLAC (.flac)
  • AMR (.amr)
  • MP3 (.mp3)
  • Ogg (.ogg)
  • Matroska (.mkv)
  • WAVE (.wav)

This allows you to play audio files in these containers even if the codec support varies across Android versions.

Audio Encoding

In addition to audio playback, many Android devices also let you capture and encode audio using built-in microphones. Here are some of the common audio encoding capabilities:

  • AAC LC encoding supported across all versions.
  • AMR-NB and AMR-WB encoding supported on most devices.
  • FLAC encoding supported since Android 4.1.
  • PCM encoding supported since Android 4.1.
  • Opus encoding supported since Android 10.
  • Sampling rates for raw PCM encoding up to 8000, 16000 and 44100 Hz.

This allows you to record audio and save it natively using these codecs on your Android device.

Audio Playback Features

In addition to format support, Android also provides some additional audio playback capabilities and features:

  • Audio Focus – Manages audio playback across multiple apps to determine which app should have control over audio output.
  • Volume Shaper – Allows you to shape the playback volume curve over time instead of just setting a constant volume level.
  • Virtualizer and BassBoost – Audio effects to spatialize the sound and boost bass frequencies.
  • Visualizer – Provides a visualization of the audio waveform/spectrum during playback.

These features allow Android apps to deliver robust audio playback experiences.

Bluetooth Audio Support

Android provides extensive support for streaming audio over Bluetooth to speakers, headphones, hearing aids and other external devices:

  • The Android Bluetooth API allows apps to connect to external Bluetooth devices and stream audio.
  • High quality Bluetooth audio codecs such as LDAC, aptX, aptX HD and AAC are supported for excellent listening experiences.
  • Bluetooth HFP, A2DP and LE profiles are supported for maximum compatibility.

This seamless Bluetooth integration allows you to enjoy your music everywhere wirelessly.

USB Digital Audio

Android supports digital audio output over USB allowing audio to be output digitally to external USB DACs (digital-to-analog converters):

  • USB Audio Class 2.0 support allows audio to be transmitted digitally over USB to external DACs and amplifiers.
  • UAC 2.0 supports up to 8 channels with up to 32-bit/384 kHz of lossless PCM audio.
  • UAC 2.0 provides lower latency for pro audio applications.

This allows Android devices to connect to external USB audio equipment for pristine playback quality.

Professional Audio

In addition to consumer playback, Android also includes capabilities tailored for professional audio applications:

  • Low latency audio pipeline for pro audio playback and musical instruments.
  • Feature for audio apps to output exclusive audio streams with lowest latency.
  • High-performance, low-latency audio APIs for pro audio apps.
  • Support for USB microphones and USB headphones designed for ultra low latency.

These pro audio features enable Android devices to be used for audio production and live performance applications.

Multi-Room Audio

Android offers multi-room audio playback capabilities that allow music to be synchronized across multiple speakers and devices:

  • Cast framework lets apps “cast” audio to groups of Cast-enabled speakers in sync.
  • Wi-Fi Aware helps discover speakers for multi-room playback over Wi-Fi.
  • Fast audio switching for moving audio seamlessly between speakers.
  • Group audio control from notifications using MediaSession APIs.

This allows multi-room, whole-home audio synchronized across Android phones, tablets, speakers, TVs, and other Cast-enabled devices.

Audio Input Latency

Low latency audio input is also supported:

  • Native audio APIs provide direct access to audio inputs.
  • AudtioFlinger service reduces recording pipeline delays.
  • Superpowered Audio SDK provides sub-10ms mic latency.
  • ART techniques like ahead-of-time compilation minimize input lag.

These capabilities allow for responsive experiences with live audio input.

Audio Capabilities API

Android provides the AudioCapabilities API for querying device audio capabilities:

  • Check if formats like AAC 5.1, FLAC, OPUS etc. are supported.
  • Query sampling rates, bit depths, channel counts supported.
  • Verify encoding/decoding support for a format.
  • Adapt audio processing based on capabilities.

This allows tailoring the audio experience to the device and available capabilities.

Audio Attributes

The AudioAttributes API allows associating audio streams with “attributes” that determine how they should be handled by the system:

  • Usage attributes like media, voice communication, notifications, etc.
  • Flags for behavior like looping streams, low latency, etc.
  • Control how streams are routed and mixed based on their usage.
  • Ensure proper prioritization and resource allocation.

This provides fine-grained control over audio routing and processing.

Audio Focus

The audio focus system determines which app has control over audio playback resources at any given time:

  • Apps request audio focus for a specific duration.
  • Other apps are automatically ducked or paused when focus granted.
  • Focus reevaluated whenever a new request comes in.
  • Allows graceful handling of multiple simultaneous audio streams.

The audio focus API prevents multiple apps from disrupting each other’s audio output.

Audio Volume Management

Android provides various APIs for managing audio volume:

  • SetVolume API for setting media, ringtone, etc. stream volumes.
  • AdjustStreamVolume for incremental volume changes.
  • Get stream volume levels and max limits.
  • Mute/unmute specific audio streams.
  • Automatic muting during phone calls.

These APIs allow precise control over audio volume across different use cases.

Audio Playback Capture

Android allows capturing the audio being played back by other apps:

  • MediaProjection API can capture system-wide audio.
  • Call Recording API can capture voice call audio.
  • Can record audio played through speaker or wired headsets.
  • Follows relevant privacy, disclosure and consent principles.

This facilitates applications like screen recording and call recording with audio.

Surround Sound Support

Android provides native support for surround sound across various interfaces:

  • HDMI – Dolby Digital Plus and Dolby Atmos surround sound pass-through.
  • USB-C – USB Audio Device Class 3.0 multi-channel audio.
  • Bluetooth – LC3 codec supports surround sound over Bluetooth LE.
  • Native APIs – AudioTrack provides multichannel output buffer.

These capabilities allow surround sound content to be enjoyed across various playback mechanisms.

Audio Tuning and Optimization

Android OEMs often customize the audio experience on their devices:

  • Audio tuning optimized for their device speakers, mics and headphone jacks.
  • Sound enhancement technologies like Dolby Atmos.
  • Pro audio add-ons and mods tailored for musicians.
  • Latency optimizations for gaming and apps.

These audio optimizations by OEMs deliver enhanced experiences catered specifically to their devices.


Source: Supported media formats

Leave a Reply

Your email address will not be published. Required fields are marked *