Closed
Description
Version
Media3 1.5.1
More version details
This video file can't not play after 1.4.0-alpha02
1.4.0-alpha01 can play well even if have error.
https://drive.google.com/file/d/18fYNCarTAbN84679hBS_KKobqRDWKlir/view?usp=drive_link
textTrackTranscodingEnabled need to set false
parseSubtitlesDuringExtraction need to set false
legacyDecodingEnabled need to set true
The above settings can be made to play in 1.5.1
Devices that reproduce the issue
Xiaomi 13
Devices that do not reproduce the issue
None
Reproducible in the demo app?
Yes
Reproduction steps
- add file path to media.exolist.json
Expected result
Play well
Actual result
See error
Media
https://drive.google.com/file/d/18fYNCarTAbN84679hBS_KKobqRDWKlir/view?usp=drive_link
Bug Report
- You will email the zip file produced by
adb bugreport
to android-media-github@google.com after filing this issue.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
icbaker commentedon Jan 17, 2025
What is the error?
FongMi commentedon Jan 17, 2025
1.4.0-alpha01 can see the error too, but can play video.
1.4.0-alpha02~1.5.1 can see the error and stop play.
icbaker commentedon Jan 17, 2025
This looks like a duplicate of #1722
Can you please try with
1.6.0-alpha01
?FongMi commentedon Jan 17, 2025
1.6.0-alpha01 is same. not play continued
icbaker commentedon Jan 17, 2025
Thanks - the changes in #1722 don't work here because the exception takes down the whole
MatroskaExtractor
and itsLoadable
, not just aLoadable
being used only for subtitle playback.Playback of your broken video can be permitted by adding
try / catch (RuntimeException)
around the call toparse
here:media/libraries/extractor/src/main/java/androidx/media3/extractor/text/SubtitleTranscodingTrackOutput.java
Lines 146 to 151 in 76088cd
But I'm not sure the best way to signal that error out of the player in a programmatically visible, non-fatal way (rather than just logging it and continuing) - for consistency with the way we handle other subtitle parsing errors.
icbaker commentedon Jan 22, 2025
Digging a bit further into the provided file, it has a cue that starts like this (i.e. has duration zero):
The cue looks like it contains some conversion metadata, and is not intended to be displayed.
This currently trips up some fiddly logic in
SsaParser
that's designed to support overlapping subtitles (see google/ExoPlayer#6595), and results in it creating a single, empty, cue list - which then violates the assumption that every SSA cue line results in at least two lists of cues, one containing the text and another containing no cues (to signal the end), which ends up throwing the exception you're seeing.I've got a change in review which fixes playback for your file by just ignoring cues where
startTimeUs >= endTimeUs
as invalid.I'm also looking at submitting a change that suppresses+logs all parsing errors that bubble out as far as
SubtitleTranscodingTrackOutput
as described above - in order to maintain parity with 'legacy' subtitle decoding (where errors that bubble out this far are suppressed and logged inTextRenderer
).FongMi commentedon Jan 22, 2025
Thank you for your hard testing.
Skip SSA cues where end time is before or equal to start time
Suppress (and log) subtitle errors in `SubtitleTranscodingTrackOutput`