cross-posted from: https://lazysoci.al/post/14579120

YouTube is currently experimenting with server-side ad injection. This means that the ad is being added directly into the video stream.

This breaks sponsorblock since now all timestamps are offset by the ad times.

For now, I set up the server to detect when someone is submitting from a browser with this happening and rejecting the submission to prevent the database from getting filled with incorrect submissions.

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    7 months ago

    I mean, I think that in the long run, trying to fight an arms race against Google on ad visibility is a losing proposition, but this isn’t really all that hard to defeat from a technical standpoint. You just identify ads relative to timestamp offsets from a given matched frame. Use some kind of fuzzy (needs to?be fuzzy because lossy compression will alter frames a bit) hash to identify that frame, and use an identifier where it’s computationally-cheap to reject most frames.

    So, like, “ad ranging from frame hash 18037gb5028de882 + .53 sec lasting 30 seconds”.

    I dunno how Sponsorblock works – I don’t use it – but I assume that it has some human manually identify a time. In picking a frame to use for the offset, the software needs to hash each frame in the video. Then when someone flags a frame as starting an ad sequence, search backwards from the identified time, and pick a frame to match against, look for a frame with a unique hash in the video.

    There’d be some preprocessing time, but I imagine that the human interface would basically be the same. Some overhead to playback software, because it has to generate the hash for each frame while playing. If there’s no Sponsorblock information for a given video, don’t need to generate the hashes, though.

    • Kissaki@beehaw.org
      link
      fedilink
      English
      arrow-up
      10
      ·
      7 months ago

      Right now it’s entirely timestamp-based. That means it can interface and work on simple playback terms. On time, jump, jump to time, etc. Having to get frame data and hash it, and make playback depend on it adds a lot of technical complexity.

      If ad length varies you don’t even know how far to jump ahead. And if you haven’t prebuffered the data until after the ad, you can’t find out from a hashed after-frame-hash-value either.