This tech already exists, and it's called 'Server Side Ad Insertion', with Brightcove, The Platform, Adobe and Google all offering solutions.
It's actually pretty cool - it works by instead of streaming a baked file, the client gets a 'live stream' URL and ads are inserted into that stream, dynamically, just like regular video. It's like having `badge.svg` image that's actually a PHP script that dynamically creates an SVG.
I'm not overly familiar with video tech, so I've definitely butchered the exclamation.
https://en.wikipedia.org/wiki/Commercial_skipping
Not surprisingly there was some legal action, but I think it's rather unenforceable in practice, and saying it's illegal to do so is nearly equivalent to saying that you do not have the freedom to change the channel, look away, or even close your eyes - a rather scary situation.