You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When composited, textures are overlaid over one another in the reverse order of their
registration order, so that the first registered source is on the very top. The way the textures
are overlaid can be customized using the {@link OverlaySettings} output by {@link
VideoCompositorSettings}.
I can be mistaken here, though, since Composition class itself doesn't provide explicit statement about rendering order. If so, what API/approach I can use to force rendering order?
Expected result
Textures are drawn in the reverse order they provided to Composition
Actual result
Order is not preserved, some medias got overlapped. Unpredictable output.
Hi @mikekudzin ,
The issue #1029 with ordering of EditedMediaItems was fixed in this commit and it is a part of the next 1.4.0 release. This should provide a fix for the bug you see.
I quickly looked through the code you have provided. You can also use TextOverlay as an effect and apply it to your video. This might be another approach on how to do it.
Version
Media3 1.3.1
More version details
Devices that reproduce the issue
Pixel 4a running Android 13
Pixel 6a running 14
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
I am trying to generate output video using following inputs:
Code is pretty straightforward
Output of the code above:
27.Jun.2024.16_40_45.GMTout_.bitmap.overlay-video-background.mp4
There is no original video in output. BUT SOMETIMES (rare) it produces expected output.
If I remove background from the composition
The output is nearly what I am expecting except the background (sic!)
27.Jun.2024.16.36.12.GMTout_.bitmap.overlay-video.mp4
And finally, setting alphaScale to 0.9
27.Jun.2024.17_06_09.GMTout._.3.layers.with.09.alphaScale.mp4
It looks like the video EditedMediaItemSequence get's overlaid by background EditedMediaItemSequence at some point.
Documentation for DefaultVideoCompositor states:
I can be mistaken here, though, since Composition class itself doesn't provide explicit statement about rendering order. If so, what API/approach I can use to force rendering order?
Expected result
Textures are drawn in the reverse order they provided to Composition
Actual result
Order is not preserved, some medias got overlapped. Unpredictable output.
Media
Bug Report
adb bugreport
to android-media-github@google.com after filing this issue.The text was updated successfully, but these errors were encountered: