Software to automatically detect (and if it possible remove) commercials from video files recorded from TV
Take a look at Comskip (https://github.com/erikkaashoek/Comskip). I use it with TvHeadend to mark commercials, which are then auto-skipped during playback in Kodi.
There is a paid-for, pre-built version for Windows, or if you are comfortable you can build it yourself from source code.