dyc3 / opentogethertube

Watch videos with your friends. The spiritual successor to TogetherTube, preserving the spirit of it's simple to use interface, while improving it's look, feel, and reliability.
https://opentogethertube.com
GNU Affero General Public License v3.0
411 stars 56 forks source link

Generalized HLS stream scraping #618

Open xRealNeon opened 2 years ago

xRealNeon commented 2 years ago

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

At the moment I can't watch all videos from all providers, just those who are supported.

Describe the solution you'd like

IDK how to implement this

Additional context

Just an idea, nothing to rush, but it would be very cool because this is such a cool feature it just works with almost all sites.

dyc3 commented 2 years ago

I'm not exactly sure if this is practical realistically. Different sites have their different (often proprietary) way they stream video. It's not necessarily as simple as just grabbing the video source from a <video> element.

hofq commented 2 years ago

The Site i used before used an addon to accomplish this: https://addons.mozilla.org/de/firefox/addon/twoseven-extension/

The Addon can Grab HLS & mp4 and i think some other stuff.

That way you can offer Support for most Sites that use Open Standards

dyc3 commented 2 years ago

I've never used twoseven, does it grab the video and stream it in it's own web page or the original site's webpage (like netflix party)?

hofq commented 2 years ago

It does look in the Source for hls(m3u8) or mp4 Videos/Files and pulls them into plyr on twoseven. If i understand that correctly they sync the player streaming it from the Sites.

The Intigration of the player on the site is besides no Quality Control of the Video and these Youtube recommendations popups you cant click away really nice and complete.

The Tabs on the top for DRM Regulated Sites (Netflix, Disney+ ...) are synchronized iframes like NetflixParty (but they suck).

grafik grafik grafik

dyc3 commented 2 years ago

Ah, interesting. This is looking way more feasible than I thought.

hofq commented 2 years ago

you named the Issue "Generalized HLS stream scraping on the client side for proprietary (paid) video platforms (eg. Netflix)", on the Most DRM Protected Sites e.g. Netflix or Amazon Prime it's not possible to scrape the HLS from the Site.

It just works for Sites that offer for non Propriety Protocols. for example TikTok & crunchyroll or for me in Germany espacially daserste.de arte.tv or pietsmiet.de

Links for Content on Netflix are Authentication & DRM Protected, so just synchronizing the Tab/ Playback over the Platforms Directly/ Framed is possible. I am sorry if I have expressed this in a misleading way. grafik

dyc3 commented 2 years ago

Ah, ok, that makes a LOT more sense. No worries! Regardless, this would be a pretty nice feature to have anyway, and it'll be way easier to implement if we can do metadata extraction on the server side.

xRealNeon commented 1 year ago

Maybe you could add a youtube-dl scraper to get the direct mp4 link for all supported sites.

xRealNeon commented 1 year ago

At the moment, I am watching a series from German public television. I am doing yt-dlp -g <url> and then putting the link into ott