Originally posted by bestbang4thebuck:
It does seem that the truest indicator that the content has switched from program material to commercials is the vast increase in audio level.
It isn't as easy as that. Perceived loudness is a product of the power content of the waveform, and this can have little to do with amplitude. The most obvious example of this is with rock CDs which utilize "brick-wall" limiting which raises the total audio level to near maximum without exceeding full scale digital at any point. Music processed in this manner sounds extremely "loud" compared to a non-processed version which might have the same peaks occurring at full scale digital, but with the lower levels elsewhere preserved.
A mere level detector as you propose would not be able to differentiate between the two, because the levels are basically the same in both instances.
The problem arises because almost all broadcast (and cable) content is highly compressed, and the difference in the amount of compression (and brick-wall limiting) between normal program material and commercials is often difficult to differentiate with electronic means, yet the difference between the two can be readily detected by the ear.
I designed a box awhile back which attempted to perform this differentiation through integral analysis of the audio. It worked to a degree, but the problem was that once a channel was changed, the thresholds between program and commercials was invariably different, and the box had to be recalibrated.
Dolby Volume uses more sophisticated analysis, along with metadata.