I've been surprised this wasn't already the case, but assumed it was just an encoding overhead issue vs. just serving pre-encoded videos for both the content and ads with necessarily well-defined stream boundaries separating them.
I am not, however, suggesting that encoding ads into the final stream is appropriate or scalable, though!
Ah, smart people and ads ...
Sure, it would break people who want to watch at 2x realtime, but they seem small-fry compared to those with adblockers.
For example each chunk URL could be signed with a "donotdeliverbefore" timestamp.
Now the edge server has zero state.
Similar things are done to prevent signed in URL's being shared with other users.
For streaming you actually want the client to have a buffer past the play head. If the client can buffer the whole stream it makes sense to let them in many cases. The client buffers the whole stream and then leaves your infrastructure alone even if they skip around or pause the content for a long time. The only limits that really make sense are individual connection bandwidth limits and overall connection limits.
The whole point of HTTP-based streaming is to minimize the amount of work required on the server and push more capability to the client. It's meant to allow servers to be dumb and stateless. The more state you add, even if it's negligible per client, ends up being a lot of state in aggregate. If a system meant edge servers could handle 1% less traffic that means server costs increase by 1%. Unless those ones of ad impressions skipped by youtube-dl users come anywhere close to 1% of ad revenue it's pointless for Google to bother.
It's also ublock and adblock plus users. Estimated at about 25% of youtube viewership.
Also, the shared clock only needs to be between edge servers and application servers. And only to an accuracy of a couple of seconds. I bet they have that in place already.
Saying that though the day they finally succeed in making ads unskippable will be the time for a competitor to move in.
At that time everyone starts talking about it and I gotta imagine a bunch of new people become adblocking users.