Youtube ads

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4980
Joined: 2015-12-09, 15:45
Contact:

Re: Youtube ads

Unread post by moonbat » 2021-05-25, 04:28

Binky wrote:
2021-05-24, 23:48
I haven't been able to work out how to configure it for youtube despite trying every combination of settings I can think of.
You have to allow XHR from googlevideo.com, scripts from google.com and any country level TLD (.com.au for me), and images from ytimg.com and ggpht.com as shown. These days every damn website relies on half a dozen different domains and CDNs to load images and scripts required for them to function, so you need to allow related domains in eMatrix. Usually the name of the CDN sounds similar to the main site, for example Facebook uses fbcdn.net.
ematrix-youtube.png
"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

Binky

Re: Youtube ads

Unread post by Binky » 2021-05-25, 07:11

moonbat wrote:
2021-05-25, 04:28
You have to allow XHR from googlevideo.com, scripts from google.com and any country level TLD (.com.au for me), and images from ytimg.com and ggpht.com as shown.
Thanks for the response. Does that block the ads? I can allow the subdomains in the googlevideo.com section (such as r2---sn-<whatever>.googlevideo.com) and then the video plays, but so do all of the ads.

If I block those subdomains, I get a spinning circle image over a black background for the duration of the first ad, then the same for the duration of the second ad, and then the same again for the video I want to watch.

uBlock Origin - without any configuration on my part - blocks all ads with no delay, and the video I want to watch immediately starts playing. That's what I was hoping to achieve with ηMatrix, but I'm not sure if it is able to do that.

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

Re: Youtube ads

Unread post by moonbat » 2021-05-25, 07:27

Nowhere does it say you can't use both. Both serve different purposes and have different approaches to blocking. uBlock can filter individual URLs from the same domain and hide elements on pages, eMatrix prevents previously set cookies from being retrieved on non originating sites.
eMatrix works as an allow/deny for domains, not individual resources within a domain. Since it blocks everything by default, you have finer control over what domains to allow on a page.
"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

New Tobin Paradigm

Re: Youtube ads

Unread post by New Tobin Paradigm » 2021-05-25, 22:27

I did some digging and here is what I have gathered so far...

These NEW ads that can't be blocked with ABPrime OR ABL are ads being served from Google's own video servers NOT from a third party. They are PART of the MSE Video Stream. Their player is increasingly becoming shit at catering to non-MSE enabled playback. For me personally, not being signed in has the youtube site LARGELY using the regular blockable method of video ad delivery but signed in it is obvious I am opted in to the new method.

Ublock gets around this by having a feature that basically constructs javascript commands and injects them from filters. The likes of:

Code: Select all

youtube.com##+js(json-prune, [].playerResponse.adPlacements [].playerResponse.playerAds playerResponse.adPlacements playerResponse.playerAds adPlacements playerAds)
youtube.com##+js(set-constant, ytInitialPlayerResponse.adPlacements, undefined)
youtube.com##+js(set-constant, playerResponse.adPlacements, undefined)
Adblock Plus 3x has this functionality as well. In fact it has been a security nightmare for them but of course that is only in the webextension form. ABL does NOT have this feature and of course neither does ABPrime. There IS a user script out there that is effectively what UBO constructs but I haven't been able to get it to work. This would be the previously (somewhere) mentioned DOM and JSON mangling that UBO is also doing.

Suffice it to say, as far as ABL and ABPrime are concerned.. It will NEVER be able to block the NEW method Google is using on Youtube. Not unless someone ads what is a frankly dangerous function which is sure to have many of the pitfalls ABP suffered and some that can't even be predicted. The user script is our best hope of doing this without switching to UBO which isn't exactly easy UI-wise to use in my and a number of people's opinion. Of course, this assumes you will continuing using Google Services outside of a Google-style browser.

How, when, and why you are affected by the new mechanism still remains a mystery based on factors known only to Google but one thing is for sure... Given Google has given them selves the ability to monetize any and every video on the site.. The new mechanism will become standard and disabling MSE will continue to degrade to eventual non-function if for no other reason than for Google's Ads.

tl;dr, I admit it.. UBO is the BEST and really ONLY option for blocking Youtube ads in a UXP application. Guess Gorhill and JustOff get the last laugh on this count. Maybe, one day, I will actually take UBO's engine and give it Adblock's UI then we will finally have a non-hostile UBO-capable adblocker that isn't total ASS to use.

