Skip to content

How to know which approach between platform or software codec does VLC use on Android 7?

I tested several formats and noticed a pattern, filtering for "decoder", but it is not satisfactory. Describing below.

Making tests with mp4 video, aac audio, mp4a audio, wav audio, mp3 audio and mp2 audio samples...

With mp4 sample

D/VLC: [a3086128/4fe5] core decoder: looking for decoder module matching "mediacodec_ndk,iomx,all": 39 candidates
D/VLC: [a3086128/4fe5] mediacodec decoder: Number of profile levels: 3
D/VLC: [a3086128/4fe5] mediacodec decoder: using OMX.qcom.video.decoder.avc
W/VLC: [a3086128/4fe5] mediacodec decoder: New SPS/PPS found, id: 0 size: 560x320 sps: 31 pps: 9
D/VLC: [a3086128/4fe5] android_native_window decoder: InitJNIFields success
I/MediaCodec: (0xa7b571c0) init name(OMX.qcom.video.decoder.avc) isType(0) encoder(0)
I/OMXMaster: makeComponentInstance(OMX.qcom.video.decoder.avc) in mediacodec process
I/OMX-VDEC-1080P: component_init: OMX.qcom.video.decoder.avc : fd=7
I/MediaCodec: (0xa7b571c0) Component Allocated (OMX.qcom.video.decoder.avc)
I/MediaCodec: [OMX.qcom.video.decoder.avc] setting surface generation to 20831233
I/ExtendedACodec: setupVideoDecoder()
I/ACodec: [OMX.qcom.video.decoder.avc] setupVideoDecoder Width Height (560x320)
I/ExtendedACodec: Decoder will be in frame by frame mode
E/OMXNodeInstance: getConfig(25a0637:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
D/VLC: [a3086128/4fe5] mediacodec decoder: MediaCodec via NDK opened
D/VLC: [a3086128/4fe5] core decoder: using decoder module "mediacodec"
D/VLC: [a30887a8/4fe5] core decoder: looking for decoder module matching "mediacodec_ndk,iomx,all": 39 candidates
D/VLC: [a30887a8/4fe5] avcodec decoder: CPU flags: 0x0000003f
D/VLC: [a30887a8/4fe5] avcodec decoder: codec (aac) started
D/VLC: [a30887a8/4fe5] core decoder: using decoder module "avcodec"
E/OMXNodeInstance: getConfig(25a0637:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
E/OMXNodeInstance: getConfig(25a0637:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
D/MediaCodec: (0xa7b571c0) [OMX.qcom.video.decoder.avc] output format changed to: AMessage(what = 0x00000000) = {
                                                     int32_t color-range = 2
                                                     int32_t color-standard = 1
                                                     int32_t color-transfer = 3
                                                     string mime = "video/raw"
                                                     int32_t stride = 640
                                                     int32_t slice-height = 320
                                                     int32_t color-format = 2141391876
                                                     Rect crop(0, 0, 559, 319)
                                                     int32_t android._dataspace = 260
                                                     int32_t width = 560
                                                     int32_t height = 320
                                                   }
E/OMXNodeInstance: getConfig(25a0637:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
E/VLC: [a3086128/4ffb] mediacodec decoder: output: 2141391876 unknown, 560x320 stride 640 320, crop 0 0 0 0
D/VLC: [a3086128/4ffb] core decoder: Received first picture
D/MediaCodec: (0xa7b571c0) [OMX.qcom.video.decoder.avc] output format changed to: AMessage(what = 0x00000000) = {
                                                     int32_t color-range = 2
                                                     int32_t color-standard = 2
                                                     int32_t color-transfer = 3
                                                     string mime = "video/raw"
                                                     int32_t stride = 640
                                                     int32_t slice-height = 320
                                                     int32_t color-format = 2141391876
                                                     Rect crop(0, 0, 559, 319)
                                                     int32_t android._dataspace = 258
                                                     int32_t width = 560
                                                     int32_t height = 320
                                                   }
E/VLC: [a3086128/4ffb] mediacodec decoder: output: 2141391876 unknown, 560x320 stride 640 320, crop 0 0 0 0
D/VLC: [90ce6b28/4fe5] core input: Decoder wait done in 0 ms
E/VLC: [a3086128/4ffc] mediacodec decoder: Decoder is draining
W/VLC: [a3086128/4ffc] mediacodec decoder: EOS sent, waiting for OutThread
D/VLC: [90ce6b28/4fe5] core input: waiting decoder fifos to empty
W/VLC: [a3086128/4ffb] mediacodec decoder: EOS received, abort OutThread
W/VLC: [a3086128/4ffb] mediacodec decoder: OutThread stopped
D/VLC: [90ce6b28/4fe5] core input: waiting decoder fifos to empty
D/VLC: [90ce6b28/4fe5] core input: waiting decoder fifos to empty
D/VLC: [a3086128/4fe5] core decoder: killing decoder fourcc `h264', 0 PES in FIFO
D/VLC: [a3086128/4fe5] core decoder: removing module "mediacodec"
D/VLC: [a3086128/4fe5] mediacodec decoder: MediaCodec via NDK closed
D/VLC: [a30887a8/4fe5] core decoder: killing decoder fourcc `mp4a', 0 PES in FIFO
D/VLC: [a30887a8/4fe5] core decoder: removing module "avcodec"
D/VLC: [a30887a8/4fe5] avcodec decoder: ffmpeg codec (aac) stopped

Some log messages to highlight

Decoder specification log:

D/MediaCodec: (0xa7b571c0) [OMX.qcom.video.decoder.avc] output format changed to: AMessage(what = 0x00000000) = {

Seems like it's using a software codec for audio:

D/VLC: [a3086128/4fe5] mediacodec decoder: MediaCodec via NDK opened
D/VLC: [a3086128/4fe5] mediacodec decoder: MediaCodec via NDK closed
D/VLC: [a30887a8/4fe5] avcodec decoder: ffmpeg codec (aac) stopped

With aac audio sample

D/VLC: [a3088428/6268] mpeg4audio demux packetizer: no decoder specific info, must be an ADTS or LOAS stream
D/VLC: [a30887a8/6268] core decoder: looking for decoder module matching "mediacodec_ndk,iomx,all": 39 candidates
D/VLC: [a30887a8/6268] avcodec decoder: CPU flags: 0x0000003f
D/VLC: [a30887a8/6268] avcodec decoder: codec (aac) started
D/VLC: [a30887a8/6268] core decoder: using decoder module "avcodec"
D/VLC: [93fe3ca8/6268] core input: Decoder wait done in 37 ms
D/VLC: [a30887a8/6279] core decoder: discarded audio buffer
D/VLC: [93fe3ca8/6268] core input: Decoder wait done in 0 ms
D/VLC: [a30887a8/6268] core decoder: killing decoder fourcc `mp4a', 0 PES in FIFO
D/VLC: [a30887a8/6268] core decoder: removing module "avcodec"
D/VLC: [a30887a8/6268] avcodec decoder: ffmpeg codec (aac) stopped

Some log messages to highlight

The same message from above, probably using software codec:

D/VLC: [a30887a8/6268] avcodec decoder: ffmpeg codec (aac) stopped

With mp4a sample

D/VLC: [90bcd128/54c9] core decoder: looking for decoder module matching "mediacodec_ndk,iomx,all": 39 candidates
D/VLC: [90bcd128/54c9] avcodec decoder: CPU flags: 0x0000003f
D/VLC: [90bcd128/54c9] avcodec decoder: codec (aac) started
D/VLC: [90bcd128/54c9] core decoder: using decoder module "avcodec"
D/VLC: [93fe3208/54c9] core input: Decoder wait done in 44 ms
D/VLC: [90bcd128/54c9] core decoder: killing decoder fourcc `mp4a', 0 PES in FIFO
D/VLC: [90bcd128/54c9] core decoder: removing module "avcodec"
D/VLC: [90bcd128/54c9] avcodec decoder: ffmpeg codec (aac) stopped

Some log messages to highlight

The same, software codec:

D/VLC: [90bcd128/54c9] avcodec decoder: ffmpeg codec (aac) stopped

With wav sample

This one is different, probably using platform codec, as it does not mention ffmpeg.

D/VLC: [a3085328/559e] core decoder: looking for decoder module matching "mediacodec_ndk,iomx,all": 39 candidates
D/VLC: [a3085328/559e] araw decoder: samplerate:44100Hz channels:2 bits/sample:16
D/VLC: [a3085328/559e] core decoder: using decoder module "araw"
D/VLC: [945b34d8/559e] core input: Decoder wait done in 0 ms
D/VLC: [a3085328/559e] core decoder: killing decoder fourcc `s16l', 0 PES in FIFO
D/VLC: [a3085328/559e] core decoder: removing module "araw"

With mp3 sample

The same from wav happened, probably using platform codec.

D/VLC: [911ad7a8/55b3] core decoder: looking for decoder module matching "mediacodec_ndk,iomx,all": 39 candidates
D/VLC: [911ad7a8/55b3] core decoder: using decoder module "mpeg_audio"
D/VLC: [911ad7a8/55b6] mpeg_audio decoder: MPGA channels:1 samplerate:22050 bitrate:32
D/VLC: [911ad7a8/55b3] core decoder: killing decoder fourcc `mpga', 0 PES in FIFO
D/VLC: [911ad7a8/55b3] core decoder: removing module "mpeg_audio"

With mp2 sample

Finally the mp2 sample, similar to wav and mp3, probably a platform codec.

D/VLC: [a30856a8/55d8] core decoder: looking for decoder module matching "mediacodec_ndk,iomx,all": 39 candidates
D/VLC: [a30856a8/55d8] core decoder: using decoder module "mpeg_audio"
D/VLC: [a30856a8/55e1] mpeg_audio decoder: MPGA channels:2 samplerate:44100 bitrate:96
D/VLC: [90f35328/55d8] core input: Decoder wait done in 0 ms
D/VLC: [a30856a8/55d8] core decoder: killing decoder fourcc `mpga', 0 PES in FIFO
D/VLC: [a30856a8/55d8] core decoder: removing module "mpeg_audio"

More info

Device

The device used was a Moto G4 Plus, Android version 7 (Nougat).

VLC version

I used the VLC for Android currently on Play Store, version 2.0.6.

Edited by Mateus Pires