androidx / androidx/media

Transformer: Color Discrepancy between Single and Multiple BitmapOverlay

Open
#2,810 2 comments 1 reaction 1 assignee View on GitHub

@droid-girl is already working on this.

Since Oct 3, 2025.

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

Description

Version

Media3 main branch

More version details

We are trying to create a video with a generated Bitmap. This Bitmap will be constructed from multiple layers.
We found out that there's a discrepancy in the result between using a single BitmapOverlay where we combine the layers first and multiple BitmapOverlay where we pass the responsibility to the Transformer.

Here you can see the difference between the image when we're using single BitmapOverlay vs multiple BitmapOverlay.
As a context, the result that we are expected is the one in single BitmapOverlay

BitmapOverlay Result
Single CleanShot 2025-10-01 at 09 13 05@2x
Multiple CleanShot 2025-10-01 at 09 13 15@2x

For more information, you can check this demo repository: https://github.com/esafirm/media3-transformer-demo

Devices that reproduce the issue

Any device.

Devices that do not reproduce the issue
Reproducible in the demo app?

No

Reproduction steps

In the demo app:

  1. Press the export button in the app
  2. It will generate two videos in /Download/ directory:

merged-output*.mp4 --> This is the video created with single BitmapOverlay
separated-output*.mp4 --> This is the video create with multiple BitmapOverlay

Expected result
CleanShot 2025-10-01 at 09 13 05@2x
Actual result
CleanShot 2025-10-01 at 09 13 15@2x
Media

Any media is fine. Here's the one in the demo repo: https://github.com/esafirm/media3-transformer-demo/blob/main/app/src/main/assets/audio.m4a

Bug Report
  • You will email the zip file produced by adb bugreport to android-media-github@google.com after filing this issue.

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.