Skip to content

androidx.media3.transformer.ExportException when trying to compress video on Redmi 8A #2751

@bigman212

Description

@bigman212

Bug Report: MediaCodec configuration failure on Xiaomi Redmi 8A with non-standard video resolution

Device: Xiaomi Redmi 8A (olivelite)
Android Version: 10 (API 29)
Media3 Version: 1.7.1

1. Summary

Media3 Transformer fails to process videos with non-standard, high resolutions (e.g., 1080x2340) on the Xiaomi Redmi 8A device. The failure occurs during the decoder configuration phase, before any transcoding or effects are applied. Both the hardware (OMX.qcom.video.decoder.avc) and software (OMX.google.h264.decoder) decoders reject the video format, resulting in a MediaCodec$CodecException: Error 0xfffffff4.

The core issue is clearly visible in the device logs. The MediaCodecInfo reports that neither available decoder supports the source video's resolution and frame rate combination:

MediaCodecInfo: NoSupport [sizeAndRate.support, 1080x2340@23.591419] [OMX.qcom.video.decoder.avc, video/avc]
MediaCodecInfo: NoSupport [sizeAndRate.support, 1080x2340@23.591419] [OMX.google.h264.decoder, video/avc]

This leads to the ACodec signaling a fatal error during configuration:

ACodec: [OMX.qcom.video.decoder.avc] configureCodec returning error -12
ACodec: signalError(omxError 0x80001001, internalError -12)
MediaCodec: Codec reported err 0xfffffff4, actionCode 0, while in state 3

Finally, this surfaces as a CodecException wrapped in an ExportException by the Transformer:

android.media.MediaCodec$CodecException: Error 0xfffffff4
    at android.media.MediaCodec.native_configure(Native Method)
    at android.media.MediaCodec.configure(MediaCodec.java:2023)
    at androidx.media3.transformer.DefaultCodec.configureCodec(DefaultCodec.java:498)
    ...

(Full stack trace available in the attached logs)

Setting encoder fallbacks via DefaultEncoderFactory.setEnableFallback(true) has no effect, as the pipeline fails before encoding begins.

What can we do to compress the video?

logs.txt

The code located here https://gist.github.com/bigman212/5c79ff928c2e74fd15a13dd642ee1bd8

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions