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

Allow transition to ended if all tracks except subtitle track have ended #5896

Open
BROUDING opened this issue May 16, 2019 · 11 comments
Open

Comments

@BROUDING
Copy link

EXOPLAYER_VERSION=2.10.0

I'm testing with a video and 2 subtitles, and 1 subtitle's timeline is 3seconds longer than a video.

What happens now is, video is finished, but I don't get COMPLETED event until subtitle finish playing... and also "current time" keep updates and "video play time" didn't updated.

What I want to do is, I want to focus on Video play time and get the COMPLETED event when video is finished.... what should I do?

Thank you !!!

@BROUDING BROUDING changed the title Subtitle timeline doesn't match with Video timeline When subtitle timeline doesn't match with Video timeline May 16, 2019
@BROUDING
Copy link
Author

Confirmed that durationUs in createMediaSource doesn't affect the run time of any medias..

@ojw28
Copy link
Contributor

ojw28 commented May 20, 2019

ExoPlayer considers the end of the media to be the point at which all media has been played, including subtitles. Why is the subtitle longer than the video? It sounds like the media is kind of broken to me.

I don't think we have any plans to provide an easy mechanism for working around this.

@ojw28 ojw28 self-assigned this May 20, 2019
@tonihei
Copy link
Collaborator

tonihei commented May 20, 2019

You can also try to use a ClippingMediaSource to clip the subtitle source to the length of the video. This requires to know that in advance though.

@BROUDING
Copy link
Author

@ojw28 @tonihei
First, I appreciate your reply and time.
It is human error for subtitle makers, but it would have be awesome if media finish playing when video is done playing no matter what, since human error can happen anytime.

Now I'll try to work on ClippingMediaSource and see if the subtitle actually clipped as the duration I manually set...

@BROUDING
Copy link
Author

BROUDING commented May 22, 2019

@tonihei
ClippingMediaSource doesn't work as expected in my use case...

I approached like this >> I got a DASH media source with DashMediaSource.Factory and 3 different subtitles by ClippingMediaSource(Factory.createTextSampleFormat(source), durationUs) and made them to a single media source via MergingMediaSource. And the user can change the subtitle manually with custom subtitle choice view.

Media plays well so as subtitle, all I need now is just clipping subtitle length.. (since MergedMedia doesn't focus on Video timeline but on longest MediaSource...)

And I've set durationUs as 3000L or 3000000L for testing, and it didn't work as I expected...

Any idea why...?

@BROUDING
Copy link
Author

I just confirmed that ClippingMediaSource works on Videos, but not on Subtitles...
Follow up >> issue#5317

@ojw28 I guess it's still a bug..
btw, player in iOS seems focusing on video timeline than other media sources. My college has no problem without any changes...

Feel free to close this issue if there's no updates !

@tonihei
Copy link
Collaborator

tonihei commented May 22, 2019

Sorry, I forgot about #5317. Clipping text and metadata is not supported yet and implementation is tracked by the linked issue.

@tonihei
Copy link
Collaborator

tonihei commented May 22, 2019

Looks like you just found that out yourself :)

@BROUDING
Copy link
Author

Nah, I should have searched more- before I raise this issue, but hopped that this would be solved by now- hahah

But...now my issue is that I cannot get event when the video is finished playing........until subtitle makers don't make mistake...

@ojw28 ojw28 changed the title When subtitle timeline doesn't match with Video timeline Allow transition to ended if all tracks except subtitle track have ended Jun 6, 2019
@ojw28
Copy link
Contributor

ojw28 commented Jun 6, 2019

Changed this to a feature request. I think it should probably be an option, possibly passed via the track Format.

@ojw28 ojw28 assigned icbaker and unassigned ojw28 Jul 7, 2022
@icbaker
Copy link
Collaborator

icbaker commented Jul 7, 2022

ClippingMediaSource does now work on subtitles (#5317). Given that allows 'broken' media with different length tracks to be 'fixed' by truncating all the tracks to the same length, I'm not sure we also need a text-specific option to allow playback to finish 'early' - so I suggest we close this 'won't fix: intended behavior'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants