MythTV commercial skipping was absolutely magical. I understand at a high level how they did it; there are lots of obvious heuristics you can use for this (black detection, silence detection, observing the CBS logo/bug going away, etc.) I also find it fascinating that this was never described as "AI" back in the day; today it would 100% be.
Also, this for Youtube. It's enabled on StreamNextTube and works a charm https://sponsor.ajay.app/