How are the ads even skippable on YouTube? I have never really had a good answer to that. I mean, why is the ad even a different stream or detectable on the client? Shouldn't the ads just be spliced into the videos if you really want to make sure people watch them? Is it because it would be prohibitively expensive to do that kind of live encoding for each viewer?
You wouldn't even need live encoding because every YouTube video is normalized and if you have two streams that were encoded with the same parameters you can cut and concatenate without re encoding
Right now (or few months ago, when I tinkered with it) ads are different streams, so to skip them, ublock intercepts and alters API responses, stripping ad info. Why they're not embedded into video stream, that I don't know.
Yes, but the server knows exactly what frames it has sent you and when. If you don't want to watch the ad frames there's nothing the server can do, but it can make sure to not send you the frame that comes after the ad, until the 10 seconds of the ad has passed since it sent you the last frame before the ad.
That works for pre-roll ads, forcing the client to silence them and wait at best (I believe the Twitch streaming service does this)
For mid-stream ads, that doesn't work. You could pre-fetch the ad and surrounding video early, so that you can watch buffered content while the server thinks an ad is playing.