-
Notifications
You must be signed in to change notification settings - Fork 0
MPEG–H support in ExoPlayer
ameci-iis edited this page Dec 15, 2025
·
1 revision
This page describes how to use the integrated MPEG-H decoding capability in AndroidX Media (ExoPlayer) project.
Since r1.6.0, AndroidX Media (ExoPlayer) integrates MPEG-H decoding based on Fraunhofer’s MPEG-H decoder, with MP4 and MPEG-2 TS transport support.
This makes it easy for multimedia application developers to enable in-app MPEG-H decoding.
The AndroidX Media (ExoPlayer) codebase includes:
-
MPEG-H decoder extension:
- implementing
DecoderAudioRendererinterface - using mpeghdec as native library to decode MPEG-H audio
- complete
mhaPandmhaCbox parsing in the MP4 extractor (BoxParser.java)
- implementing
- MPEG-H TS reader (MpeghReader.java) with support for advanced MPEG-H transmission modes in MPEG-2 TS
AndroidX Media MPEG-H components overview
Supported playback paths:
- MPEG-H decoding for DASH and HLS (live and VOD)
- MPEG-H decoding for MP4 and MPEG-2 TS files
To enable the MPEG-H support in a new AndroidX Media based application:
- Base your project on the AndroidX Media release/main branch.
- Follow the decoder_mpegh README to build and integrate the MPEG-H extension.
For AndroidX Media/ExoPlayer versions older than r1.6.0:
- Option 1:
- checkout AndroidX Media main branch
- copy
libraries/decoder_mpeghinto your project - adapt
decoder_mpeghto your AndroidX Media version as needed - follow the decoder_mpegh README build instructions
- Option 2:
- Request patch set for the used AndroidX Media / ExoPlayer version from Fraunhofer IIS (please contact
amm-info@iis.fraunhofer.de). - Patch sets are available for: ExoPlayer r2.15.1, r2.18.5, r2.18.6, r2.19.1; Media3 r1.5.1
- Request patch set for the used AndroidX Media / ExoPlayer version from Fraunhofer IIS (please contact
To verify the extension, add this entry to media.exolist.json (reference) in the demo module and enable “Use decoder extension” in demo settings:
{
"name": "MPEG-H",
"samples": [
{
"name": "MPEG-H Public TestItem",
"uri": "https://media.githubusercontent.com/media/Fraunhofer-IIS/mpegh-test-content/main/TRI_Fileset_17_514H_D1_D2_D3_O1_24bit1080p50.mp4"
}
]
}