Description
Version
Media3 1.6.1
More version details
I’m having a problem where some images refuse to play when included in a Composition
that is played through CompositionPlayer
. From what I can tell, the images have to be quite large (~50MP) and have some kind of EXIF meta data to trigger. (Possibly related to HDR or ICC Profile.)
When using androidx.media3
1.6.1, I get the following log printed every 10 ms, and otherwise no indication of an error:
Target buffer size reached with less than 500ms of buffered media data.
Rolling back to 1.5.1, I additionally get an error log and the player pauses itself:
playerFailed [eventTime=4.64, mediaPos=0.00, window=0, period=0, errorCode=ERROR_CODE_FAILED_RUNTIME_CHECK
androidx.media3.exoplayer.ExoPlaybackException: Unexpected runtime error
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:721)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.os.HandlerThread.run(HandlerThread.java:85)
Caused by: java.lang.IllegalStateException: Playback stuck buffering and not loading
at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1224)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:562)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.os.HandlerThread.run(HandlerThread.java:85)
]
Some other things I’ve noticed:
- If I strip all EXIF data, the same image works just fine
- The images I’ve seen the problem with are all captured on a Pixel 8/9 device, and are not modified otherwise
- Rendering the exact same
Composition
object to file with a Transformer works without issues - Can be reproduced in the demo app by including the problematic image
There’s a minimal repro code here: https://github.com/niklasfejes/compplayer-bug-repo
Of interest may be the CompositionPlayer
logic located in ReproVideoPlayer.kt, and an example image that causes the playback to fail in the assets dir.
Devices that reproduce the issue
- Google Pixel 8 Pro running Android 15
- Qualcomm 8750 device running Android 15
- Qualcomm 8550 device running Android 13
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
- Include the image in the Edit in the
composition
demo - Preview the Edit
Expected result
The edit plays successfully
Actual result
The playback stops when reaching the image
Media
Bug Report
- You will email the zip file produced by
adb bugreport
to [email protected] after filing this issue.