Solved YouTube's Anti-Adblock With uBlock Origin

Solved issue
Since hardware accelerated video decoding in browsers is still a nightmare, i use mpv and yt-dlp to watch youtube.

no ads there either.

Code:
#!/bin/zsh
#
YTDLP_OPTIONS=(
    -4
    -f "bv*+ba"
    --proxy "http://xxxxxxxxx:xxxx"
    --cookies ~/.config/yt-cook.txt
)


yt-dlp -q -o - "$@" ${YTDLP_OPTIONS} | mpv \
                       --fullscreen=yes \
                       --stream-buffer-size=536870912 \
                       --video-reversal-buffer=4096000000 \
                       --demuxer-max-bytes=10240000KiB \
                       --demuxer-readahead-secs=3600 \
                       --cache-secs=3600 \
                       --force-seekable=yes - 3<&0 <$TTY
 
Last edited by a moderator:


Well, for a few days YouTube kept fighting. I often have a video on in the background, so I guess you'd say I'm a heavy consumer. I'm not always paying attention, but the background noise is appreciated. I have a ton fo channels that I'm subscribed to and will toss up a playlist and let it run.

YouTube would keep screwing with me. It'd throw up the nag and not let me play a video as I'd blocked too many ads.

I'd have to refresh my filters regularly.

I haven't had to do so for a few days now. I haven't had the nag screen.

I wonder if YouTube figured out that this isn't a battle they can win, or if they never expected to completely win so much as they expected win against a percentage of users. I imagine some subset of users just accepted their fate and whitelisted YouTube in their ad blocking software.

I suspect that YouTube knew all along that it'd be a cat and mouse game. It makes me curious about what their next step will be.
 
I have to update ''quick fixes'' regularly too, if they ever ban the users who do not conform I'm ready to quit YouTube for good, I'm not interested for ''science'' videos nor geopolitics, I only watch a comedy channel in my language that I can live without it.

I believe I have the right to filter what enters my domain and they have the right not to serve me so we are going to have a deal
 
No changes no warnings using Chromium browser and Firefox browser.
They said that anti-adblock message is a small scale experiment to see how it's going, me and KGIII were among the lucky ones
 
They said that anti-adblock message is a small scale experiment to see how it's going, me and KGIII were among the lucky ones
I don't know.
I guess it's possible.
I'm thinking more to do with user browser settings than anything else.
I can't see Google, Youtube just pulling a few select ISP addresses out of a hat to run tests.
Accurate test results require more users being tested then just only a few select user's.
 
I just watched a couple of videos on youtube and uBlock Origin failed to skip the ads! Appears only the timer on a black screen and the sound, is this the beginning of the end of uBO rule on the internet? I have years to see ads on youtube and it is way too annoying... How your uBO behaves today?
this might help: i use ad block ultimate, hide yt shorts, and sponsor block, on chrome, they are all available in firefox as well, the sponsor block is amazing since it skips baked in ads too muahahahaha
 
this might help: i use ad block ultimate, hide yt shorts, and sponsor block, on chrome, they are all available in firefox as well, the sponsor block is amazing since it skips baked in ads too muahahahaha
ad blockers demand lots of data from the user and I am cautious on which one i'll give such access. The ad-blocker you suggesting is open source too and it looks OK, recommended by mozilla, 2 million users etc, it looks fine
 
I only watch a comedy channel in my language that I can live without it.


If you just watch one channel, you can easily skip YouTube entirely. There are always at least a few Invidious instances up and running and the one I linked to is really stable.

You can avoid giving any information to YouTube at all, in fact. IIRC, you're pretty privacy oriented. So, this might be the path for you.

If you only have a few channels, this is also slick. I have a ton of channels that I monitor, so migrating there would take a great deal of time.

I can't see Google, Youtube just pulling a few select ISP addresses out of a hat to run tests.

That's actually quite common. In fact, you yourself can do so with Google's tools for AdSense. It's often referred to as "A/B testing".
 
I spoke too soon.

Sure enough, YouTube (using uBlock Origin still) would load the video screen but not play anything. Some filter was likely blocking a message. I purged the filters and loaded fresh filters. Videos are playing again.

