1.18K
Hector Martin (@marcan@treehouse.systems)
social.treehouse.systemsAttached: 2 images
Today I learned that YouTube is deliberately crippling Firefox on Asahi Linux. It will give you lowered video resolutions. If you just replace "aarch64" with "x86_64" in the UA, suddenly you get 4K and everything.
They literally have a test for "is ARM", and if so, they consider your system has garbage performance and cripple the available formats/codecs. I checked the code.
Logic: Quality 1080 by default. If your machine has 2 or fewer cores, quality 480. If anything ARM, quality 240. Yes, Google thinks all ARM machines are 5 times worse than Intel machines, even if you have 20 cores or something.
Why does this not affect Chromium? **Because chromium on aarch64 pretends to be x86_64**
`Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`
🤦♂️🤦♂️🤦♂️🤦♂️🤦♂️
Welp, guess I'm shipping a user agent override for Firefox on Fedora to pretend to be x86.
**EDIT**: The plot thickens. Pretending to be ChromeOS aarch64 *still gets 4K*. Specifically: `Mozilla/5.0 (X11; CrOS aarch64 10452.96.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36` still works.
I wish Piped worked for me, I was trying to watch a Linux tutorial in full HD to see the commands better and Piped just refused to buffer the video.
There are other alternatives too, like invidious. The yewtu.be instance works decently well for me but limits to 720p I think. There is a list of all running instances somewhere on the github iirc. There’s other instances that allow full HD, just have a search and you should be able to find one.
Just redirect any watch page to https://redirect.invidious.io/watch?v=%ID% and you will get a list of instances. Can be setup with Redirector in a minute
Well, I just got Redirector last night to check it out and it took me some time to figure out how to get it to work right where I have https://youtube.com/watch?v=* redirecting to https://yewtu.be/watch?v=$1 in case there is something funky going on there that causes me to need to have that redirect active.
Here is an alternative Piped link(s):
https://piped.video/watch?v=
Piped is a privacy-respecting open-source alternative frontend to YouTube.
I’m open-source; check me out at GitHub.
My YouTube redirect rule is a bit more complex, but works for all shorts, youtu.be and regular youtube links and it supports time stamps and videos that are part of a playlist.
Set the rule to regular expression, use this one
(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:watch\?v=|shorts\/)|youtu\.be\/)([^&?\/]+[&?]?.*)
remove the two “amp;” at the end (Lemmy formatting is bad, it replaces an ampersand with
&
even if you tell it not to…) and redirect to https://%yourinstanceofchoice%/watch?v=$1Enjoy!
Okay, what I was trying to do with Redirector is have it so I can search and browse videos on YouTube, but when I click on something that I want to watch, it forwards me to the same video on YewTu.be instead.
That’s exactly what this is doing. It captures all youtube.com/watch, youtube.com/shorts and youtu.be/ pages and redirects then to the same page on invidious. Just replace %yourinstanceofchoice% with yewtu.be.
If you don’t open videos you want to watch in a new tab, you also have to go to Advanced Options in your rule and tick “HistoryState” else it will bypass the redirect.
This should work for you: