Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSA/ASS Cues - two or more cues/phrases at the same time aren't displayed #4725

Closed
anonym24 opened this issue Aug 24, 2018 · 3 comments
Closed

Comments

@anonym24
Copy link

anonym24 commented Aug 24, 2018

Issue description

two or more cues/phrases at the same time aren't displayed when such lines are occur in .ssa/.ass file subtitles

screenshot_2

but only one cue is displayed during playback

Reproduction steps

load the next subtitles file - test5.ass.zip
play those subtitles with the next video file - https://github.com/Matroska-Org/matroska-test-files/blob/master/test_files/test5.mkv?raw=true
there should be two cues at 4-5 second

  1. ...the colossus of Rhodes!
  2. ...wake up! buddy! cabs are here, yeah!

but only one cue is displayed with ExoPlayer

...wake up! buddy! cabs are here, yeah!

Version of ExoPlayer being used

2.8.4

Test code to get all cues

             for (int i = 0; i < subtitle.getEventTimeCount(); i++) {
                List<Cue> cues = subtitle.getCues(subtitle.getEventTime(i)+1);
                for (Cue cue : cues) {
                  Log.i(TAG, "getCues -" + cue.text);
                }
              }

Logs

getCues - ...wake up! buddy! cabs are here, yeah!
    getCues - ...wake up! buddy! cabs are here, yeah!
    getCues - No!
    getCues - The colossus of Rhodes
    and it is here just for you Proog.
    getCues - It is there...
    getCues - I'm telling you,
    Emo...

...the colossus of Rhodes! is missing

@anonym24
Copy link
Author

test5.ass subtitles file source:

[Script Info]
; Script generated by Aegisub 3.2.2
; http://www.aegisub.org/
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: TV.601
PlayResX: 1024
PlayResY: 576

[Aegisub Project Garbage]
Audio File: test5.mkv
Video File: test5.mkv
Video AR Mode: 4
Video AR Value: 1.777778
Video Position: 125

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,20,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,2,2,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:03.54,0:00:05.29,Default,,0,0,0,,{\frz359.9\pos(483,53)}...the colossus of Rhodes!
Dialogue: 0,0:00:03.50,0:00:05.35,Default,,0,0,0,,{\frz359.9\pos(490,543)}...wake up! buddy! cabs are here, yeah!
Dialogue: 0,0:00:05.75,0:00:06.67,Default,,0,0,0,,No!
Dialogue: 0,0:00:06.71,0:00:12.54,Default,,0,0,0,,The colossus of Rhodes\Nand it is here just for you Proog.
Dialogue: 0,0:00:41.62,0:00:43.54,Default,,0,0,0,,It is there...
Dialogue: 0,0:00:43.58,0:00:46.66,Default,,0,0,0,,I'm telling you,\NEmo...

@ClarkKryptonite
Copy link

May I ask how you merge .ass to mediasource. I use the same video and .ass file in the issue, however ,the subtitle doesn't displayed.
here is my code.
`DataSource.Factory factory = createFactory(context);

    MediaSource mediaSource = createRegularMS(factory, localUrl2);
    Format subtitleFormat = Format.createTextSampleFormat(
            null,
            MimeTypes.TEXT_SSA,
            C.SELECTION_FLAG_DEFAULT,
            null);

    MediaSource subtitleSource = new SingleSampleMediaSource
            .Factory(factory)
            .createMediaSource(Uri.parse(localSubUrl2), subtitleFormat, C.TIME_UNSET);

MergingMediaSource mgMediaSource= new MergingMediaSource(mediaSource, subtitleSource)`

@tonihei
Copy link
Collaborator

tonihei commented Sep 2, 2019

Duplicate of #6320.

@tonihei tonihei closed this as completed Sep 2, 2019
@google google locked and limited conversation to collaborators Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants