Way back in the days of video recorders, analog TV etc, I remember hearing talk of trying to detect ads on broadcast TV to either pause recording or maybe provide some sort of skip functionality on playback.
I think they did something looking at the horizontal sync signal. The was a clear discontinuity when the station switched from program to ad and back again.