YouTube experimenting with server-side ad injection
fosstodon.orgI have to wonder if they never have due to fear that people will stop using the platform. I honestly will stop using it. I don't mind ads, but they always come on YouTube at the worst time, if you're watching something informative, they cut your brain off from that into some obscure that has no relevancy to your life.
I’d like to say that I don’t mind YouTube ads but I actually do much of the time because they try to sell me on an investment scam, some tactical doomsday merch, or fundamentalist religion depending on the theme of the video.
Many YouTube ads truly feel adversarial and it is hard to not mind that.
I got one that straight up told me my penis was too small to please my partner. I have to say that you'd think the supposed best and brightest that FAANG companies hire could come up with a bit more of a sophisticated pitch than "your peepee is too small".
Amazon Prime Video is not much better. We recently got an ad for an all black dating site. I’d expect them to guess our ethnicity a bit better (and the content was as 1950’s cracker white as can be), but ignoring that, they were literally selling us diapers a while back, and the kids have their own video profile. Based on our purchases, it’s not physiologically plausible that only one adult lives in the house.
Given how bad the output of ad targeting infrastructure is, I wonder who the “real customer” of it is.
Logistics? Intelligence agencies?
someone is watching porn, and of a particular variety, me thinks.
It's funny that we used to laugh about pirate websites having those kinds of ads, but the difference now is just that it's "ok" videos instead of banners drawn using MSPaint.
Sure but I don't think the companies buying ad time on YT are generally FAANG.
I turned off personalization a while ago. I get ads for Mint Mobile, a local spa, an Internet fast fashion men's T-shirt company, dog food, and similar anodyne topics. It feels a little like watching 90s daytime TV.
So...was that before or after turning off personalization?
After. I think I'm getting generic location-targeted ads.
I'm actually loving this whole debacle, because I managed to cut down my Youtube time from 1h/2h a day to almost zero, after I had a week of my Ad Blocker not being able to block ads.
Same. It really broke the addiction.
Why would they fear people who adblock leaving the platform?
If ads get too annoying people will start running a YouTube frontend and probably switch from on-demand video viewing to a DVR format where you pre-download videos from your favorite creators ahead of time. Maybe the frontend can pretend to have watched the full video and ads, I'm sure that'll go over wonderfully with advertisers.
>YouTube frontend [...] where you pre-download videos from your favorite creators ahead of time.
I think the post is saying the ads would be burned into the regular video stream such that even offline downloaders such as youtube-dl would also get the ads.
The current common behavior is the actual video and the ads videos are 2 different streams. The javascript in the web browser switches back & forth between the streams for dynamic ads insertion as it gets the next media fragment(s). The new behavior is to have just one indistinguishable stream that's more tightly embedded into the video media fragments.
If the above paragraph doesn't make sense, one can just load up a Youtube video while monitoring the "Network" tab in F12 Developer Tools to see the various media fragments being downloaded while it switches between the normal video and the ads.
You can strip the ads from the final video or have the player automatically skip the ads while playing. The client will probably have some way to distinguish sections. Worst case scenario you're just ending up in a DVR-style scenario where you have to press some button to skip +30 seconds in the downloaded file. And eventually someone will make a tool to filter out the ads or crowdsource a solution.
It shouldn't be that difficult for video downloaders to learn how to strip out in-video ads. They're going to be a sharp cut both in video and audio, for a specific, fairly-well-known length of time, then a cut back.
And even if platform starts to make blurry transitions for ads, adjust volume/brightness, or even overlay ad text over existing video like a watermark, client can just download the same video multiple times and remove unique frames/pixels.
If the ads are in-stream, it should actually make it easier to skip from a frontend interface. If you know or can figure out their length.
It's a given that they'll start and end on keyframes, so you can cut the middle section without losing or re-encoding anything. (It's a given because Google wants to do the opposite - insert them without losing or re-encoding anything. Even if they did re-encode, the sharp transitions would generate keyframes anyway)
This is the kind of thing where people will put a lot of effort to engineer a good machine learning / AI solution to get rid of these ads. If it’s something that people hate they’ll put all their effort into stopping it. Google might’ve actually made their situation worse with this as it’ll force people to innovate and come up with new ways of countering their bs.
“Love, friendship and respect do not unite men as much as a common hatred for something.”
In the book/movie Contact, the person who bankrolls the main character's project made all of his wealth from creating inventions that defeated advertisements.
Or the ~100% of users who wouldn't understand anything you just wrote will shell out for a premium subscription.
There’s going to be a split between premium and not watching YouTube. I’m not paying something like 2,000$ to per hour of advertising cut from my life.
I might click on a video I find elsewhere, but I’ve basically given up on using the YouTube interface for finding videos.
> but I’ve basically given up on using the YouTube interface for finding videos
Not just you, youtube has as well.
Users don't need to understand an ad blocker to use it either, do they?
That said, the predictable next step would just be for Google to turn on DRM on Youtube videos.
if this (ad injection) goes in and becomes a standard - could they argue it is their form of drm and try to take down sponsorblock with dmca crap?
I already largely watch YouTube through RSS feeds to find the videos and yt-dlp to download them locally. Ads injected straight into the stream will be annoying, but still just as easy to skip as the sponsored content sections of videos. That said, the ads on YouTube have gotten more and more scammy and suspicious over the years, so I don't particularly appreciate being incorporated into the video feed itself. But it doesn't materially change much of how I watch YouTube anyway.
There is some talk that YT are making it such that trying to seek will not skip the ad.
If you have the entire video file downloaded locally they can't stop you from seeking.
There's no reason we can't train local AIs to do ad removal in real time. That will be fun. Will be useful when AR gets popular too.
There already exists the comskip project used by most home-brew PVR software for broadcast TV. I wonder if it could be leveraged for this. See https://github.com/erikkaashoek/Comskip
The downloads would have the ads as well if they're server-side.
Youtube ads have been on an impressively consistent path of aggression. Chromecasting went from no ads as recently as a couple years ago to 30+ second unskippable ads to. The revenue firehose I’m sure is incredible though. I run some online video campaigns for work (~$300k/mo) that compete with YouTube for budget and they have incredible performance stats… as indicated by GA4.
Chromecast got ads in ~2015. I was keenly aware of this because paying for YouTube premium didn't get rid of ads on Chromecast (yet).
Must have been some hardware combination or something unique where I never got them until recently, and it was quite jarring.
That's very unusual. Maybe you had been paying for Premium as part of something else (like Google One or Fi)? I'm not sure if a pihole or other hardware device can block YouTube ads, but if it can maybe that's a possibility?
yt has gotten very feisty all of a sudden.
If you're used to dipping in & out of vids to find something interesting it is fundamentally unusable without working adblock. You end up watching more ads than video
That's the most annoying bit, they target you with an ad when starting just a 1-2 minute video.
They present the ad in the most intrusive and annoying way possible. It ensures that I will either ignore it, or never purchase that item or service out of spite. If you do this almost every time I play a quick video, it generates a very negative user experience.
If they focused on how to have ads coexist with the user experience and mesh better with the media being watched, they might not irritate every user by trying to make them impossible to avoid - and they wouldn't have to play this cat and mouse bullshit that eventually leads to their platform being irrelevant.
This sounds technically unfeasible, at YouTube's scale.
They'll have to re-encode videos at all permutations across countries, regions and locales. They'll also have to somehow account for ads that have been pulled down after the fact... then they'll need to cache this stuff everywhere so that the latencies are reasonable and the experience is good, whilst serving you different version of the same clip if you refresh or rewatch the clip... they'll have to do all of this continuously, since ads change with the times - despite the clips themselves being stale and static?
I can imagine they will have to limit this "feature" to a very small subset of videos with high view count/interest/revenue potential... maybe just to live feeds... otherwise, the costs to do this for every video on the platform would shoot through the roof.
They don't necessarily need to re-encode anything, encoded video has keyframes which don't depend on any prior frames placed at regular intervals to facilitate fast random seeking, and you can splice the video at those points very cheaply without having to re-encode.
> They'll have to re-encode videos at all permutations across countries, regions and locales.
Nope. Just inject them right before a full keyframe, that can be done pretty much on the fly.
Can't they do on-the-fly stream concatenation to avoid re-encoding everything?
EDIT: I didn't read carefully. Ignore the first sentence.
~There's already a tool called SponsorBlock which in conjunction with FreeTube or Invidious can automatically skip portions of videos tagged as sponsorships or ads.~ I don't see server injected ads being a long-term problem for people who use blockers or third-party players. It just shifts the problem to the "analog hole".
The OP is written by the developer of SponsorBlock, if they say it's a problem I'll take their word for it.
I didn't actually notice that.
If you read the linked thread this is causing issues with the offsets SB currently uses. That aside YT will have the ability to inject ads dynamically based on region or whatever other signals they use for targeting. Consequently no two copies of the same video are guaranteed to have the same length.
The link goes to a post by the author of SponsorBlock
Did you follow the submission link at all? It's from SponsorBlock explaining that this change breaks their things.
It seems like this could be easily defeated via random ad injection.
And could this be defeated because the video itself is static and identifying the ad would then be around the unexpected changes to it? :D
Random ad injection is easily defeated by services like that. They’d just need to fingerprint ever N second window of the video, and then drop stuff that isn’t included across multiple plays.
I wish video distribution would move to self hosting or some other decentralized model though.
Finally, YouTube is going to heal my addiction! I'm so happy about this. I have found that none of the videos really helped me to learn anything. They just push a ton of interesting stuffs onto my stack but I don't have 10 life time to complete them, so better know nothing but complete everything.
I find the baked-in ads in my parents VHS tapes to be quaint and informative.
I don't feel that way about current YouTube ads!
After they disabled the site for ad blockers I begrudgingly shelled out for YouTube Premium. I've now come around to being OK with paying for the convenience. Much of the content I watch wouldn't exist without the revenue they get from ads or subscriptions. I'm sure some people will find creative ways to pirate content, but Premium is cheaper than Netflix and I watch more content on YouTube than Netflix so it seems reasonable to me.
Ad-blockers still work fine on the site tho, you're paying Google money for no good reason.
Money of which only a small part goes to the creators.
If you actually want to support the creators, do it via a more direct method than paying Google to send a few pennies their way.
Time to start pirating YouTube as well.
I dunno if there's a ton of stuff I'd want to save. Maybe some old tutorials/tech talks and video essays, but in the latter case I can just subscribe to Nebula.
Oh and some memes.
Even while they were free to download, they were inconvenient and slow to download, especially if you wanted a whole channel - pirates just have better ways to share files.
Online advertising is such a strange world.
Do I see it correctly, that half of the worlds' population (the ones without ad blockers) is paying the web for the other half (the ones with ad blockers)?
The amount of ads these days is so crazy that I think we might all be better off if there was a way to easily do micropayments instead.
Unfortunately, even if you do not view any ads you still end up paying for them via inflated prices (to cover tha ad budget) when you buy from the companies running those ads.
At least you avoid the psychological manipulation though, which hopefully means you don't spend as much for things you don't need.
I would argue YouTube Premium is an easy way to do micropayments to the creators you watch.
This doesn't work out to be micro for someone who only watches YouTube rarely, but if you watch a reasonable amount it does.
Server-side ad injection is the endgame for the ongoing war between ad blockers and content sites.
It won't be the endgame if you accept that AI agents can mitigate this.
The agent will download a copy, detect the ads, and clip them out.
I'm told in Portugal one of the big three TV ("cable") providers already does this on recordings.
So it can insert its own targeted ads, I believe.
How can Google defend the mobile app where they do not let you close the screen in YouTube unless you pay, so you get both ads and they screw your battery, which is not ECO friendly? Tons of batteries and phones are sent to the garbage bin faster and Google is allowed to do it and seems nobody shits on them and the google devs for this EVIL actions.
Makes you wonder if Google devs could intentionally make the app eat more battery or do other EVIL shit since they prove they are OK with this tactics. 2
If it's accpetable to embed ads into the video file then as a video producer why not just negotiate with advertisers directly and cut out the Google middleman. Negotiate a deal with an advertiser and then have the advertiser send some ad video that the video producer can edit into her videos with ffmpeg. This allows the video producer to choose the advertiser(s) she wants.
This already happened after the “adpocalypse”. A lot of channels turned off ads on their videos and started doing direct sponsorships instead. After a while, YouTube decided they would just show ads on every video, even if the uploader had disabled them.
I'm honestly surprised it took this long for them to do this. Knowing nothing about how ad delivery/networks work (or ad blockers, for that matter) my guess is that something fundamental with how they are delivered (e.g., 3rd party domain for tracking?) also made them detectable via extensions? Makes me wonder how they are solving the problem now.
Twitch seems to do a good job of staying ahead of extensions.
Ads are usually delivered through third party domains so the ad network can keep their own accounts of impressions, but giants like YouTube and Twitch are their own ad networks, and serve the ads from their own domain. Third party ad domains are easy to block, so the most sites which use them can do is refuse entry to users who block their ads, but first party ads can defeat blockers relatively easily if they want to.
Youtube at least they're not really solving it right now. uBlock origin does pretty well at managing to block most pre and mid roll ads, at least in my experience, there's only been a few short blips for me when it has let ads slip through. Some weird experiences where a splash screen with no video would appear, instead I just would just see a small icon for the thing the ad was for and a skip button.
I wonder if this is related to 3rd party cookies going away and needing better ad tracking than what is available in the browser. Absolute scam to neuter competitors and then rebuild something better server side.
I know mostly nothing about enterprise video/streaming wrangling. Is Youtube rolling out something like an m3u playlist on demand with the video intermingled with ads or a single video with ads baked in, like a VHS recording from TV?
Honestly, I'm surprised it took this long.
A lot of ad tech is defeated simply because it is provided by a third party, outside the original request, and executed in the browser. So make it first party, use the main request, and build it on the server. It's not as easy, but Google can do it. Make it fast (requires compute + infra) and charge a premium for the placement - after all, it's going to be more "effective". Again, definitely something Google can do.
Presumably this would also break timestamp links more generally?
They would just statically account for it if they e.g., permanently modified the video
It doesn't sound like that's the case, per the link:
> This breaks sponsorblock since now all timestamps are offset by the ad times.
Sounds like either YouTube doesn't care about timestamp stability or they missed this in testing
SponsorBlock works by telling the video player to skip to certain timestamps within the native video player. YouTube however knows the exact offset of the ad that it sent, and this can offset its timestamps.
Could they update the plugin to do a location.href at the appropriate time?
No, because the YT frontend knows that a different video is played. It must know at least to make them unskippable. It's just that both ads and video are bundled inside one response, but the format is YT-specific.
I bet it won't. It isn't hard to offset, or better put : not take into account the ad in the timestamp (like the video plays the injected ad, but the timestamp doesn't run/increase/tick).
Can someone explain like I'm 5? Will this affect DuckDuckGo embedded player ?
Edit: clarify that I usually go through Bing or DDG to play YT videos
Not only are the ads annoyingly long and frequent sometimes, and not only does the ridiculously expensive YouTube TV subscription I still haven't talked my family out of not prevent ads on YouTube, but the _way_ it does ads is incredibly annoying: it's easy enough to click the "Skip" button once it shows up if you're sitting in front of your computer or watching on your phone, but it's really hard to do when your hands are covered in water and dish soap…
In germany a consumer protection organisation currently sues Facebook because of the difference between the stalkerads and the adfree options. Companies buy add for cents and to be adfree you have to pay 10€ per month and they don't think that an average user sees thousands of ads each month.
Sounds like Sponsorblock will become the new AdBlock!
Eh, it makes sense. I use adblock because I can, but if it becomes too hard to block ads, I'll just watch them or pay (begrudgingly).