Beginners Fine Tuning & Tweaking Comskip
by Michael Healy @ 7:45 am on April 7th, 2009 in commercial skip, programs with No Comments and Permalink
Comskip is the default commercial detection software for most commercial skipping Media Center programs. In some cases to get optimal results you will need to tweak the settings to get the best results for your situation. There is no GUI for editing comskip’s settings and instead it must be done through a settings file named comskip.ini in the same folder as comskip.exe.
First thing you’ll need is a file or two to test comskip detection on. To get these you’ll need to convert a few recorded shows to DVR-MS. The comskip guide suggests using a small and large file, say a 30 minute show and an hour one. You may also want to check to make sure you have the latest version of comskip from the official site.
Once you have your test files create a shortcut to comskip and then open the properties for that shortcut. In the Target input box add “-w” without the quotes and save the shortcut. Now drag and drop your first test file onto the shortcut. Comskip will begin to process the file with a window displaying a number of graphs and the show in the background in black and white.
After the process has completed you’ll be able to navigate the timeline by clicking this screen. The far left being the beginning of the timeline and the far right being the end of the time line, navigate through and find point where commercials begin and end then note the graphs at these points.
Take a look at the image below for an idea of what some of the graphs represent. This is how we will determine which methods to use when detecting commercials. If you notice that the channel logo detection and aspect ratio change on each commercial change those may be good methods of detection for you.
Here you can see that there are a number of areas where various graphs drop out. The aspect ratio changes and channel logo is no longer detected at these positions and may provide a reliable detection method for this channel or show (default comskip installs include a “PostProcessing.bat” that demonstrates per channel ini loading).
To set these as the default detection methods open up comskip.ini in a text editor such as notepad. The first line of your ini file should include a variable called “detect_method”. This method should be set to a number which is the sum of the detection methods you’d like comskip to use. For instance, Aspect ratio is 32 and logo detection is 2 so the detect_method would be 34. Here are a list of available detection methods in the current comskip distribution:
1=black frame, 2=logo, 4=scene change, 8=fuzzy logic, 16=closed captions, 32=aspect ration, 64=silence, 128=cutscenes, 255=all
If you notice that comskip is routinely cutting off a few seconds of the show before or after a commercial break there are a few settings to help you easily adjust for this. First the “padding”setting allows you to add a certain number of seconds to the beginning and end of commercial breaks that will not be cut. If you want comskip to remove more instead of adding assign remove_before and remove_after with the number of seconds to be removed.
You may also want to alter the minimum amount of time for a block to be considered a commercial. To do this find min_commercial_break and max_commercial_break, these two variable define in seconds the minimum and maximum times to consider a block as commercials. For instance, if a commercial break is only 25 seconds and min_commercial_break is set to 30 seconds this wouldn’t be considered a commercial break.
These basic tips should have you on your way to fine tuning your comskip settings to suit your recordings. For even more information check out the official guide to tuning comskip or the comskip tuning forums. Also, be sure to check back with Hack7MC for more tuning guides in the future!
