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.

  • Gacrux@lemm.ee
    link
    fedilink
    English
    arrow-up
    75
    ·
    6 months ago

    does this mean stuff like yt-dlp will download videos with ads in thrm as well?

    • OsrsNeedsF2P@lemmy.ml
      link
      fedilink
      English
      arrow-up
      42
      arrow-down
      2
      ·
      edit-2
      6 months ago

      Almost certainly not, although fair disclaimer, I don’t actually know. Ads need to be tailored to the user when delivered, so it’s likely the YouTube frontend requesting the next chunk of video to be an ad instead of the next chunk of video from blob storage. yt-dlp likely just requests successive chunks straight from blob storage, passing this.

      If YouTube served ads by saying “point to an ad chunk next” in their blob storage, 1. Everyone would see the same ad and 2. Premium users would still see ads.

      To patch this, YouTube really needs to stop serving video chunks directly from storage, but I forget the reason they haven’t done that already.

      (Technical note; I’m assuming blob storage chunks contain 1-2 seconds of video and metadata pointing to the next one, like a linked list. I’m not sure if this is how YouTube works, but many video platforms do this)

      • ReversalHatchery@beehaw.org
        link
        fedilink
        English
        arrow-up
        9
        ·
        6 months ago

        Ads need to be tailored to the user when delivered

        1. It does not. If you install a new browser and open YouTube the first time, they’ll be able to show ads to you
        2. They could be tailored based on other factors too, like country, region, or even household by the IP

        I think the backend could just generate the ad ridden video feed for the specific user. Most probably it would be very resource intensive, but I can only hope so… but then I also don’t know much about HLS and other fragmented streams so it might not be a performance problem at all.

        like a linked list

        I think the full list of chunks is (currently) known beforehand. That’s how yt-dlp can download on multiple threads, but also how it can show the number of total fragments relatively quickly on the progress bar

            • EveryMuffinIsNowEncrypted@lemmy.blahaj.zone
              link
              fedilink
              English
              arrow-up
              10
              ·
              edit-2
              6 months ago

              Gross.

              Welp, I sure hope either we stay on the winning side of the cat-and-mouse game or a lot of creators jump ship to other emerging platforms (not that there are many), because it’d be a damn shame to have to stop watching some of the creators I enjoy watching. Many of them are damned talented folks IMHO.

              I’ve heard good things about Nebula, but sadly a lot of the channels I watch are not quite on there yet. Also, I’m broke, so there’s that. Lol.

        • Zorsith@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          5
          ·
          edit-2
          6 months ago

          Ew. I’m not entering account credentials on anything I don’t own (ie, at work to see a tutorial on something I need to learn).

      • Gacrux@lemm.ee
        link
        fedilink
        English
        arrow-up
        6
        ·
        6 months ago

        yeah that makes sense. i was thinking maybe youtube had servers to decide what chunks clients would get, maybe by looking at whether or not they are premium users first. but anyway youtube still needs a way to differentiate between ad chunks and video chunks, otherwise we would just be able to skip 10 seconds through all the ads. surely that can be exploited somehow.