Open BrLudington opened 7 months ago
Looks like the media is not playable on that device: 1080, 2340, 61.20777
which is not supported by the device format_supported=NO_EXCEEDS_CAPABILITIES
.
ExoPlayer actually ignores this hint and still tries to play content that is reported as exceeding capabilities. The result is undefined if you seem to confirm.
I'm not sure we can really help with this from the library side I'm afraid.
Well that sucks. Do you know of any way I can get Exoplayer to detect if it can't play a video more reliably? I would use the onPlayerError method, but that only seems to get called if I place a breakpoint when debugging and let a few seconds pass.
Version
Media3 1.3.1
More version details
No response
Devices that reproduce the issue
Google Corsola Chromebook ChromeOS Version 123.0.6312.94 (Official Build) (64-bit)
Devices that do not reproduce the issue
Smart phones and tablets in general.
Reproducible in the demo app?
Not tested
Reproduction steps
Try to play the attached file through Exoplayer on a Chromebook.
The code used:
Expected result
Like with Android smartphones and tablets, it should play just fine. For example using the Google Pixel Tablet, Galaxy Note 5, Pixel 4a, Pixel 7 pro, etc. all work.
Actual result
The screen remains black, the video never plays, even though it finds the video file. The duration it finds is also incorrect (saying it is 8 seconds long when the video is actually 13 seconds). There is no crash log or stacktrace.
EDIT: On some occasions it does call Exoplayer's onPlayerError. The PlaybackExceptionError reads
androidx.media3.exoplayer.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.640032, -1, null, [1080, 2340, 61.20777, ColorInfo(BT709, Limited range, SDR SMPTE 170M, false, 8bit Luma, 8bit Chroma)], [-1, -1]), format_supported=NO_EXCEEDS_CAPABILITIES
Media
https://github.com/androidx/media/assets/166638079/66b4aa73-9033-47b4-8130-5a12a4820aa6
This is just a video I had downloaded off of Youtube for testing purposes. There's other videos that end up having the same issue.
Bug Report
adb bugreport
to android-media-github@google.com after filing this issue.