ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Last Cue in subtitle not considered when playing segmented subtitles

Open gvidda opened this issue 8 years ago • 4 comments

Issue description

When playing DASH with segmented TTML and the last Cue overlaps the subtitle segment, subtitles are "cleared" and doesn't show any new until the next subtitle segments first Cue occurs. This is very visible when TTML segments have the same length as video segments.

Link to test content

Emailed test media link to [email protected].

Version of ExoPlayer being used

2.7.1 release

Device(s) and version(s) of Android being used

Reproduced on all tested devices but mostly tested on Galaxy S9 Android 8.0 and Pixel 2 Android 8.1

gvidda avatar Apr 10 '18 16:04 gvidda

If you have 5s segments and a subtitle is to be displayed from 3s -> 6s, my understanding is that the first segment should include the subtitle with start/end timestamps 3s -> 5s, and that the second segment should also include the same subtitle with start/end timestamps 5s -> 6s. In this case I don't think the subtitle will disappear.

Please clarify whether your content does this. Thanks!

ojw28 avatar Apr 10 '18 18:04 ojw28

I'll have to investigate if it's possible to duplicate the last Cue/sample into the next segment when encoding our media. Right now it doesn't do that. In your above example the first segment have 3s -> 6s and the next segment nothing in that timespan.

gvidda avatar Apr 10 '18 21:04 gvidda

I'm pretty sure that's not the correct way to prepare media. Seeking cannot work properly when content is prepared as you describe, for example, because the player has no of knowing which previous segments might contain subtitles that are still supposed to be visible at the seek position. The player would have to download all segments up to the seek position to figure this out.

ojw28 avatar Apr 10 '18 21:04 ojw28

I just wanted to get back regarding this issue (for historys sake if someone reads this and have the same problem) that this was ultimately solved for us in the backend/packager. The "bad media" subtitles worked in webplayers, but it was better to package it according to an EBU standard (like ojw28 described above).

gvidda avatar May 21 '18 07:05 gvidda