I am pessimistic about scripts being able to handle this, since it is a server side manipulation of streaming packets. It might be interesting if instead of seeing ads, a workaround is invented where the ad is not shown to user and video remains black and silent for that duration, and Google gets to hear such a thing has happened. If they get angry about it, it might reveal more about what they desire with forcing watching ads for people.