Skip to content

Instantly share code, notes, and snippets.

@ajayyy

ajayyy/FAQ.md Secret

Last active June 21, 2024 20:05
Show Gist options
  • Save ajayyy/f7b1807e13731c25cef4c2c057d022bc to your computer and use it in GitHub Desktop.
Save ajayyy/f7b1807e13731c25cef4c2c057d022bc to your computer and use it in GitHub Desktop.
YouTube server-side ad injection faq

Does this mean YouTube is live re-encoding content?

No, this is not needed. Online video streaming nowadays uses a "playlist" of video chunks. These chunks are seperately encoded videos, so can easily be swapped out, or concatted to. This also means that an ad-blocker could ignore specific chunks if they know which ones to ignore.

Is this the end of SponsorBlock?

No, if YouTube displays any UI such as a clickable link, that means it has to know how long the ad is. SponsorBlock could find this data as well. There is also the feature for clicking on a timestamp in a comment that would need to know the duration of the ad, so it should be findable somewhere, it just might be kind of hard.

In the short term, SponsorBlock will not work for people with this experiment.

Will this be the end of general adblockers?

Probably not. But it makes things harder. As always, uBlock Origin work best on Firefox-based browsers, especially now that we reach the end of manifest v2.

Will this affect yt-dlp, NewPipe, etc.

Maybe in the future, but at the moment it seems to only switch to this server-side ad injection via client-side flags.

The more pressing issue for these clients is the new sign in requirement to watch videos for some people.

Will this affect DeArrow

The offsetting issue will affect DeArrow thumbnail submissions, but should be fixable in the same way as SponsorBlock.

@kz-n
Copy link

kz-n commented Jun 14, 2024

Well, assuming ads are at the start / end of the video (Don't know how this could account for mid roll ads) we know the length of a youtube video, could download the entire video at once and get the delta of the ad length

@FelixFourcolor
Copy link

It could work, but the number of submissions would go drastically down, and I have reasons to think that if someone pays for youtube premium instead of using extensions that can do the same for free, there's a lower probability for them to be using sponsorblock

I agree with the probability assessment, I just want to say these people definitely exist. Case example: me. I've subscribed to yt premium long before I discovered sponsorblock, so now I use both. And I'm a leaderboard submitter.

@nukeop
Copy link

nukeop commented Jun 15, 2024

Adblocking chads always win

@erikk333
Copy link

Adblocking chads always win

Where it's not impossible to do, "adblocking" in twitch is kinda fucked rn

@nukeop
Copy link

nukeop commented Jun 16, 2024

Luckily there's nothing of value on Twitch

@studiofruits
Copy link

Well, assuming ads are at the start / end of the video (Don't know how this could account for mid roll ads) we know the length of a youtube video, could download the entire video at once and get the delta of the ad length

This assumes that the ad they stream is always the same, perhaps they may have several streams with multiple ads, all of different lengths. the only place I have so far not seen these ads is on skipvids.com but maybe it will start effecting them aswell.

@stevenlafl
Copy link

Contributions could also be taken from Youtube Premium subscribers exclusively which don't have this issue right?

It could work, but the number of submissions would go drastically down, and I have reasons to think that if someone pays for youtube premium instead of using extensions that can do the same for free, there's a lower probability for them to be using sponsorblock

My thought is that if you're willing to spend actual money to remove adds, installing Sponsorblock is an easy sell, since it cleans the rest of the ads up.

If they don't re-encode, then theoretically all you have to do is crc check the encoded video at every resolution/format against a database of ads. But it would require somehow finding out where the playlist segments start and stop. If there's a button to click which becomes available during an ad, we know that it's an advertisement up to a specific point in time.

That way, as soon as the database confirms the first segment is an ad (and how long/ how many there are after it - information also within the database) you can just skip ahead to the content. Since there are many users, a ton of data could be flowing in and have it working decently within a few hours.

I cannot get YouTube to give me the new server-side ad experience, so I can't do any preliminary testing. @ajayyy have you actually seen these ads yourself yet?

@nukeop
Copy link

nukeop commented Jun 21, 2024

Never pay Google a cent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment