1*ec779b8eSAndroid Build Coastguard Worker# Benchmark tests 2*ec779b8eSAndroid Build Coastguard Worker 3*ec779b8eSAndroid Build Coastguard WorkerBenchmark app analyses the time taken by MediaCodec, MediaExtractor and MediaMuxer for given set of inputs. It is used to benchmark these modules on android devices. 4*ec779b8eSAndroid Build Coastguard WorkerBenchmark results are published as a CSV report. 5*ec779b8eSAndroid Build Coastguard Worker 6*ec779b8eSAndroid Build Coastguard WorkerThis page describes steps to run the NDK and SDK layer test. 7*ec779b8eSAndroid Build Coastguard Worker 8*ec779b8eSAndroid Build Coastguard WorkerRun the following steps to build the test suite: 9*ec779b8eSAndroid Build Coastguard Worker``` 10*ec779b8eSAndroid Build Coastguard Workermmm frameworks/av/media/tests/benchmark/ 11*ec779b8eSAndroid Build Coastguard Worker``` 12*ec779b8eSAndroid Build Coastguard Worker 13*ec779b8eSAndroid Build Coastguard Worker# Resources 14*ec779b8eSAndroid Build Coastguard WorkerThe resource file for the tests is taken from [here](https://dl.google.com/android-unittest/media/frameworks/av/media/tests/benchmark/MediaBenchmarkTest/MediaBenchmark-1.1.zip) 15*ec779b8eSAndroid Build Coastguard Worker 16*ec779b8eSAndroid Build Coastguard WorkerDownload the MediaBenchmark.zip file, unzip and push it to /data/local/tmp/ on the device. 17*ec779b8eSAndroid Build Coastguard Worker 18*ec779b8eSAndroid Build Coastguard Worker``` 19*ec779b8eSAndroid Build Coastguard Workerunzip MediaBenchmark-1.1.zip 20*ec779b8eSAndroid Build Coastguard Workeradb push MediaBenchmark-1.1 /data/local/tmp/MediaBenchmark/res/ 21*ec779b8eSAndroid Build Coastguard Worker``` 22*ec779b8eSAndroid Build Coastguard Worker 23*ec779b8eSAndroid Build Coastguard WorkerThe resource files are assumed to be at /data/local/tmp/MediaBenchmark/res/. You can use a different location, but you have to modify the rest of the instructions to replace /data/local/tmp/MediaBenchmark/res/ with wherever you chose to put the files. 24*ec779b8eSAndroid Build Coastguard Worker 25*ec779b8eSAndroid Build Coastguard Worker# NDK CLI Tests 26*ec779b8eSAndroid Build Coastguard WorkerNote: [Benchmark Application](#BenchmarkApplication) now supports profiling both SDK and NDK APIs and that is the preferred way to benchmark codecs 27*ec779b8eSAndroid Build Coastguard Worker 28*ec779b8eSAndroid Build Coastguard WorkerTo run the test suite for measuring performance of the native layer, follow the following steps: 29*ec779b8eSAndroid Build Coastguard Worker 30*ec779b8eSAndroid Build Coastguard WorkerThe 64-bit binaries will be created in the following path : ${OUT}/data/nativetest64/ 31*ec779b8eSAndroid Build Coastguard Worker 32*ec779b8eSAndroid Build Coastguard WorkerTo test 64-bit binary push binaries from nativetest64. 33*ec779b8eSAndroid Build Coastguard Worker 34*ec779b8eSAndroid Build Coastguard Workeradb push $OUT/data/nativetest64/* /data/local/tmp/. For example 35*ec779b8eSAndroid Build Coastguard Worker 36*ec779b8eSAndroid Build Coastguard Worker``` 37*ec779b8eSAndroid Build Coastguard Workeradb push $OUT/data/nativetest64/extractorTest/extractorTest /data/local/tmp/ 38*ec779b8eSAndroid Build Coastguard Worker``` 39*ec779b8eSAndroid Build Coastguard Worker 40*ec779b8eSAndroid Build Coastguard WorkerThe 32-bit binaries will be created in the following path : ${OUT}/data/nativetest/ 41*ec779b8eSAndroid Build Coastguard Worker 42*ec779b8eSAndroid Build Coastguard WorkerTo test 32-bit binary push binaries from nativetest. 43*ec779b8eSAndroid Build Coastguard Worker 44*ec779b8eSAndroid Build Coastguard Workeradb push $OUT/data/nativetest/* /data/local/tmp/. For example 45*ec779b8eSAndroid Build Coastguard Worker 46*ec779b8eSAndroid Build Coastguard Worker``` 47*ec779b8eSAndroid Build Coastguard Workeradb push $OUT/data/nativetest/extractorTest/extractorTest /data/local/tmp/ 48*ec779b8eSAndroid Build Coastguard Worker``` 49*ec779b8eSAndroid Build Coastguard Worker 50*ec779b8eSAndroid Build Coastguard WorkerTo run the binary, follow the commands mentioned below under each module. 51*ec779b8eSAndroid Build Coastguard Worker 52*ec779b8eSAndroid Build Coastguard Worker## Extractor 53*ec779b8eSAndroid Build Coastguard Worker 54*ec779b8eSAndroid Build Coastguard WorkerThe test extracts elementary stream and benchmarks the extractors available in NDK. 55*ec779b8eSAndroid Build Coastguard Worker 56*ec779b8eSAndroid Build Coastguard Worker``` 57*ec779b8eSAndroid Build Coastguard Workeradb shell /data/local/tmp/extractorTest -P /data/local/tmp/MediaBenchmark/res/ 58*ec779b8eSAndroid Build Coastguard Worker``` 59*ec779b8eSAndroid Build Coastguard Worker 60*ec779b8eSAndroid Build Coastguard Worker## Decoder 61*ec779b8eSAndroid Build Coastguard Worker 62*ec779b8eSAndroid Build Coastguard WorkerThe test decodes input stream and benchmarks the decoders available in NDK. 63*ec779b8eSAndroid Build Coastguard Worker 64*ec779b8eSAndroid Build Coastguard Worker``` 65*ec779b8eSAndroid Build Coastguard Workeradb shell /data/local/tmp/decoderTest -P /data/local/tmp/MediaBenchmark/res/ 66*ec779b8eSAndroid Build Coastguard Worker``` 67*ec779b8eSAndroid Build Coastguard Worker 68*ec779b8eSAndroid Build Coastguard Worker## Muxer 69*ec779b8eSAndroid Build Coastguard Worker 70*ec779b8eSAndroid Build Coastguard WorkerThe test muxes elementary stream and benchmarks the muxers available in NDK. 71*ec779b8eSAndroid Build Coastguard Worker 72*ec779b8eSAndroid Build Coastguard Worker``` 73*ec779b8eSAndroid Build Coastguard Workeradb shell /data/local/tmp/muxerTest -P /data/local/tmp/MediaBenchmark/res/ 74*ec779b8eSAndroid Build Coastguard Worker``` 75*ec779b8eSAndroid Build Coastguard Worker 76*ec779b8eSAndroid Build Coastguard Worker## Encoder 77*ec779b8eSAndroid Build Coastguard Worker 78*ec779b8eSAndroid Build Coastguard WorkerThe test encodes input stream and benchmarks the encoders available in NDK. 79*ec779b8eSAndroid Build Coastguard Worker 80*ec779b8eSAndroid Build Coastguard Worker``` 81*ec779b8eSAndroid Build Coastguard Workeradb shell /data/local/tmp/encoderTest -P /data/local/tmp/MediaBenchmark/res/ 82*ec779b8eSAndroid Build Coastguard Worker``` 83*ec779b8eSAndroid Build Coastguard Worker 84*ec779b8eSAndroid Build Coastguard Worker# <a name="BenchmarkApplication"></a> Benchmark Application 85*ec779b8eSAndroid Build Coastguard WorkerTo run the test suite for measuring performance of the SDK and NDK APIs, follow the following steps: 86*ec779b8eSAndroid Build Coastguard WorkerBenchmark Application can be run in two ways. 87*ec779b8eSAndroid Build Coastguard Worker 88*ec779b8eSAndroid Build Coastguard Worker## Steps to run with atest 89*ec779b8eSAndroid Build Coastguard WorkerNote that atest command will install Benchmark application and push the required test files to the device as well. 90*ec779b8eSAndroid Build Coastguard Worker 91*ec779b8eSAndroid Build Coastguard WorkerFor running all the tests, run the following command 92*ec779b8eSAndroid Build Coastguard Worker``` 93*ec779b8eSAndroid Build Coastguard Workeratest com.android.media.benchmark.tests -- --enable-module-dynamic-download=true 94*ec779b8eSAndroid Build Coastguard Worker``` 95*ec779b8eSAndroid Build Coastguard Worker 96*ec779b8eSAndroid Build Coastguard WorkerFor running the tests individually, run the following atest commands: 97*ec779b8eSAndroid Build Coastguard Worker 98*ec779b8eSAndroid Build Coastguard Worker``` 99*ec779b8eSAndroid Build Coastguard Workeratest com.android.media.benchmark.tests.ExtractorTest -- --enable-module-dynamic-download=true 100*ec779b8eSAndroid Build Coastguard Workeratest com.android.media.benchmark.tests.DecoderTest -- --enable-module-dynamic-download=true 101*ec779b8eSAndroid Build Coastguard Workeratest com.android.media.benchmark.tests.MuxerTest -- --enable-module-dynamic-download=true 102*ec779b8eSAndroid Build Coastguard Workeratest com.android.media.benchmark.tests.EncoderTest -- --enable-module-dynamic-download=true 103*ec779b8eSAndroid Build Coastguard Worker``` 104*ec779b8eSAndroid Build Coastguard Worker 105*ec779b8eSAndroid Build Coastguard Worker## Steps to run without atest 106*ec779b8eSAndroid Build Coastguard Worker 107*ec779b8eSAndroid Build Coastguard WorkerThe apk will be created at the following path: 108*ec779b8eSAndroid Build Coastguard Worker 109*ec779b8eSAndroid Build Coastguard WorkerThe 64-bit apk will be created in the following path : 110*ec779b8eSAndroid Build Coastguard Worker$OUT/testcases/MediaBenchmarkTest/arm64/ 111*ec779b8eSAndroid Build Coastguard Worker 112*ec779b8eSAndroid Build Coastguard WorkerFor installing the apk, run the command: 113*ec779b8eSAndroid Build Coastguard Worker``` 114*ec779b8eSAndroid Build Coastguard Workeradb install -f -r $OUT/testcases/MediaBenchmarkTest/arm64/MediaBenchmarkTest.apk 115*ec779b8eSAndroid Build Coastguard Worker``` 116*ec779b8eSAndroid Build Coastguard Worker 117*ec779b8eSAndroid Build Coastguard WorkerThe 32-bit apk will be created in the following path : 118*ec779b8eSAndroid Build Coastguard Worker$OUT/testcases/MediaBenchmarkTest/arm/ 119*ec779b8eSAndroid Build Coastguard Worker 120*ec779b8eSAndroid Build Coastguard WorkerFor installing the apk, run the command: 121*ec779b8eSAndroid Build Coastguard Worker``` 122*ec779b8eSAndroid Build Coastguard Workeradb install -f -r $OUT/testcases/MediaBenchmarkTest/arm/MediaBenchmarkTest.apk 123*ec779b8eSAndroid Build Coastguard Worker``` 124*ec779b8eSAndroid Build Coastguard Worker 125*ec779b8eSAndroid Build Coastguard WorkerTo get the resource files for the test follow instructions given in [Resources](#Resources) 126*ec779b8eSAndroid Build Coastguard Worker 127*ec779b8eSAndroid Build Coastguard WorkerFor running all the tests, run the following command 128*ec779b8eSAndroid Build Coastguard Worker``` 129*ec779b8eSAndroid Build Coastguard Workeradb shell am instrument -w -r -e package com.android.media.benchmark.tests com.android.media.benchmark/androidx.test.runner.AndroidJUnitRunner 130*ec779b8eSAndroid Build Coastguard Worker``` 131*ec779b8eSAndroid Build Coastguard Worker 132*ec779b8eSAndroid Build Coastguard Worker## Extractor 133*ec779b8eSAndroid Build Coastguard Worker 134*ec779b8eSAndroid Build Coastguard WorkerThe test extracts elementary stream and benchmarks the extractors available in SDK and NDK. 135*ec779b8eSAndroid Build Coastguard Worker``` 136*ec779b8eSAndroid Build Coastguard Workeradb shell am instrument -w -r -e class 'com.android.media.benchmark.tests.ExtractorTest' com.android.media.benchmark/androidx.test.runner.AndroidJUnitRunner 137*ec779b8eSAndroid Build Coastguard Worker``` 138*ec779b8eSAndroid Build Coastguard Worker 139*ec779b8eSAndroid Build Coastguard Worker## Decoder 140*ec779b8eSAndroid Build Coastguard Worker 141*ec779b8eSAndroid Build Coastguard WorkerThe test decodes input stream and benchmarks the decoders available in SDK and NDK. 142*ec779b8eSAndroid Build Coastguard Worker``` 143*ec779b8eSAndroid Build Coastguard Workeradb shell am instrument -w -r -e class 'com.android.media.benchmark.tests.DecoderTest' com.android.media.benchmark/androidx.test.runner.AndroidJUnitRunner 144*ec779b8eSAndroid Build Coastguard Worker``` 145*ec779b8eSAndroid Build Coastguard Worker 146*ec779b8eSAndroid Build Coastguard Worker## Muxer 147*ec779b8eSAndroid Build Coastguard Worker 148*ec779b8eSAndroid Build Coastguard WorkerThe test muxes elementary stream and benchmarks different writers available in SDK and NDK. 149*ec779b8eSAndroid Build Coastguard Worker``` 150*ec779b8eSAndroid Build Coastguard Workeradb shell am instrument -w -r -e class 'com.android.media.benchmark.tests.MuxerTest' com.android.media.benchmark/androidx.test.runner.AndroidJUnitRunner 151*ec779b8eSAndroid Build Coastguard Worker``` 152*ec779b8eSAndroid Build Coastguard Worker 153*ec779b8eSAndroid Build Coastguard Worker## Encoder 154*ec779b8eSAndroid Build Coastguard Worker 155*ec779b8eSAndroid Build Coastguard WorkerThe test encodes input stream and benchmarks the encoders available in SDK and NDK. 156*ec779b8eSAndroid Build Coastguard Worker``` 157*ec779b8eSAndroid Build Coastguard Workeradb shell am instrument -w -r -e class 'com.android.media.benchmark.tests.EncoderTest' com.android.media.benchmark/androidx.test.runner.AndroidJUnitRunner 158*ec779b8eSAndroid Build Coastguard Worker``` 159*ec779b8eSAndroid Build Coastguard Worker 160*ec779b8eSAndroid Build Coastguard Worker# Codec2 161*ec779b8eSAndroid Build Coastguard WorkerTo run the test suite for measuring performance of the codec2 layer, follow the following steps: 162*ec779b8eSAndroid Build Coastguard Worker 163*ec779b8eSAndroid Build Coastguard WorkerThe 32-bit binaries will be created in the following path : ${OUT}/data/nativetest/ 164*ec779b8eSAndroid Build Coastguard Worker 165*ec779b8eSAndroid Build Coastguard WorkerThe 64-bit binaries will be created in the following path : ${OUT}/data/nativetest64/ 166*ec779b8eSAndroid Build Coastguard Worker 167*ec779b8eSAndroid Build Coastguard WorkerTo test 64-bit binary push binaries from nativetest64. 168*ec779b8eSAndroid Build Coastguard Workeradb push $(OUT)/data/nativetest64/* /data/local/tmp/ 169*ec779b8eSAndroid Build Coastguard Worker``` 170*ec779b8eSAndroid Build Coastguard Workeradb push $(OUT)/data/nativetest64/C2DecoderTest/C2DecoderTest /data/local/tmp/ 171*ec779b8eSAndroid Build Coastguard Worker``` 172*ec779b8eSAndroid Build Coastguard Worker 173*ec779b8eSAndroid Build Coastguard WorkerTo test 32-bit binary push binaries from nativetest. 174*ec779b8eSAndroid Build Coastguard Workeradb push $(OUT)/data/nativetest/* /data/local/tmp/ 175*ec779b8eSAndroid Build Coastguard Worker``` 176*ec779b8eSAndroid Build Coastguard Workeradb push $(OUT)/data/nativetest/C2DecoderTest/C2DecoderTest /data/local/tmp/ 177*ec779b8eSAndroid Build Coastguard Worker``` 178*ec779b8eSAndroid Build Coastguard Worker 179*ec779b8eSAndroid Build Coastguard WorkerTo get the resource files for the test follow instructions given in [Resources](#Resources) 180*ec779b8eSAndroid Build Coastguard Worker 181*ec779b8eSAndroid Build Coastguard Worker## C2 Decoder 182*ec779b8eSAndroid Build Coastguard Worker 183*ec779b8eSAndroid Build Coastguard WorkerThe test decodes input stream and benchmarks the codec2 decoders available in device. 184*ec779b8eSAndroid Build Coastguard Worker 185*ec779b8eSAndroid Build Coastguard Worker``` 186*ec779b8eSAndroid Build Coastguard Workeradb shell /data/local/tmp/C2DecoderTest -P /data/local/tmp/MediaBenchmark/res/ 187*ec779b8eSAndroid Build Coastguard Worker``` 188*ec779b8eSAndroid Build Coastguard Worker## C2 Encoder 189*ec779b8eSAndroid Build Coastguard Worker 190*ec779b8eSAndroid Build Coastguard WorkerThe test encodes input stream and benchmarks the codec2 encoders available in device. 191*ec779b8eSAndroid Build Coastguard Worker 192*ec779b8eSAndroid Build Coastguard Worker``` 193*ec779b8eSAndroid Build Coastguard Workeradb shell /data/local/tmp/C2EncoderTest -P /data/local/tmp/MediaBenchmark/res/ 194*ec779b8eSAndroid Build Coastguard Worker``` 195*ec779b8eSAndroid Build Coastguard Worker 196*ec779b8eSAndroid Build Coastguard Worker# Analysis 197*ec779b8eSAndroid Build Coastguard Worker 198*ec779b8eSAndroid Build Coastguard WorkerThe benchmark results are stored in a CSV file which can be used for analysis. These results are stored in following format: 199*ec779b8eSAndroid Build Coastguard Worker<app directory>/<module_name>.<timestamp>.csv 200*ec779b8eSAndroid Build Coastguard Worker 201*ec779b8eSAndroid Build Coastguard WorkerNote: This timestamp is in nano seconds and will change based on current system time. 202*ec779b8eSAndroid Build Coastguard Worker 203*ec779b8eSAndroid Build Coastguard WorkerTo find the location of the CSV file, look for the path in logs. Example log below - 204*ec779b8eSAndroid Build Coastguard Worker 205*ec779b8eSAndroid Build Coastguard Worker``` 206*ec779b8eSAndroid Build Coastguard Workercom.android.media.benchmark D/DecoderTest: Saving Benchmark results in: /storage/emulated/0/Android/data/com.android.media.benchmark/files/Decoder.1587732395387.csv 207*ec779b8eSAndroid Build Coastguard Worker``` 208*ec779b8eSAndroid Build Coastguard Worker 209*ec779b8eSAndroid Build Coastguard WorkerThis file can be pulled from the device using "adb pull" command. 210*ec779b8eSAndroid Build Coastguard Worker``` 211*ec779b8eSAndroid Build Coastguard Workeradb pull /storage/emulated/0/Android/data/com.android.media.benchmark/files/Decoder.1587732395387.csv ./Decoder.1587732395387.csv 212*ec779b8eSAndroid Build Coastguard Worker``` 213*ec779b8eSAndroid Build Coastguard Worker 214*ec779b8eSAndroid Build Coastguard Worker## CSV Columns 215*ec779b8eSAndroid Build Coastguard Worker 216*ec779b8eSAndroid Build Coastguard WorkerFollowing columns are available in CSV. 217*ec779b8eSAndroid Build Coastguard Worker 218*ec779b8eSAndroid Build Coastguard WorkerNote: All time values are in nano seconds 219*ec779b8eSAndroid Build Coastguard Worker 220*ec779b8eSAndroid Build Coastguard Worker1. **currentTime** : The time recorded at the creation of the stats. This may be used to estimate time between consecutive test clips. 221*ec779b8eSAndroid Build Coastguard Worker 222*ec779b8eSAndroid Build Coastguard Worker2. **fileName**: The file being used as an input for the benchmark test. 223*ec779b8eSAndroid Build Coastguard Worker 224*ec779b8eSAndroid Build Coastguard Worker3. **operation**: The current operation on the input test vector i.e. Extract/Mux/Encode/Decode. 225*ec779b8eSAndroid Build Coastguard Worker 226*ec779b8eSAndroid Build Coastguard Worker4. **NDK/SDK**: The target APIs i.e. AMedia vs Media calls for the operation being performed. 227*ec779b8eSAndroid Build Coastguard Worker 228*ec779b8eSAndroid Build Coastguard Worker5. **sync/async**: This is specific to MediaCodec objects (i.e. Encoder and Decoder). It specifies the mode in which MediaCodec APIs are working. For async mode, callbacks are set. For sync mode, we have to poll the dequeueBuffer APIs to queue and dequeue input output buffers respectively. 229*ec779b8eSAndroid Build Coastguard Worker 230*ec779b8eSAndroid Build Coastguard Worker6. **setupTime**: The time taken to set up the MediaExtractor/Muxer/Codec instance. 231*ec779b8eSAndroid Build Coastguard Worker 232*ec779b8eSAndroid Build Coastguard Worker * MediaCodec: includes setting async/sync mode, configuring with a format and codec.start 233*ec779b8eSAndroid Build Coastguard Worker 234*ec779b8eSAndroid Build Coastguard Worker * MediaExtractor: includes AMediaExtractor_new and setDataSource. 235*ec779b8eSAndroid Build Coastguard Worker 236*ec779b8eSAndroid Build Coastguard Worker * MediaMuxer: includes creating the object, adding track, and starting the muxer. 237*ec779b8eSAndroid Build Coastguard Worker 238*ec779b8eSAndroid Build Coastguard Worker7. **destroyTime**: The time taken to stop and close MediaExtractor/Muxer/Codec instance. 239*ec779b8eSAndroid Build Coastguard Worker 240*ec779b8eSAndroid Build Coastguard Worker8. **minimumTime**: The minimum time taken to extract/mux/encode/decode a frame. 241*ec779b8eSAndroid Build Coastguard Worker 242*ec779b8eSAndroid Build Coastguard Worker9. **maximumTime**: The maximum time taken to extract/mux/encode/decode a frame. 243*ec779b8eSAndroid Build Coastguard Worker 244*ec779b8eSAndroid Build Coastguard Worker10. **averageTime**: Average time taken to extract/mux/encode/decode per frame. 245*ec779b8eSAndroid Build Coastguard Worker 246*ec779b8eSAndroid Build Coastguard Worker * MediaCodec: computed as the total time taken to encode/decode all frames divided by the number of frames encoded/decoded. 247*ec779b8eSAndroid Build Coastguard Worker 248*ec779b8eSAndroid Build Coastguard Worker * MediaExtractor: computed as the total time taken to extract all frames divided by the number of frames extracted. 249*ec779b8eSAndroid Build Coastguard Worker 250*ec779b8eSAndroid Build Coastguard Worker * MediaMuxer: computed as the total time taken to mux all frames divided by the number of frames muxed. 251*ec779b8eSAndroid Build Coastguard Worker 252*ec779b8eSAndroid Build Coastguard Worker11. **timeToProcess1SecContent**: The time required to process one second worth input data. 253*ec779b8eSAndroid Build Coastguard Worker 254*ec779b8eSAndroid Build Coastguard Worker12. **totalBytesProcessedPerSec**: The number of bytes extracted/muxed/decoded/encoded per second. 255*ec779b8eSAndroid Build Coastguard Worker 256*ec779b8eSAndroid Build Coastguard Worker13. **timeToFirstFrame**: The time taken to receive the first output frame. 257*ec779b8eSAndroid Build Coastguard Worker 258*ec779b8eSAndroid Build Coastguard Worker14. **totalSizeInBytes**: The total output size of the operation (in bytes). 259*ec779b8eSAndroid Build Coastguard Worker 260*ec779b8eSAndroid Build Coastguard Worker15. **totalTime**: The time taken to perform the complete operation (i.e. Extract/Mux/Decode/Encode) for respective test vector. 261*ec779b8eSAndroid Build Coastguard Worker 262*ec779b8eSAndroid Build Coastguard Worker 263*ec779b8eSAndroid Build Coastguard Worker## Muxer 264*ec779b8eSAndroid Build Coastguard Worker1. **componentName**: The format of the output Media file. Following muxers are currently supported: 265*ec779b8eSAndroid Build Coastguard Worker * Ogg, Webm, 3gpp, and mp4. 266*ec779b8eSAndroid Build Coastguard Worker 267*ec779b8eSAndroid Build Coastguard Worker## Decoder 268*ec779b8eSAndroid Build Coastguard Worker1. **componentName**: Includes all supported codecs on the device. Aliased components are skipped. 269*ec779b8eSAndroid Build Coastguard Worker * Video: H263, H264, H265, VPx, Mpeg4, Mpeg2, AV1 270*ec779b8eSAndroid Build Coastguard Worker * Audio: AAC, Flac, Opus, MP3, Vorbis, GSM, AMR-NB/WB 271*ec779b8eSAndroid Build Coastguard Worker 272*ec779b8eSAndroid Build Coastguard Worker## Encoder 273*ec779b8eSAndroid Build Coastguard Worker1. **componentName**: Includes all supported codecs on the device. Aliased components are skipped. 274*ec779b8eSAndroid Build Coastguard Worker * Video: H263, H264, H265, VPx, Mpeg4 275*ec779b8eSAndroid Build Coastguard Worker * Audio: AAC, Flac, Opus, AMR-NB/WB 276*ec779b8eSAndroid Build Coastguard Worker 277*ec779b8eSAndroid Build Coastguard Worker## Common Failures 278*ec779b8eSAndroid Build Coastguard WorkerOn some devices, if a codec isn't supported some tests may report a failure like "codec not found for" 279*ec779b8eSAndroid Build Coastguard Worker 280*ec779b8eSAndroid Build Coastguard WorkerFor example: On mobile devices without support for mpeg2 decoder, following failure is observed: 281*ec779b8eSAndroid Build Coastguard Worker``` 282*ec779b8eSAndroid Build Coastguard WorkerUnable to create codec by mime: video/mpeg2 283*ec779b8eSAndroid Build Coastguard Worker``` 284