Seneral / FlagPlayer

Music-oriented YouTube web-app - single-page, client-side, simple
https://flagplayer.seneral.dev
17 stars 5 forks source link

Youtube music does not work anymore #7

Closed p3g4asus closed 3 years ago

p3g4asus commented 3 years ago

Youtube music used to work with flagplayer. But since a week or so it stopped working at all. Youtube-dl does not work anymore too. Do you think it can be fixed in any way?

p3g4asus commented 3 years ago

Apparently I am wrong: Youtube music still works but with very, very, very reduced amount of video / audio. Most of them do not work. Is this the copyright issue (#1)?

Seneral commented 3 years ago

You mean you use the music.youtube.com subdomain? Interesting, I've never tried that so the fact it was supported was just because they operated the same by chance. First random video seems to work with some minor issues. But generally if youtube-dl also broke, then its a new issue, because youtube-dl is not affected by #1 since they are a local program and not a website subject to CORS restrictions. So if you can tell me some videos that break, I'll try fixing them.

Seneral commented 3 years ago

Also what do you mean in a reduced amount? Is the bandwidth bad? That might be my fault, a couple days ago I switched the cors server on heroku to use free dynos (their server resources). I still have a couple paid months left from github student but afaik the free ones work just the same and from the type of project this is, I don't think it benefits from paid dynos at all. All it would mean is that after nobody used the website for half an hour (which happens a lot with how few people use it), the first request takes like two or three seconds, but I dont know of any bandwidth restrictions. The thing is even if that were the case there's little I can do, at latest after 6 months I'd have to pay 7$/month which is a bit too much, so as long as the free work I'd like to use them.

p3g4asus commented 3 years ago

I am sorry. I just realized that my issue was rather incomplete. Yes, I mean music.youtube.com. FlagPlayer succedes in expanding music.youtube.com playlist links. But when trying to play video / songs inside the playlist the vast majority of videos / song fails to play. Only few of them plays fine. This affects also youtube-dl. youtube-dl used to play fine the vast majority of videos till last week or so. After that date it is failing to play the vast majority of videos / songs. If you want to test you can use my public playlist.

Seneral commented 3 years ago

Ok just had a look, seems most if not all of them are affected by the IP check described in #1 Now I'm just curious why youtube-dl would be affected - my older version did break, because of some recent youtube changes, but the newest version from beginning of march (and ofc the one from two days ago) worked fine. Note that some videos in the list are unavailable, so they can't be loaded of course.

As for FlagPlayer, there's only one way to circumvent this right now that I know of: Have the server and the video downloader share the same IP. This could either be by starting up the server on your desktop PC (or installing it as a service), and then you can use that local server just fine and access all videos. This of course is impossible on mobile so not great. Or alternatively I would allow downloading of videos that are affected (or at least the audio of those) over the official CORS server. While that would work right now, that is not sustainable either when more people used the website.

Perhaps, at some point it might be possible to circumvent this, but only if they implemented the IP check sloppily - if they do a proper check server-side, there's nothing to be done about it.