Media codecs
Stay organized with collections
Save and categorize content based on your preferences.
Beginning with Android 10 (API level 29) and higher, there are methods in
MediaCodecInfo
that
reveal more information about a codec:
isSoftwareOnly()
- Returns true if the codec runs in software only. Software codecs make no
guarantees about rendering performance.
isHardwareAccelerated()
- Returns true if a codec is accelerated by hardware.
isVendor()
- Returns true if the codec is provided by the device vendor or false if provided
by the Android platform.
isAlias()
MediaCodecList
may contain additional entries for the same underlying codec
using an alternate codec name/s (alias/es). This method returns true if the
codec in this entry is an alias for another codec.
In addition,
MediaCodec.getCanonicalName()
returns the underlying codec name for codecs created via an alias.
A performance point represents a codec's ability to render video at a specific
height, width and frame rate. For example, the UHD_60
performance point
represents Ultra High Definition video (3840x2160 pixels) rendered at 60 frames
per second.
The method
MediaCodecInfo.VideoCapabilities.getSupportedPerformancePoints()
returns a list of
PerformancePoint
entries that the codec can render or capture.
You can check whether a given PerformancePoint
covers another by calling
PerformancePoint.covers(PerformancePoint)
.
For example, UHD_60.covers(UHD_50)
returns true.
A list of performance points is provided for all hardware-accelerated codecs.
This could be an empty list if the codec does not meet even the lowest standard
performance point.
Note that devices which have been upgraded to Android 10 (API level 29) and higher without
updating the vendor image will not have performance point data, because this
data comes from the vendor HAL. In this case, getSupportedPerformancePoints()
returns null.
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-08-26 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-08-26 UTC."],[],[],null,["Beginning with Android 10 (API level 29) and higher, there are methods in\n[`MediaCodecInfo`](/reference/android/media/MediaCodecInfo) that\nreveal more information about a codec:\n\n[`isSoftwareOnly()`](/reference/android/media/MediaCodecInfo#isSoftwareOnly)\n: Returns true if the codec runs in software only. Software codecs make no\n guarantees about rendering performance.\n\n[`isHardwareAccelerated()`](/reference/android/media/MediaCodecInfo#isHardwareAccelerated)\n: Returns true if a codec is accelerated by hardware.\n\n[`isVendor()`](/reference/android/media/MediaCodecInfo#isVendor)\n: Returns true if the codec is provided by the device vendor or false if provided\n by the Android platform.\n\n[`isAlias()`](/reference/android/media/MediaCodecInfo#isAlias)\n: `MediaCodecList` may contain additional entries for the same underlying codec\n using an alternate codec name/s (alias/es). This method returns true if the\n codec in this entry is an alias for another codec.\n\nIn addition,\n[`MediaCodec.getCanonicalName()`](/reference/android/media/MediaCodecInfo#getCanonicalName)\nreturns the underlying codec name for codecs created via an alias.\n\nPerformance Points\n\nA *performance point* represents a codec's ability to render video at a specific\nheight, width and frame rate. For example, the `UHD_60` performance point\nrepresents Ultra High Definition video (3840x2160 pixels) rendered at 60 frames\nper second.\n\nThe method\n[`MediaCodecInfo.VideoCapabilities.getSupportedPerformancePoints()`](/reference/android/media/MediaCodecInfo.VideoCapabilities#getSupportedPerformancePoints())\nreturns a list of\n[`PerformancePoint`](/reference/android/media/MediaCodecInfo.VideoCapabilities.PerformancePoint)\nentries that the codec can render or capture.\n\nYou can check whether a given `PerformancePoint` covers another by calling\n[`PerformancePoint.covers(PerformancePoint)`](/reference/android/media/MediaCodecInfo.VideoCapabilities.PerformancePoint#covers(android.media.MediaCodecInfo.VideoCapabilities.PerformancePoint)).\nFor example, `UHD_60.covers(UHD_50)` returns true.\n\nA list of performance points is provided for all hardware-accelerated codecs.\nThis could be an empty list if the codec does not meet even the lowest standard\nperformance point.\n\nNote that devices which have been upgraded to Android 10 (API level 29) and higher without\nupdating the vendor image will not have performance point data, because this\ndata comes from the vendor HAL. In this case, `getSupportedPerformancePoints()`\nreturns null."]]