Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
139 stars 2 forks source link

Add a way to get subtitles from YouTube easily #2673

Open jae1911 opened 3 months ago

jae1911 commented 3 months ago

Is your feature request related to a problem? Please describe.

When trying to show a series to friends, the series itself is in French but does have English subtitles. While it is technically possible to setup subtitles in Resonite, it's really time consuming and has lots of steps to make it properly work.

Describe the solution you'd like

Add a way to get and display subtitles easily, so it could be integrated into video players (for instance, the default one). This would also allow for more accessibility for players that are hard of hearing or deaf.

Describe alternatives you've considered

Setting up subtitles manually, tho time consuming.

Additional Context

yt-dlp exposes some arguments to get subtitles:

Requesters

No response

shiftyscales commented 1 month ago

Seeking input from @Frooxius - during today's content team meeting options were being discussed for how to present / localize official video / tutorial content on-platform, and the concept of subtitles came up. We could possibly have community members provide localized voiceover and cut versions of our tutorial videos for other regions (notably in Japanese), but subtitles could possibly better fit into the existing localization system- particularly in combination with other functionality like #763.

While looking around to see what existing solutions we have available- I found there is a DynamicSubtitleProvider component which could possibly be used as a native feature on our video players- but I'm unclear on how that could be implemented into the existing video player as-is without requiring the user to manually insert subtitle files into the component for each video loaded.

Another possible option would be that if we include localized subtitle files onto our YouTube uploads directly- we could possibly dynamically pull those in using this request.

Frooxius commented 1 month ago

I don't see anything too special here.

We can just have it fetch the subtitles from YouTube when available and add something to the video player interface to setup subtitle display.

It seems relatively easy enough to do.

Main thing would be probably how to pick subtitles - we could just have it default to user's locale with an override for language code perhaps?

jae1911 commented 1 month ago

Main thing would be probably how to pick subtitles - we could just have it default to user's locale with an override for language code perhaps?

This is how I thought it could be done:

Try user's locale -> If available display those -> If not available, try english -> if english not available see the available ones and use them/list them somewhere on the player

Generally having a list of subs could be useful on the player.

Frooxius commented 1 month ago

Giving the user list of available subtitles is a fair bit more complicated. It's something we can add too, but it'll increase the complexity of this request, as we need to add mechanisms to fetch and display that information.

I'd probably suggest splitting that into its own thing, because adding an override first is simpler. Then extra UI can be made that lets you select that override visually, but that can be a separate task.

jae1911 commented 1 month ago

OK, I'll create a separate issue with other improvements for this then.

Frooxius commented 1 month ago

We should've probably kept this as one issue and focus on the more general support first, rather than splitting it already.

We still have to handle the design and engineering side of this, so it'll depend a bit on how that's implemented, I need to have a look into it.