Feature request: Comskip ini access


#1

I’m very impressed with the accuracy of your commercial skipping for me (all ATSC HD). However, there are often times when it helps to tweak these things on a show-by-show or channel-by-channel basis. It looks like you’ve used comskip, but I can’t see a comskip.ini file installed anywhere on my system; Is there any chance you can expose the comskip.ini file(s) used in the release build, so that we can experiment? Thanks.


Comskip multi-threading
Commercial Detection Accuracy
#2

I see comskip.ini here:

~/channels-dvr/latest/comskip.ini

Not sure if its safe to tinker with though.


#3

Changes to that file will currently be lost every time the DVR updates itself.

We plan to allow some configuration eventually, either of the file wholesale or with per-show settings. Right now the only setting available is a per-show toggle to turn commercial detection off.


#4

me again, where is the toggle for per-show comskip? i don’t see it in the web interface…

was going to ask for the feature to just turn off comskip on certain channels - on PBS stations it generally makes a mess of the recording, sometimes marking huge swaths of the recording as a commercial which makes navigation essentially impossible. related to this, it might be nice to be able to turn off the commercial skip behavior in the player as sometimes you don’t know the marking is messed up until you try to play the show.

thanks


#5

It’s a little hidden at the moment. In the web admin, on the Recordings tab, click Shows > All and find the show. On the show page, click the gear and then uncheck Detect Commercials.


Feature request - keep only 1 recording
Date recorded
#6

ah - i was looking for it as a schedule/pass option. so doing this deletes the comskip output? or just disables it? is this also available from the tvOS app interface?


#7

Disables comskip, to save CPU.

Not available from tvOS yet.


#8

It looks like, since some time around February 2/3, comskip.ini is now written to the Logs/comskip/{ID} directory by the code, rather than being a file in the same directory as the binaries. Unfortunately this means that my fix (using inotifywait) to replace the comskip.ini file no longer works, and commercials are messing up more than previously.

Are there any plans to tune the comskip process further soon, or any workaround you can suggest for me, short of simply preventing it from running on a show-by-show basis then implementing comskip with my own homebrew comskip.ini?


#9

Can you share the changes you’ve made to comskip.ini? Are you customizing per show or just in general?


#10

I am not customising per show. I am using the last version in this thread:

http://www.kaashoek.com/comskip/viewtopic.php?f=7&t=1741

with some modifications. I’m no expert, by any means.

Note that this is tuned as generally as possible to US broadcast TV. As is usual for comskip, what works for one circumstance will probably not work for all. It’s possible your simpler comskip.ini is better for non-US viewers.


