Skip to content

[Enhancement] Optimize what FreeTube selects as the first caption #1444

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

Closed
taivlam opened this issue Jun 24, 2021 · 1 comment · Fixed by #1661
Closed

[Enhancement] Optimize what FreeTube selects as the first caption #1444

taivlam opened this issue Jun 24, 2021 · 1 comment · Fixed by #1661
Assignees
Labels
enhancement New feature or request

Comments

@taivlam
Copy link
Contributor

taivlam commented Jun 24, 2021

Is your feature request related to a usage problem (not a bug)? Please describe.

Yes, this feature request is related to a usage problem. (I don't think this is a bug.)

I would like FreeTube to improve the default set of captions that it chooses by default. There are two categories of scenarios, small cases and large cases. For the examples, they will be videos in English, but this could apply to any other language. (Ignore cases with either 0 captions or only auto-generated captions, even if YouTube detected the wrong spoken language.)

YouTube somehow manages to always pick the correct default caption, which is provided English captions, but FreeTube does not. (I'm not sure how FreeTube picks the default caption list, though it's probably rather deterministic; on the other hand, I'll surmise that YouTube is always correct due to Google's privacy invasive browser tracking.)

Small Cases

Small cases" will be when there are only 2 captions: channel provided or auto-generated.

  • Sometimes, when the captions are first activated in FreeTube, FreeTube currently defaults to the auto-generated captions - even when channel-supplied captions exist. For the simplest example case, assume the language is English with this video.

For example, when I press C in FreeTube to turn on the captions in FreeTube for the following video, the captions default to english auto-generated - even though provided english (united states) exists.

However, on YouTube, doing the same action will automatically choose English (United States) first, instead of English (auto-generated).

  • Sometimes, the default behavior of captions match in FreeTube and YouTube. This video is an example of this.

There isn't a clear pattern (from just 2 examples) why FreeTube behaves this way.

  • I'm not sure how FreeTube should handle cases in which YouTube has provided captions and auto-generated captions in the wrong language. (There are legitimate cases I've seen but can't remember where it was clear there were intentionally no English subtitles.)

Large Cases

Large cases are when there are 2 or more provided caption tracks. To illustrate the behavior of FreeTube, there are 2 types of large cases.

  • The first type of large case is when all other provided captions are alphabetically after English (at least in English), so FreeTube and YouTube are in agreement (but probably not the most robust method for FreeTube). For example, this video has provided captions for English and 10 other languages. However, FreeTube displays English first because it is the first provided caption language in the caption menu.

  • The second type of large case is when there is any language that appears before English alphebetically (usually, either Arabic or either form of Chinese). In this example where the first caption in FreeTube doesn't match YouTube, FreeTube shows provided Arabic but YouTube shows provided English.

Describe the solution you'd like to see implemented

FreeTube should prioritize using the channel's provided soft captions, instead of defaulting to YouTube's auto-generated captions. For example, in the "smallest" case of 2 choices of either auto-generated English or provided English captions, FreeTube should be able to default to the provided English captions when I press C to activate the captions.

Describe alternatives you've considered

No, I don't think there are any other alternatives (besides leaving FreeTube the same).

Screenshots

(I didn't think this was necessary, since the description was more important.)

Additional context

  • I am not sure how this would be solved/implemented for more complex cases, or
    if other unaccounted cases exist.

  • I understand if this is out of scope for FreeTube, since all cases of behavior that I noticed over time when I used to use the official instance of Invidious and downloading captions with youtube-dl. If this GH issue is barking up the wrong tree, then I could suggest the optimization suggestion in the appropriate location.

@taivlam taivlam added the enhancement New feature or request label Jun 24, 2021
@GilgusMaximus
Copy link
Contributor

Out of the box, without looking into the code, I will assume that we just take the first of the list. This can be changed, but obviously has to be robust enough to not create errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants