Then again, what about clips from the show that you're watching, it might start blocking part of the show as it thinks it's an advert.
Then again, what about clips from the show that you're watching, it might start blocking part of the show as it thinks it's an advert.
I modeled my change on similar changes made by Streamlink's Twitch plugin recently: https://github.com/streamlink/streamlink/pull/2372
https://gist.github.com/satori99/2cb06938bfe8532ecc00e609065...
ETA: Looking it up it looks like America has laws about this now. I'm in Canada I'm not sure if it's the same here.
And on further reading, it seems like advertisers may be using excessive compression to artificially boost loudness and skirt the law.
Even if peak volume is under some prescribed maximum, compressed audio can feel very loud. Commercials often leave very little dynamic space, which makes them jarring in that they feel "loud."
This feature was in MythTV literally 10+ years ago. Commercials are very easy to detect using simple methods [0].
"The process is CPU-intensive and can take several minutes to complete, depending on the recording duration. On a reasonably fast CPU, we typically see a 30-minute recording take 2-4 minutes to process."
Assuming they know what they are doing, real time blocking seems not possible with a reasonably modern approach.
"The recording is analyzed on various characteristics such as black frames, silences and changes in aspect ratio.
Based on this information Comskip segments the recording in blocks and using heuristics, together with additional information such as the presence of logo, the scene change rate, Close Captioning information and other information sources Comskip tries to determine what blocks of the recording are to be characterized as commercials."
It doesn't say it explicitly, but based on this and the note on high CPU utilization, I get the impression it has to look back and forward to determine where the commercial is.