How to fix the broken web (Youtube & pals) .ft PM+MPV

Post your tutorials for using applications or performing related tasks here.
Note: Not for "how do I...?" Questions!
Forum rules
Tutorials and Howtos should only relate to developed software, and not to third party applications. e.g.: Don't post a generic Howto for configuring a firewall.
If you have a question how to do something, you should use one of the support boards, not this board. It is meant for people to document and post instructions.
jangdonggun1234
Fanatic
Fanatic
Posts: 104
Joined: 2013-06-06, 01:29

How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by jangdonggun1234 » 2023-03-15, 13:13

Hi!

In this tutorial I want to share my way of dealing with the broken web made by Google and their pals, they keep adding unecessary features to make the web more and more slow and ugly. In this case we need to solve the problem of Youtube/Dailymotion/Nicovideo/video sharing/social websites... first because they're very popular. Okay, now just let me cook!

- First, install: Open With Edge, IE, Chrome, and More
- Download MPV and extract to your desired directory: https://sourceforge.net/projects/mpv-pl ... ows/files/ or https://github.com/shinchiro/mpv-winbui ... e/releases
- Download yt-dlp and extract to your MPV's directory: https://github.com/yt-dlp/yt-dlp/releases
- Ctrl + Shift + A -> find Open With Edge, IE, Chrome, and More -> Options:
- Add MPV as Menu, PATH_TO_YOUR_MPV.EXE as Location, if you aren't sure check my image:
Image
Now, go to Youtube and let's test!
- Right click -> Open with MPV -> Done!
- Or Go to video page -> Toolbar button -> Open with MPV -> Done!
Image
Video: https://streamable.com/4zztn3

As you can see, the performance of MPV is top notch (I opened 3 videos at the same time, no big deal)! It's thousands times better than web browsers' HTML5 player, and it's very neat, you can use shortcuts 1-2 to change contrast, 3-4 to change gamma, [] to change speed... and more!

I hope you enjoy this tutorial and see you! :mrgreen:

User avatar
BopBe
Hobby Astronomer
Hobby Astronomer
Posts: 24
Joined: 2019-08-21, 19:59

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by BopBe » 2023-03-15, 13:42

That's pretty much my setup as well, but I use "Open With" and Invidious instead.

jangdonggun1234
Fanatic
Fanatic
Posts: 104
Joined: 2013-06-06, 01:29

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by jangdonggun1234 » 2023-03-16, 13:12

BopBe wrote:
2023-03-15, 13:42
That's pretty much my setup as well, but I use "Open With" and Invidious instead.
Invidious is also a good idea, I use Youtube because I need the Subscription feature to follow my favorite channel, and it's possible to fully connect Pale Mon/Firefox to yt-dlp+MPV too, so I can mark videos as watched, or just play my Subscription playlist.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2373
Joined: 2012-08-19, 20:32

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by back2themoon » 2023-03-16, 16:21

Great tips, thanks.

In order to still have access to YouTube comments etc. perhaps it's a good idea to block unnecessary stuff -including videos- via content blocker, so the page might load faster than usual?

For example, I've blocked google/googlevideo/gstatic.com. Not sure how faster YT works though. 3rd-party script/frame blocking might be a better solution?

jangdonggun1234
Fanatic
Fanatic
Posts: 104
Joined: 2013-06-06, 01:29

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by jangdonggun1234 » 2023-03-16, 20:14

back2themoon wrote:
2023-03-16, 16:21
Great tips, thanks.

In order to still have access to YouTube comments etc. perhaps it's a good idea to block unnecessary stuff -including videos- via content blocker, so the page might load faster than usual?

For example, I've blocked google/googlevideo/gstatic.com. Not sure how faster YT works though. 3rd-party script/frame blocking might be a better solution?
As for me, I use Youtube Mobile to make YT like 10x faster, YT Desktop is a huge bloat. And yes, if it's possible you should block as much JS as possible because same reason, non-Mobile YT is so slow and if we watch with MPV, we don't need JS anymore.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by moonbat » 2023-03-16, 22:51

back2themoon wrote:
2023-03-16, 16:21
I've blocked google/googlevideo/gstatic.com.
Also globally block doubleclick.net - it serves ads on Youtube and everywhere else on the web.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
BopBe
Hobby Astronomer
Hobby Astronomer
Posts: 24
Joined: 2019-08-21, 19:59

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by BopBe » 2023-03-17, 04:22

jangdonggun1234 wrote:
2023-03-16, 13:12
Invidious is also a good idea, I use Youtube because I need the Subscription feature to follow my favorite channel [...]
Just wanna point out that various public Invidious instances allow for local account creation and subsequent channels subscriptions.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2373
Joined: 2012-08-19, 20:32

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by back2themoon » 2023-03-17, 10:51

moonbat wrote:
2023-03-16, 22:51
back2themoon wrote:
2023-03-16, 16:21
I've blocked google/googlevideo/gstatic.com.
Also globally block doubleclick.net - it serves ads on Youtube and everywhere else on the web.
Thanks. Whenever I see this, I remember it being already blocked (red in uBO). Perhaps it's mostly covered by the standard ad-blocking filterlists?

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by moonbat » 2023-03-17, 11:45

back2themoon wrote:
2023-03-17, 10:51
Perhaps it's mostly covered by the standard ad-blocking filterlists?
They may usually block subdomains or full URLs - I'm saying just block the whole domain because it has absolutely nothing you need to render a regular webpage.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

jangdonggun1234
Fanatic
Fanatic
Posts: 104
Joined: 2013-06-06, 01:29

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by jangdonggun1234 » 2023-03-17, 12:46

back2themoon wrote:
2023-03-17, 10:51
moonbat wrote:
2023-03-16, 22:51
back2themoon wrote:
2023-03-16, 16:21
I've blocked google/googlevideo/gstatic.com.
Also globally block doubleclick.net - it serves ads on Youtube and everywhere else on the web.
Thanks. Whenever I see this, I remember it being already blocked (red in uBO). Perhaps it's mostly covered by the standard ad-blocking filterlists?
You may also want to try Youtube Mobile, it's REALLY fast honestly, demo video: https://streamable.com/atej6a
Use Pale Moon's about:config and override m.youtube.com's UA with:

Code: Select all

Opera/12.02 (Android 4.1; Linux; Opera Mobi/ADR-1111101157; U; en-US) Presto/2.9.201 Version/12.02

User avatar
BopBe
Hobby Astronomer
Hobby Astronomer
Posts: 24
Joined: 2019-08-21, 19:59

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by BopBe » 2023-03-17, 19:33

Is this green themed mpv osc your own work?

jangdonggun1234
Fanatic
Fanatic
Posts: 104
Joined: 2013-06-06, 01:29

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by jangdonggun1234 » 2023-03-18, 01:13

BopBe wrote:
2023-03-17, 19:33
Is this green themed mpv osc your own work?
It's uosc, the easiest to use osc: https://github.com/tomasklaen/uosc

Intro: https://user-images.githubusercontent.c ... 3910c.webm

User avatar
frostknight
Fanatic
Fanatic
Posts: 171
Joined: 2022-08-10, 02:25

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by frostknight » 2023-03-18, 03:45

Off-topic:
Not sure if relevant, but youtube also breaks on certain firefox derivatives, such as fennec f-droid and mull.

At least with regard to comments you make not getting deleted.

I have had 6+ comments get deleted this way lately...

I rarely use it, for obvious reasons.
But I digress, do any of you know any hosts files that effectively block the doubleclick it-clown people who think advertisements need to do tracking?
If it isn't broken, don't fix, unless you are a corporation, because that's the only way you can make money to the point where you can dominate the world in a megalomaniac sociopathic way that no one really wants that also heavily destroys the environment via data collection and wasting water