That is all.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2193
Joined: 2018-05-05, 13:29

Re: Youtube ads

Unread post by vannilla » 2021-05-25, 23:03

I am positively shocked :coffee:
Jokes aside, it was inevitable that ads would eventually be served directly inside the video stream.
Google owns both the channel and the ad platform, so they can do anything they want as long as their services are being used.
The part about the injected javascript is interesting, also.

New Tobin Paradigm

Re: Youtube ads

Unread post by New Tobin Paradigm » 2021-05-25, 23:08

That is the next expected step after what they are doing now. Where they will transcode ads INTO the actual video stream. This is still stream switching that is why it can be manipulated by JS. Of course, put it through Widevine and you can't do shit. That is also an option. Of course by that point Youtube will be done as far as UXP applications are concerned.

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

Re: Youtube ads

Unread post by moonbat » 2021-05-26, 01:30

When the internet got started, there was this admiration about it being an interactive medium, that we were no longer dependent on broadcast media for information and could control what we saw. And now it has as good as reduced to cable TV except you can choose what to watch, thanks to the normie obsession with video content over everything else.
"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

New Tobin Paradigm

Re: Youtube ads

Unread post by New Tobin Paradigm » 2021-05-31, 13:38

Too bad no one has been able to effectively conform the userscript linked so that it works on UXP. That would mean there would be hope. It is also sad that no one has YET created an example of an extension that can be used for single site JS injection. I guess everyone just decided to use UBO or fuck off.

So sad.

Суки читают

Re: Youtube ads

Unread post by Суки читают » 2021-06-02, 21:31

As of this week, I'm being served that shit like every second video, even though I was completely unaffected before. For now, one workaround is to use nsfwyoutube.com.

User avatar
BlakeyRat
Moonbather
Moonbather
Posts: 52
Joined: 2014-02-13, 12:34
Location: Hell

Re: Youtube ads

Unread post by BlakeyRat » 2021-07-09, 11:38

Moonchild wrote:
2021-05-17, 16:12
https://www.youtube.com/watch?v=5uTjLd6USJo throws ads at the start as an example.
I just watched the video. no ads.

I use uBlock Origin and also have a lot of stuff blocked in my hosts file. I watch YouTube videos (a lot more than I should) and I haven't seen an ad in more than a year.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35602
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Youtube ads

Unread post by Moonchild » 2021-07-10, 09:12

dotCentre wrote:
2021-07-10, 08:34
I am not[...] doing wrongs, and I do care.

Having no repair of your wrong doing in between the coming weak, expect official news.
I'm not doing anything wrong here. I'm just recounting that you seem to be breaking with YT's service licensing terms which is unlawful. You agreed to them by using the service.
Mind I am not upset nor feeding animosity against any personally but I will just defend my rightness by principle.
You're not upset but are issuing severe threats and ultimatums regardless...? :roll:

Look, if you're going to make this a legal threat about my personal opinions now then I'm done. I have no intention to get entangled into whatever court case or black PR campaign you seem to want to try and entrap me in and I do not believe general guidelines (and not a straight-up exception to copyright law!) provided by the UK government for, note, private study and research trump your adherence to service terms or conditions and associated content licensing. Keep in mind that there are two things at play here, one being the copyright owner (the creator of the media) which may be considered in question because of the UK guidelines on fair use, but the other being the service provider and their licensing. The service isn't subject to fair use and it is YT's right to limit your use of their service in this way.
It would be a strange world if you can trump service terms and conditions you agree to by a fair use guideline for copyright of presented material (and not the service). That, however, will be entirely up to you and YouTube to figure out. In my opinion you are most definitely doing wrong and are performing acts that wrong the service provider and are legally questionable, but it's not my place to defend their service rights. They can do that themselves with their massive budget, TYVM.

I'm sorry if you feel offended by what I said, and I will remove any and all discussion from this thread about this particular exchange. Do not expect me to engage in any more conversation after this little stint, and reconsider your methods in use (both the service abuse and how you approach people calling you out on it) as they may bite you in the future.
Off-topic:
(It's weird, seems like everyone right now is trying to play "gotcha!" games with us)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked