YouTube's crackdown on tools that block advertising continues with server-side ad injection. The developer of...
YouTube is testing server-side ad injection to counter ad blockers, integrating ads directly into videos to make them indistinguishable from the main content.
This new method complicates ad blocking, including tools like SponsorBlock, which now face challenges in accurately identifying and skipping sponsored segments.
The feature is currently in testing and not widely rolled out, with YouTube encouraging users to subscribe to YouTube Premium for an ad-free experience.
How likely we can defeat it with something similar to YT's own ContentID system? We download a tons of ads, process it with feature extraction, and match it on the fly to carve out those ads. A similar system to SB can be used to let people mark where the ads is, process, and share.
Ads should be properly labeled in most market, so it should be trivial to detect what segment is ad and what isn't. The real question is, what to do, and if the server refuses to serve the remainder of the video before the ads duration, what will it be replaced with.
Just catch everything in the background, play the full ad on mute, and when the ad segment is coming up in the stream you are actually watching, switch to the cached copy. Shouldn't be too hard to program.
Streaming allow caching a bit ahead, yes. But the "a bit ahead" part does not mean you can get everything; a server could very well decide to not send more than a few seconds of buffer compared to the realtime play. So, if you're at 00:00:20 in your video and an 30 second ad is present in the video stream, the server could decide to not send anything beyond the 00:00:55 tag until 30 seconds have elapsed, for example.
It would be very annoying to code server side, and very annoying for people with spotty internet, but it's very doable.