asbplayer icon indicating copy to clipboard operation
asbplayer copied to clipboard

Support YouTube frontends (Invidious, Piped)

Open Kellenok opened this issue 1 year ago • 1 comments

I wouldn't say it's critical for me, but there are definitely some users who are concerned about their privacy, so they don't use YouTube at all. Instead, they use third-party frontends like invidious and piped. The main problem is that there are many instances of such frontends, anyone can create them. so you will have to give the possibility to add your own links or somehow detect that the current site is an instance of the frontend.

Invidious

Docs — https://docs.invidious.io/ Instances — https://api.invidious.io/

I don't think it would be hard to do that for invidiuos, cause it gives you the option to download subtitles for the video, but as usual for auto subtitles there are duplicate lines there. image

Piped

Docs — https://docs.piped.video/docs/ Instances — https://github.com/TeamPiped/Piped/wiki/Instances

Piped doesn't give a direct way to download subtitles, but no one prevents you from extracting them from the same invidious. Issue about downloading

Kellenok avatar May 10 '24 11:05 Kellenok

I've been doing a little more research on the subject, especially invidious, and I found out a few things.

  1. Subtitles are easily downloaded via api. First we get the subtitle title via https://{instance-link}/api/v1/captions/{video-id} and then the subtitles themselves in vtt format https://{instance-link}/api/v1/captions/{video-id}?label={label}
  2. Subtitles are already fixed and do not have repeated lines.
  3. Not all instances have subtitles and as a user there is nothing we can do about it. https://github.com/iv-org/invidious/issues/4660. So you have to make several attempts to get subtitles from different instances.

Kellenok avatar May 29 '24 07:05 Kellenok

they are almost dead, so i think it's no longer relevant

Kellenok avatar Dec 30 '24 08:12 Kellenok