syncplay-mobile icon indicating copy to clipboard operation
syncplay-mobile copied to clipboard

youtube support

Open soredake opened this issue 2 years ago • 10 comments

It would be nice if this can have youtube (and other sites) support with the help of yt-dlp like mpv on desktop.

soredake avatar Nov 15 '22 13:11 soredake

It would be nice if this can have youtube (and other sites) support with the help of yt-dlp like mpv on desktop.

Amazing idea! I have the same thought!

b0s-at-works avatar Feb 02 '23 06:02 b0s-at-works

Also, will be great to have that feature with ability to use custom utilities like aria2c and other utilities which are needed to add subtitles, add thumbnails and etc. That means you have to have to set custom command line arguments for yt-dlp, and also you will be able to run yt-dlp with agrument that will allow you to update yt-dlp as yt-dlp by itself supports self updating. Also will be funny if you will be able to play also youtube chat which can be saved in JSON file

But anyway it's up to you.

b0s-at-works avatar Feb 02 '23 06:02 b0s-at-works

Perks of writing Syncplay PC in Python made it possible to make use utilities and scripts like yt-dl to scrape and fetch YouTube videos. However, given the fact that Python is not directly supported in the Android ecosystem, I will have to resort to creating my own script to fetch YouTube videos. Google doesn't want anyone to watch their videos without Ads which is why they're restricting the way their video streams are exposed. There are some workarounds which I might implement to make this a possibility, probably even make it possible to import YouTube playlists as shared playlists.

As for subtitles, that is definitely possible. Many subtitle providers (like opensub) provide API endpoints to grab subtitles. I am considering that as well.

yuroyami avatar Feb 02 '23 10:02 yuroyami

https://github.com/JunkFood02/Seal is an example of android app that uses yt-dlp without any problem.

soredake avatar Feb 02 '23 10:02 soredake

@soredake Seal and similar libraries wrap JPython, FFmpeg, aria2c and yt-dlp at the cost of performance overhead and huge APK size. The APK is already large imo, rewriting the python libraries would be more utile, but should that turn out to be a valid workaround for now effort-wise and time-consumption-wise, I will go with it.

yuroyami avatar Feb 02 '23 15:02 yuroyami

Seal weight only 70mb (app) + 67mb (data), not so much.

I will have to resort to creating my own script to fetch YouTube videos.

Youtube is constantly making changes that break yt-dlp and multiple devs fix it without end, doing this alone will require many time and constant app updates to catch up with youtube changes.

soredake avatar Feb 02 '23 15:02 soredake

Seal weight only 70mb (app) + 67mb (data), not so much.

I will have to resort to creating my own script to fetch YouTube videos.

Youtube is constantly making changes that break yt-dlp and multiple devs fix it without end, doing this alone will require many time and constant app updates to catch up with youtube changes.

Thats why I've said that yt-dlp can be self updated. That utility itself have ability to download it's own new version

b0s-at-works avatar Feb 04 '23 07:02 b0s-at-works

@soredake Seal and similar libraries wrap JPython, FFmpeg, aria2c and yt-dlp at the cost of performance overhead and huge APK size. The APK is already large imo, rewriting the python libraries would be more utile, but should that turn out to be a valid workaround for now effort-wise and time-consumption-wise, I will go with it.

It doesn't matter whether you will make it or not. Just saying: Nice to have you! Have a great development!

b0s-at-works avatar Feb 04 '23 07:02 b0s-at-works

Possibly useful https://github.com/mpv-android/mpv-android/pull/58

girlmaya avatar Jul 01 '24 01:07 girlmaya

You could just download them using: https://github.com/deniscerri/ytdlnis No real need to implement in the app.

Edit: I tried the app out, and now I understand why you guys would want this.

7heMech avatar Sep 01 '24 10:09 7heMech