Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Media
Stay organized with collections
Save and categorize content based on your preferences.
Media modules handle media types and codecs, interact with ExoPlayer, expose
transport controls and playback information to the framework and perform
other media-related functions.
Media components are a frequent target of attacks (many recent security bugs are
media related), so tightening security by accelerating updates for security bugs
and features should reduce the number of security bugs that can be exploited by
attacks. The media framework remains extensible; partners can continue to extend
media codecs and media format extractors.
Media modules and components
Updatable media components exist in the following modules.
For details on these modules and components, see the
Media section.
The Media module (com.android.media
) and Media Codec module
(com.android.media.swcodec
) are in APEX
format and are available for devices running Android
10 or higher.
Customization
For details on adding custom extractors and decoders, see Customizing Media
Components.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[],[],null,["# Media modules handle media types and codecs, interact with ExoPlayer, expose\ntransport controls and playback information to the framework and perform\nother media-related functions.\n\nMedia components are a frequent target of attacks (many recent security bugs are\nmedia related), so tightening security by accelerating updates for security bugs\nand features should reduce the number of security bugs that can be exploited by\nattacks. The media framework remains extensible; partners can continue to extend\nmedia codecs and media format extractors.\n\nMedia modules and components\n----------------------------\n\nUpdatable media components exist in the following modules.\n\n- **Media module.** Includes the following media components.\n\n - Media extractors handle different types of media. Each extractor is an\n individual `.so` file with a *sniffer* function to determine whether the\n extractor can handle a given media file and a *factory* function that\n creates an instance of the extractor for that media file.\n\n - `MediaSession2` APIs allow media apps to expose their transport controls\n and playback information to other processes such as the Android framework\n and other apps.\n\n - `MediaParser` APIs (new in Android 11) allow\n ExoPlayer to make efficient use of framework media container parsers to\n extract media samples from media containers.\n\n - Compatible media transcoding (new in Android 12)\n enables the platform's compatible media transcoding feature.\n\n- **Media Codecs module.** Includes updatable software Codec2 components.\n\nFor details on these modules and components, see the\n[Media](/docs/core/media) section.\n\nModule format\n-------------\n\nThe Media module (`com.android.media`) and Media Codec module\n(`com.android.media.swcodec`) are in [APEX](/docs/core/ota/apex)\nformat and are available for devices running Android\n10 or higher.\n\nCustomization\n-------------\n\nFor details on adding custom extractors and decoders, see [Customizing Media\nComponents](/docs/core/media/updatable-media)."]]