Skip to content

Instantly share code, notes, and snippets.

@ajayyy

ajayyy/FAQ.md Secret

Last active November 14, 2024 12:38
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.

@Granitosaurus
Copy link

Is this the end of SponsorBlock?

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

@418Cat
Copy link

418Cat commented Jun 13, 2024

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

@Granitosaurus
Copy link

Youtube Premium notoriously doesn't skip sponsored ads though and it's the number #1 complaint by premium users. So, I think there still would be a reasonable incentive even if the population is much smaller!

I pay for Premium but sponsored ads that are not targeting my demographic and often don't even serve my region are simply infuriating to the point where I'd be willing to work for free just to spite this 😄

@Protected
Copy link

In the worst case scenario, would it be possible to switch to a style of database based on hashes of "bad" chunks? If users have a client-side system that allows them to tag (if they wish to do so) intervals of a video they watched as "ads" (distinct from sponsors), each of those intervals might be expected to consist in bad chunks (the ad) surrounded by a few good chunks included by accident. But an ad is expected to recur in different videos and places, so the boundary good chunks will change. Once enough submissions share a common chunk sequence, all the common chunks can be deemed as the ad and their hashes persisted to be distributed as part of a blacklist database. This doesn't fully solve the problem of being able to watch the video continuously, but it does solve the problem of finding out what is part of the real video and how long it is; Sponsor entries can even be corrected after the fact to account for ad gaps identified later.

@happysmash27
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

It doesn't have to be instead of. I bought YouTube Premium looong after I had already been using ad blockers for years as soon as I had enough money to do so, since I like having a bulk way to support whichever creators I am watching.

@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!

@ihatespawn
Copy link

Never pay Google a cent!

too late already paid them $300

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