YouTube has not yet given up.

I think this is a fight they could technically win. I'm not sure they want to win it entirely, but we'll see...

I just want to catch up on some 'guitar' scuttlebutt. There's drama afoot with a company threatening to sue reviewers. I don't think they have a leg to stand on, but they're making these threats. The first two reviewers gave them scathing reviews. (It's not a guitar, it's a toy meant to help people learn guitar...)
 
I just want to catch up on some 'guitar' scuttlebutt. There's drama afoot with a company threatening to sue reviewers. I don't think they have a leg to stand on, but they're making these threats. The first two reviewers gave them scathing reviews. (It's not a guitar, it's a toy meant to help people learn guitar...)
What's the brand? give a link, I watch guitar content too sometimes, mostly the ''twoodfrd'' channel for repairs
 
Last edited:
mostly the ''twoodfrd'' channel for repairs

Oh, Ted is awesome. Let's not derail the thread too much.

The brand is "Aeroband" and you can start here: https://iv.ggtyler.dev/watch?v=5YvFiRpSnDw

See also:

I'm a classical guitarist by training. I've played for going on six decades. I've shared some of my work before, but I don't want to derail the thread.

If you have any questions, they're probably a better source for more information than I am. Note that I put 'guitar' in quotes. You will (likely) be disappointed.
 
New message:
Screenshot from 2023-10-26 21-12-44.png

What will happen after 2 videos? let's find out, I'll keep you up to date
 
New message:

Yup. Just do the 'process'.

Open the uBlock settings, clear the filters, load new filters. Then reload the page. This works every time I've tried it so far. You can tell when the video won't play as it shows no opening thumbnail/first frame. If it's just the play arrow, reload your filters 'cause it's not going to play.

YouTube is putting a whole lot of effort into this - while it's a winable objective. They seem to be half-arsing it with things that can be quickly filtered out. At this point, I really don't know what their strategy is. I'm reasonably convinced that they have the tech to make this universal.

Given enough time, I can write a script that would stop you from loading content with the ad blocking enabled. Indeed, some sites do this without a problem. Given Google's resources, I don't know why they haven't grasped at the obvious solutions.

Ah well...

There's also a 'quick fixes' that you can enable. You can also tell it to disallow network traffic until all the filters are loaded. I would not be surprised to need those options before this battle is over.

All they really need to do is load the blocking script with a random ID and then check to ensure that script is running and has completed - meaning showing the ads. I'm not even sure they'd need a random ID. They just need to verify that the script (loading the ads) ran to completion. A random ID would help to stop them from loading the script in the background and not outputting it to the screen. So, that's why I say random-ish.
 
Just wanted to note that Ublock Origin was still working for me. I actually recently just just my vpn and connected to another country where subscribed to Youtube premium for a cheap monthly price compared to how much it is in the west.
 
I never got to 3 videos, I updated the ''quick fixes'' and the message never appeared again, I have watched some 10 videos since then.

I tried Odysee but it's primitive, it reminds me 2008 YouTube but without the enthusiasm of the creators. You can't embed videos in forums from there and you can't set constant video quality since most videos have available only the quality they've been uploaded with.

It seems YouTube can afford to be annoying with some of their users since there is no alternative at this point. I could pay them for the service a reasonable amount of money, but I don't do transactions online with my debit card, and I'm not gonna change that, I gonna buy my first TV since the middle 00s
 
Last edited:
I never got to 3 videos, I updated the ''quick fixes'' and the message never appeared again, I have watched some 10 videos since then.

Yup. So far, the people writing the filters are winning the battle.

I am grateful.
 
This era will be known to future historians as ''The ad-blocker wars of the early 20s''

This thread will be evidence and will be studied and scrutinized as primary source
 
We need to get a YouTube representative and a uBlock Origin representative to put on a boxing match to decide the fate of the intrusive anti-adblocking on the YouTube platform.

Though, I suppose we cost 'em some money by not viewing their ads - and that probably adds up.

I'm okay with a nag. They can nag me to turn enable ads. In theory, my site should do that. You're free to just ignore it.
 


Latest posts

Top