SMH...

If you believe Jesus is your savior, don't support any fascists, otherwise you are deceiving yourself.

I however, do believe in him. Don't let your pride blind you, lest you wish to be greatly humbled unexpectedly, as this will hurt on an agonizing scale

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by moonbat » 2023-03-18, 05:16

frostknight wrote:
2023-03-18, 03:45
do any of you know any hosts files
Why do you need a hosts file when you can just block the entire domain in whatever adblocker you presumably use? Or literally just add it to your own hosts file! :wtf:
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

jangdonggun1234
Fanatic
Fanatic
Posts: 104
Joined: 2013-06-06, 01:29

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by jangdonggun1234 » 2023-03-18, 08:55

frostknight wrote:
2023-03-18, 03:45
Off-topic:
Not sure if relevant, but youtube also breaks on certain firefox derivatives, such as fennec f-droid and mull.

At least with regard to comments you make not getting deleted.

I have had 6+ comments get deleted this way lately...

I rarely use it, for obvious reasons.
But I digress, do any of you know any hosts files that effectively block the doubleclick it-clown people who think advertisements need to do tracking?
Hosts file is easy to detect and gets blocked by Anti-Adblock scripts, it's always better to use uBlock and it allows you to bypass most Anti-Adblock scripts with zero efforts.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2373
Joined: 2012-08-19, 20:32

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by back2themoon » 2023-03-18, 17:08

About mpv, it wasn't the best option for my very old system (high CPU usage). I tried MPC-HC instead and it worked like a charm, all GPU and the excellent madVR renderer can be used, too. You can set the location of yt-dlp.exe in Options/Advanced. It only lacks support of YT chapters. Apparently, the author hates this feature with a passion.
jangdonggun1234 wrote:
2023-03-17, 12:46
You may also want to try Youtube Mobile, it's REALLY fast honestly, demo video: https://streamable.com/atej6a
Use Pale Moon's about:config and override m.youtube.com's UA with:

Code: Select all

Opera/12.02 (Android 4.1; Linux; Opera Mobi/ADR-1111101157; U; en-US) Presto/2.9.201 Version/12.02
Do mean to add the m.youtube.com override as an additional one, along with the existing youtube.com? In any case, I tried browsing to YT mobile but it keeps reverting to the desktop version. Also tried the MTube extension. It did load the mobile version but that doesn't really seem to work properly (no scrolling, no video loading, weird behaviour).

jangdonggun1234
Fanatic
Fanatic
Posts: 104
Joined: 2013-06-06, 01:29

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by jangdonggun1234 » 2023-03-18, 18:56

back2themoon wrote:
2023-03-18, 17:08
About mpv, it wasn't the best option for my very old system (high CPU usage). I tried MPC-HC instead and it worked like a charm, all GPU and the excellent madVR renderer can be used, too. You can set the location of yt-dlp.exe in Options/Advanced. It only lacks support of YT chapters. Apparently, the author hates this feature with a passion.
jangdonggun1234 wrote:
2023-03-17, 12:46
You may also want to try Youtube Mobile, it's REALLY fast honestly, demo video: https://streamable.com/atej6a
Use Pale Moon's about:config and override m.youtube.com's UA with:

Code: Select all

Opera/12.02 (Android 4.1; Linux; Opera Mobi/ADR-1111101157; U; en-US) Presto/2.9.201 Version/12.02
Do mean to add the m.youtube.com override as an additional one, along with the existing youtube.com? In any case, I tried browsing to YT mobile but it keeps reverting to the desktop version. Also tried the MTube extension. It did load the mobile version but that doesn't really seem to work properly (no scrolling, no video loading, weird behaviour).
By default, MPV doesn't use GPU to play video, so you may want to add hwdec=auto-safe to force MPV to use GPU, MPV should have better performance than MPC-HC I think, it's always been rated as one of the best performant player, just with higher learning curves.

Yeah, I just use the about:config method and I believe it should works:

general.useragent.override.m.youtube.com and general.useragent.override.www.youtube.com

Yeah, there's some wierd behaviors, but if you use uBlock's scriptlets feature aeld (addEventlistenerDefuser https://github.com/gorhill/uBlock/wiki/ ... defuserjs-) to blacklist click and touch-start, things should work pretty much the same as Youtube PC.

Code: Select all

||m.youtube.com##+js(aeld, /^(?:click|touch-start)$/)
That will completely disable AJAX browsing.

User avatar
sidology
Moon lover
Moon lover
Posts: 79
Joined: 2021-12-04, 22:07

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by sidology » 2023-03-18, 19:54

jangdonggun1234 wrote:
2023-03-18, 18:56
Yeah, there's some wierd behaviors, but if you use uBlock's scriptlets feature aeld (addEventlistenerDefuser https://github.com/gorhill/uBlock/wiki/ ... defuserjs-) to blacklist click and touch-start, things should work pretty much the same as Youtube PC.

Code: Select all

||m.youtube.com##+js(aeld, /^(?:click|touch-start)$/)
That will completely disable AJAX browsing.
Are you sure this works with uBlock Legacy?

User avatar
BopBe
Hobby Astronomer
Hobby Astronomer
Posts: 24
Joined: 2019-08-21, 19:59

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by BopBe » 2023-03-18, 21:00

> By default, MPV doesn't use GPU to play video, so you may want to add hwdec=auto-safe [...]

This is wrong. mpv will always render video using the gpu facilities in one way or another by default. Rendering frames using the gpu has nothing to do with `hardware decoding` video. There are no CPU (aka. software) rendering fallback as far as I know.

The only way to minimize both the cpu+gpu cost in mpv is to set `gpu-dumb-mode=yes` in your conf. That'll disable all default built-in shaders and set the image scaler to bicubic. It'll still use any gpu facilities to render the frames tho.

Edit: adding that mpv on Windows isn't a lightweight media-player AT ALL. This is either a fallacy made on purpose by channers and replicated, or a mis-understanding on how the player innards really work. With that said, I can play 720p@60fps YT content with a v0.29.0 Windows build of the program on my wifes 2011 laptop with very few frames being dropped.

jangdonggun1234
Fanatic
Fanatic
Posts: 104
Joined: 2013-06-06, 01:29

Re: How to fix the broken web (Youtube & pals) .ft PM+MPV

Unread post by jangdonggun1234 » 2023-03-19, 02:38

BopBe wrote:
2023-03-18, 21:00
> By default, MPV doesn't use GPU to play video, so you may want to add hwdec=auto-safe [...]

This is wrong. mpv will always render video using the gpu facilities in one way or another by default. Rendering frames using the gpu has nothing to do with `hardware decoding` video. There are no CPU (aka. software) rendering fallback as far as I know.

The only way to minimize both the cpu+gpu cost in mpv is to set `gpu-dumb-mode=yes` in your conf. That'll disable all default built-in shaders and set the image scaler to bicubic. It'll still use any gpu facilities to render the frames tho.

Edit: adding that mpv on Windows isn't a lightweight media-player AT ALL. This is either a fallacy made on purpose by channers and replicated, or a mis-understanding on how the player innards really work. With that said, I can play 720p@60fps YT content with a v0.29.0 Windows build of the program on my wifes 2011 laptop with very few frames being dropped.
Default value of hwdec is no, no = software rendering = no GPU: https://mpv.io/manual/stable/#options-hwdec

You can test this by checking Task Manager, with hwdec=no CPU is very high, but with auto-safe, GPU is used and CPU is low

Lightweight isn't the right word because MPV has a huge file size anyway, but the file size doesn't matter much and MPV is written in C, it's all about how the player plays videos. My 11 years old laptop, HP8560p if you want to check (spoiler just a meh spec), can play 2 8K videos at the same time with MPV, but absolutely no with web browsers.

Locked