607
submitted 2 months ago by boem@lemmy.world to c/technology@lemmy.world
you are viewing a single comment's thread
view the rest of the comments
[-] parpol@programming.dev 49 points 2 months ago

Sample the color of a specified pixel (or something recognizable in the streaming format) every 30 frames from the original video.

Store collection of pixels in a database and share in a peer to peer network or stored on invidious instances. Because the sample size is small, and the database can be split up by youtube channel, the overall size and traffic should remain low.

When streaming a youtube video, if the plugin detects that the pixel in the video doesn't match the one in the database, automatically skip until where the pixel matches the data in the database.

[-] programmer_belch@lemmy.dbzer0.com 27 points 2 months ago

That is prone to error, just a pixel can be too small of a sample. I would prefer something with hashes, just a sha1sum every 5 seconds of the current frame. It can be computed while buffering videos and wait until the ad is over to splice the correct region

[-] might_steal_your_cat@lemm.ee 12 points 2 months ago

The problem with (good) hashes is that when you change the input even slightly (maybe a different compression algorithm is used), the hash changes drastically

[-] programmer_belch@lemmy.dbzer0.com 7 points 2 months ago

Yes, that's why I'm proposing it as opposed to just one pixel to differentiate between ad and video. Youtube videos are already separated in sections, just add some metadata with a hash to every one.

[-] might_steal_your_cat@lemm.ee 14 points 2 months ago

I think that downsizing the scene to like 8x8 pixels (so basically taking the average color of multiple sections of the scene) would mostly work. In order to be undetected, the ad would have to match (at least be close to) the average color of each section, which would be difficult in my opinion: you would need to alter each ad for each video timestamp individually.

[-] programmer_belch@lemmy.dbzer0.com 8 points 2 months ago

Yes, that could be an alternative to computing hashes, I don't know what option would be less resource intensive

[-] 4am@lemm.ee 1 points 2 months ago

Imagine thinking they can’t detect when you try to skip forward during an ad.

[-] parpol@programming.dev 2 points 2 months ago

They can't. They have no clue where you are currently in the video, and even if they did run some client side script, you could easily spoof it.

this post was submitted on 13 Jun 2024
607 points (96.5% liked)

Technology

57273 readers
4926 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS