SSA-in-MKV doesn't support simultaneous subtitles
See original GitHub issueExoPlayer Version
2.17.1
Devices that reproduce the issue
-
All devices I used. It’s not device-relevant.
-
Devices I used: OnePlus 8T, OnePlus 10 Pro, Xiaomi Mi11 Ultra, Asus ROG Phone 4, Red Magic 6, Xiaomi Redmi Note 8 Pro, Samsung Galaxy S21
-
All of the aforementioned devices run Android 10 to 12.
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
- Loading any media file.
- Passing an SRT/ASS subtitle file to ExoPlayer that contains two (or more) lines that show up at the same time.
Expected result
- Both subtitles should appear at the same time.
Actual result
- If two subtitles are overlapping, the subtitle that appears later will remove the existence of the subtitle that appeared before it, albeit both co-existing during that timeframe.
- In many movies and series, subtitles overlap in some dialogues.
Media
As for the video file, just grab any media from https://thedigitaltheater.com/dts-trailers/
Bug Report
- You will email the zip file produced by
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
HTML5 Video: Displaying two different subtitles simultaneously
I am using the standard HTML5 video subtitle functions to display subtitles (provided in srt and vtt) in the builtin HTML5 video player....
Read more >How to Add Multiple Subtitles to a Video in DaVinci Resolve
In this tutorial, I'll show you How to Add Multiple Subtitles to a Video in DaVinci Resolve. Download DaVinci Resolve ...
Read more >Displaying two subtitle tracks simultaneously - Ask Ubuntu
It would help a lot while learning a new language. I have some *.mkv movie with two embedded subtitles, how would I turn...
Read more >Is it possible to insert two simultaneous subtitles (closed ...
When using a single subtitle frame, I have found that it is not possible to have text in two different font thicknesses -...
Read more >YouTube™ dual subtitles
Automatically switch to local language, bilingual subtitles, ... to machine translation if not. feedback email support@dual-subtitles.com.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for clarifying that this specifically affects SSA inside MKV - that would explain why the commit I was referencing above isn’t ‘working’.
And thanks for providing example media, that will help to check any fix made for this works as expected.
The timestamps for SSA subtitles inside Matroska containers are extracted from the Matroska
TimeStamp
andBlockDuration
elements. TheMatroskaExtractor
then emits a separate ExoPlayer ‘sample’ for each subtitle. This is in contrast to the way ‘sideloaded’ SSA subtitles are handled, where the whole file is emitted as a single ExoPlayer ‘sample’The changes in https://github.com/google/ExoPlayer/pull/6595 assume that all the overlapping subtitles appear in the same ‘sample’.
We have some much larger subtitle changes in our future plans, which will change how subtitles map to ‘samples’, and should make the code paths between sideloaded SSA and SSA-in-MKV more similar. I’m afraid don’t think it’s worth trying to fix this issue with the current code, because it’s all going to change, and so the work would largely be wasted - but I will add it to the list of issues we should aim to resolve as part of the much larger refactor. Thanks for raising it 😃
ExampleFiles.zip
Regardless to MimeTypes such as ASS and SRT. There are two categories of subtitles I am talking about: Externally-loaded ones (manually loaded) and internal ones (coming in a MKV container).
The issue does NOT exist with manually-loaded SSA/ASS subtitle files. Here’s where the problem is:
I have attached the following files to reproduce the problem:
Tested as of version 2.18.0. @icbaker @google-oss-bot I hope this helps.