androidx / androidx/media

Performance of software decoder on high-resolution HLS playback (frame drops above 480p)

Open
#2,874 0 comments 0 reactions 1 assignee View on GitHub

@microkatz is already working on this.

Since Nov 3, 2025.

needs triage question
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

We are implementing dynamic ad insertion on an Android STB device that has a single hardware decoder.
Due to certain limitations in our current setup on this device, we need to play live TS content and HLS ads in parallel to ensure a smooth transition between the two streams.

To achieve this, we are using the following approach:

  • The main live TS stream is played on the hardware decoder.
  • The HLS ad is played on a software decoder using a second player instance

When playing HLS content at SD resolution (≤480p) using the software decoder, playback is smooth.
However, when switching to higher-resolution HLS profiles (>480p), we consistently observe frame drops at regular intervals during playback.

To confirm that this is not a device capability issue, we tested the sample HLS stream
(https://test-streams.mux.dev/x36xhzz/url_0/193039199_mp4_h264_aac_hd_7.m3u8, 720p profile)
using both VLC Player and the ExoPlayer sample app on the same device ensuring both played on software decoders.

  • VLC Player played the 720p HLS stream smoothly on software decoder, with no visible frame drops.
  • ExoPlayer sample app using software decoder exhibited consistent frame drops throughout playback of the same stream.

This comparison suggests that the issue is related to Media3 software decoder performance or configuration, rather than CPU or hardware decoding limitations on the device.

We have attached the following artifacts for reference:

  1. Bug report – VLC playback:

bug_report_vlc.zip

  1. Bug report – ExoPlayer sample app playback

bug_report_exoplayer_sample_app.zip

  1. Video recording – HLS stream on VLC
    https://drive.google.com/file/d/1cS-K4DjOyDsbXKMcIagaeO9OQTaXSH6I/view?usp=drivesdk

  2. Video recording – HLS stream on ExoPlayer sample app
    https://drive.google.com/file/d/1UiK729kyZBJafvwagca5-Cw3Bu3QW7NA/view?usp=drivesdk

Questions

  1. Are there any known performance limitations in Media3 software decoders when playing high-resolution content (above 480p)?
  2. Are there configuration parameters or optimizations available to improve software decoding performance in such scenarios?
  3. Would integrating third-party software decoding libraries (example, ffmpeg) offer better performance or be a recommended alternative?
  4. Are there any best practices or recommendations for achieving smooth software-decoded ad playback in dynamic ad insertion workflows, where live TS and HLS streams must run in parallel?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.