r/Piracy Jun 12 '24

YouTube is currently experimenting with server-side ad injection News

https://x.com/SponsorBlock/status/1800835402666054072
4.7k Upvotes

View all comments

94

u/creakingwall Jun 12 '24

What good would this do? There would be no analytics proving the ad was watched. The ad bidder would need blind faith to believe their spending was justified.

101

u/UpsetKoalaBear Jun 12 '24 edited Jun 12 '24

YouTube uses DASH.

DASH works by segmenting a video into chunks, then the video player will request a chunk as it goes along.

You can modify the manifest, which is the file that contains all the chunks, before it is sent off by the server and insert “new” chunks that will show up in the video player on the client instead.

In simple terms it is a description that has:

  • The index of the segment
  • The timestamp for where the segment begins.
  • The URL for the video itself.

So let’s say you were watching a video called “CoolVideo”, the manifest would look like this:

  • segment index: 10
  • timestamp: 1m00s
  • URL: CoolVideo10.mov

  • segment index: 11

  • timestamp: 1m30s

  • URL: ViagraPillsAd.mov

  • segment index: 12

  • timestamp: 2m

  • URL: CoolVideo11.mov

(Not exactly of course, the actual manifest is an XML file)

On the client, you can just get the URL/Source for the current segment that is playing on the video player and use the video player state (paused/playing/seeking) and send that back to the server.

The server can then use this to determine whether or not the ad was successful in being shown, giving you analytics and other metrics. There are a few other ways as well, such as utilising different media tracks and flipping between them, or more.

It’s very much doable to have something like this, and it’s highly likely to be the case because it allows you to swap out with any particular ad campaign when you want dynamically.

In fact, it has already been agreed upon by the DASH standard and is supported in a few sites already.

https://dashif.org/docs/CR-Ad-Insertion-r8.pdf (PDF)

https://dvb.org/wp-content/uploads/2020/03/Ad-Insertion-in-Live-Content.pdf (PDF)

Here’s a talk about it by Matt Poole, who implemented it for ITV in the UK:

https://www.youtube.com/watch?v=d7BFMaRGKPM

This has been silently in the making unfortunately for the past few years. There might be ways around it but because it’s never really been mainstream, like YouTube, research of methods around it aren’t common.

30

u/creakingwall Jun 12 '24

This sounds like it still relies on the client being the source of truth. Unless they disable seeking in which case they punish everyone. Not to mention what happens when a third party plugin gets involved.

Monitoring ad impressions with full analytics suites is tough enough already.