How to cut commercials and join files without Channels subscription

Queen finally got to rest and she did that on my birthday, so I will remember this day forever. So now having a bit more time I decided to write another little tutorial this time for ad cutting.
Channels use comskip which is open source, however there are few different websites for this tool (one is for Windows and even offer GUI) and I'm not sure what is the correct one. If you have installed Channels DVR server you will find binary inside the build, if you cannot find the directory use find . -name comskip.

Comskip uses file called comskip.ini for controlling its behaviour. I grabbed one from one of the Channels directory and for me it looked like this:

verbose=10
detect_method=123 ;; everything but scenechange
punish_no_logo=0
cc_correct_type_modifier=1
length_nonstrict_modifier=1.5 ;; required before below due to comskip.ini parsing bug
combined_length_nonstrict_modifier=1
min_show_segment_length=222
min_commercialbreak=45
use_existing_logo_file=0
logo_fraction=0.39
delete_logo_file=1
output_vdr=1
output_edl=1
output_ffmeta=1
output_ffsplit=1
thread_count=4
lowres=1

there are a lot more options, most of them very poorly documented. For example this set of option didn't work for me for "Hannity" show on Fox News as the program didn't displayed ads but the blue image with logo and "Commercial break in progress text". If you run comskip -q --ini=comskip.ini <filename> (assuming ini file is same directory as input video) after some while you get few files produced, the most intresting is the one with .ffsplit extension as it contains directives for ffmpeg to use.

I made a bash script available here it is untested, but you should get the idea. first argument is file name second is the name of video codec (default is libx264), if you want no re-encoding set "copy" however after join it may still have some commercial left, I read it's better to reencode but doing so significantly increase time of operations. it leave original file intact and joined file is saved with _ in the beginning. The main caveat is you cannot visually browse and set frames as ads, I don't know how the developers did it, but eventually I will learn that :slight_smile:

Feel free to share your own comskip.ini tuned to your own needs if you understand the options. We live in times where storage is not cheap so it's better to save energy and money to not storing unnecessary data.

Sorry but the exact opposite is true. Storage is cheaper than its ever been. I just found a 10tb drive on amazon for $129. IMHO not worth the effort to destructively cut commercials. Just let channels do its thing...

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.