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

Handling repeated subtitles from YouTube? #4120

Open
edrozenberg opened this issue Dec 6, 2022 · 3 comments
Open

Handling repeated subtitles from YouTube? #4120

edrozenberg opened this issue Dec 6, 2022 · 3 comments

Comments

@edrozenberg
Copy link

edrozenberg commented Dec 6, 2022

I downloaded some auto-subtitles from YouTube recently, and the previous subtitle is shown with each new subtitle in IINA, for ex:

Hello
I'm Here

I'm here
how are you?

how are you?
I'm doing well

Snippet of the downloaded subtitle vtt:

WEBVTT
Kind: captions
Language: en

00:00:00.000 --> 00:00:01.550 align:start position:0%
 
dear <00:00:00.340><c>friends </c><00:00:00.680><c>Dear </c><00:00:01.020><c>viewers,</c>

00:00:01.550 --> 00:00:01.560 align:start position:0%
dear friends Dear viewers,
 

00:00:01.560 --> 00:00:03.590 align:start position:0%
dear friends Dear viewers,
listeners <00:00:01.850><c>and, </c><00:00:02.140><c>of </c><00:00:02.430><c>course, </c><00:00:02.720><c>subscribers </c><00:00:03.010><c>of </c><00:00:03.300><c>the</c>

00:00:03.590 --> 00:00:03.600 align:start position:0%
listeners and, of course, subscribers of the

YouTube correctly displays only one subtitle at a time. Not sure that IINA can deal with this issue, since the duplicated subs are in the vtt downloaded from YouTube.

What you want IINA to do:
Display only one subtitle line, without the previous subtitle.

What IINA does currently:
Displays the current subtitle and the previous subtitle at the same time.

Why you think this should be added:
Showing previous + current subtitle is confusing and hard to follow.

Examples of other projects that have something similar:

@low-batt
Copy link
Contributor

low-batt commented Dec 8, 2022

The IINA issue template contains this checkbox:

[ ] MPV does not have this problem.

The reason for asking this question is that for video/audio playback IINA uses libmpv from the mpv project. If the problem reproduces using the mpv player then for IINA it is an "upstream" problem. The issue must be reported to the mpv project at: mpv issues. Once that project releases a new version with a fix, IINA must be updated to use the latest version of the library from mpv.

In this case it is mpv that is rendering subtitles into the video. My expectation is that the mpv player will exhibit the same behavior as IINA. Would need a URL to a YouTube video that reproduces the issue to test that.

As for what is the proper way to render the subtitles, that is specified in detail in the document WebVTT: The Web Video Text Tracks Format. This type of subtitle file must adhere to that specification. As you can see from that document this form of subtitle file has a lot of capabilities.

@edrozenberg
Copy link
Author

Thank you. I didn't see the mpv template item for some reason. Same issue with mpv 0.35.0 (mpv.io) installed via homebrew cask. The subtitle file from YouTube contains the duplicate subtitles in each subtitle entry. Closing for now.

@low-batt
Copy link
Contributor

Thanks for confirming mpv also exhibits the same problem. When you report it to the mpv project post the issue number here so the IINA project can watch for a fix.

If you don't have time to report the problem to mpv you can post a link to a YouTube video that exhibits the problem here and I will try and reproduce the problem and enter an issue with the mpv project.

The IINA convention for such issues is to mark the issue with the "upstream" label and leave the issue open until the problem has been fixed in the IINA dependency and a new version of IINA has been released with the fix. This way it is more likely that other users looking to report the same will find the open issue and not enter a duplicate.

@low-batt low-batt reopened this Dec 10, 2022
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

2 participants