detect_method=107 ; 1=black frame, 2=logo, 4=scene change, 8=fuzzy logic, 16=closed captions, 32=aspect ration, 64=silence, 128=cutscenes, 255=all
validate_silence=1 ; Default, set to 0 to force using this clues if selected above.
validate_uniform=1 ; Default, set to 0 to force using this clues (like pure white frames) if blackframe is selected above.
validate_scenechange=1 ; Default, set to 0 to force using this clues if selected above.
verbose=10 ; Show a lot of extra info, level 5 is also OK, set to 0 to disable
max_brightness=60 ; Frame not black if any pixels checked are greater than this (scale 0 to 255)
test_brightness=40 ; Frame not pure black if any pixels checked are greater than this, will check average brightness (scale 0 to 255)
max_avg_brightness=25 ; Maximum average brightness for a dim frame to be considered black (scale 0 to 255) 0 means autosetting
maxbright=1 ; New
brightness_jump=200 ; New
max_commercialbreak=500 ; Maximum length in seconds to consider a segment a commercial break
min_commercialbreak=21 ; Minimum length in seconds to consider a segment a commercial break, some sports require lower numbers than normal tv shows
max_commercial_size=197 ; Maximum time in seconds for a single commercial or multiple commercials if no breaks in between
min_commercial_size=4 ; Mimimum time in seconds for a single commercial
min_show_segment_length=250 ; Any segment longer than this will be scored towards show (sports and 30 minute programming), increase this to 250 for 1 hour long programming
non_uniformity=500 ; Set to 0 to disable cutpoints based on uniform frames
max_volume=500 ; Any frame with sound volume larger than this will not be regarded as black frame
max_silence=100 ;
min_silence=12 ; Any deep silence longer than this amount of frames is a possible cutpoint
noise_level=5 ; New
ticker_tape=0 ; Amount of pixels from bottom to ignore in all processing
ignore_side=0 ; New, default 0
subtitles=0 ; New, default 0
logo_at_bottom=0 ; Set to 1 to search only for logo at the lower half of the video, do not combine with subtitle setting
use_existing_logo_file=1 ; Use logo file already created at beginning of show, default 0
two_pass_logo=1 ; New
punish=1 ; Compare to average for sum of 1=brightness, 2=uniform 4=volume, 8=silence, 16=schange, set to 0 to disable
punish_threshold=1.3 ; Multiply when amount is above average punish_threshold
punish_modifier=4 ; When above average * threshold multiply score by this value
intelligent_brightness=0 ; Set to 1 to use a USA specific algorithm to tune some of the settings, not advised outside the USA
logo_percentile=0.92 ; If more then this amount of logo is found then logo detection will be disabled
logo_threshold=0.7250 ; Digital signals can be higher
global_threshold=1.79 ; New
min_black_frames_for_break=1 ; Default 1
punish_no_logo=0 ; Default, set to 0 to avoid show segments without logo to be scored towards commercial
aggressive_logo_rejection=0
connect_blocks_with_logo=1 ; Set to 1 if you want successive blocks with logo on the transition to be regarded as connected, set to 0 to disable
delay_logo_search=0 ;
logo_filter=0 ; Set the size of the filter to apply to bad logo detection, 4 seems to be a good value
edge_step=2 ; New, default 1
cut_on_ar_change=1 ; Set to 1 if you want to cut also on aspect ratio changes when logo is present, set to 2 to force cuts on aspect ratio changes. set to 0 to disable
delete_show_after_last_commercial=0 ; Set to 1 if you want to delete the last block if its a show and after a commercial
delete_show_before_first_commercial=0 ; New, default 0
delete_show_before_or_after_current=0 ; Set to 1 if you want to delete the previous and the next show in the recording, this can lead to the deletion of trailers of next show
delete_block_after_commercial=0 ; Set to max size of block in seconds to be discarded, set to 0 to disable
remove_before=0 ; Amount of seconds of show to be removed before ALL commercials
remove_after=0 ; Amount of seconds of show to be removed after ALL commercials
shrink_logo=5 ; Reduce the duration of the logo with this amount of seconds
after_logo=0 ; Set to number of seconds after logo disappears comskip should start to search for silence to insert an additional cutpoint
before_logo=0 ; Set to number of seconds before logo appears comskip should start to search for silence to insert an additional cutpoint
padding=0.50
ms_audio_delay=5
volume_slip=40
skip_b_frames=0 ; Set to 1 to force Comskip to skip frames for higher processing speed.
thread_count=2 ; Set to utilize two cores
max_repair_size=200 ; Will repair maximum 200 missing MPEG frames in the timeline, set to 0 to disable repairing for players that don’t use PTS
disable_heuristics=4 ; Bit pattern for disabling heuristics, adding 1 disables heristics 1, adding 2 disables heristics 2, adding 4 disables heristics 3, 255 disables all heuristics
delete_logo_file=1 ; Set to 1 if you want comskip to tidy up after finishing
output_edl=1
output_vdr=1 ; Set to 1 if you want XBMC to skipping commercials
output_ffmeta=1
output_ffsplit=1


#11

95% of those options are just being set to default values. I forgot how confusing and complicated all the comskip.ini examples out there are.

I suspect you’re getting better results because your detect method includes scene changes.


#12

For now, how about I use comskip.ini from the data directory if it exists there?


VideoReDo
#13

Sounds good! Are there plans for internal optimization, to take into account recording settings (e.g. padding), country, channel, etc.? I imagine there are quite a few things that could be tweaked, and only a finite time to do so.


#14

This is implemented in v2017.02.22.0443.


#15

Is this dynamic based on available cores?
thread_count=2 ; Set to utilize two cores

I am running on MAC MINI i7 quad core and it runs very fast. And I think you only run 1 COMSKIP at a time which is probably a good idea. Assuming 1 COMSKIP at a time would be good to have it use all 4 cores.

The reason I ask is sometimes you can get a processor with 2 cores and each core runs faster then a each processor with 4 cores. My 4 cores run very fast but am considering upgrading my NAS in the future and might consider running the DVR on it (maybe).


Commercial skipping - is there a way to auto skip commercials during playback?
#16

Based on my prior post I went to find the current comskip.ini on my MAC and could not find it. Pretty sure it used to be with the COMSKIP program. Did you move it or is it hidden?

You said you did the following. Is the file for changes to your default comskip.ini? Of is it replacement for your comskip.ini file. I.E. If you only used 2 cores and I wanted to use 4 cores could I just add that 1 parameter to a comskip.ini in the data folder and you would use both comskip.ini? Or do I need to copy your comskip.ini and make the changes to it?
For now, how about I use comskip.ini from the data directory if it exists there


#17

The comskip.ini is copied into each Log folder where comskip runs.

If you add a custom comskip.ini it needs to be the full config, as they are not combined.

Here is the default comskip.ini the DVR uses:

use_existing_logo_file=0
thread_count=1
verbose=10
lowres=1
logo_fraction=0.39
delete_logo_file=1
output_vdr=1
output_edl=1
output_ffmeta=1
output_ffsplit=1


Commercial Detection Experiences