improve commercial detection at the beginning of a recording

Here you can ask your questions on how to use Comskip for the detection of commercials. Also questions on how to remove commercials are welcome
Post Reply
seminox
Posts: 3
Joined: Mon Apr 15, 2013 10:55 am

improve commercial detection at the beginning of a recording

Post by seminox »

Hi @all,

could someone please have a look at my comskip.ini?

Comskip works fine so far, but does not recognize the commercial at the beginning of a recording. i start recording 3 minutes before a movie start, and stop the rec 5 minutes after the movie ends. but comskip does not recognize the first minutes of the recording.

any help will be appreciated....

my comskip.ini:

Code: Select all

;### Globale-Parameter ###

edl_mode=0              ;1=cut 3=commercial skip
thread_count=3          ;parallel computing
detect_method=107       ;1=black frame, 2=logo, 4=scene change, 8=fuzzy logic, 16=closed captions, 32=aspect ration, 64=silence, 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=5               ;show a lot of extra info, level 5 is also OK, set to 0 to disable
delete_logo_file=1
output_framearray=0
output_debugwindow=0
output_default=0

; ### Helligkeit ###

max_avg_brightness=25   ;maximum average brightness for a dim frame to be considered black (scale 0 to 255) 0 means autosetting
test_brightness=45      ;frame not pure black if any pixels checked are greater than this, will check average brightness
max_brightness=65       ;frame not black if any pixels checked are greater than this (scale 0 to 255)
intelligent_brightness=0 ; Set to 1 to use a USA specific

; ### Länge ###

max_commercialbreak=800 ;maximum length in seconds to consider a segment a commercial break
min_commercialbreak=10  ;minimum length in seconds to consider a segment a commercial break
max_commercial_size=180 ;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=600 ;(300) any segment longer than this will be scored towards show.

; ### Schwellen ###

non_uniformity=750      ;
max_volume=500          ; any frame with sound volume larger than this will not be regarded as black frame
min_silence=20          ; Any deep silence longer than this amount  of frames is a possible cutpoint
ticker_tape=0           ; Amount of pixels from bottom to ignore in all processing

; ### Punish ###

punish=31               ; 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=2       ; When above average * threshold multiply score by this value
length_strict_modifier=1.1
length_nonstrict_modifier=1.5
combined_length_strict_modifier=2.0
combined_length_nonstrict_modifier=1.25
logo_present_modifier=1
excessive_length_modifier=0.01
ar_wrong_modifier=1.0
min_schange_modifier=0.5
max_schange_modifier=2.0
schange_threshold=80
cc_commercial_type_modifier=4.0
cc_wrong_type_modifier=2.1
cc_correct_type_modifier=0.75
dictionary_modifier=1.00

; ### Logo ###

logo_percentile=0.95    ; if more then this amount of logo is found then logo detection will be disabled
logo_threshold=0.78     ;
punish_no_logo=1        ; Default, set to 0 to avoid show segments without logo to be scored towards commercial
aggressive_logo_rejection=1     ;
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
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
shrink_logo=10  ; Reduce the duration of the logo with this amount of seconds
after_logo=0    ; set to number of seconds after logo disappears

; ### Cutpoints ###

cut_on_ar_change=1                      ; set to 1 if you want to cut also 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_or_after_current=1   ; 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
remove_before=1.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 comskip should start to search for silence to insert an additional cutpoint
padding=0
ms_audio_delay=5
max_repair_size=200     ; Will repair maximum 40 missing MPEG frames in the timeline, set to 1 to disable repairing for players that don't use PTS.

;### Output ###

output_framearray=0     ; create a big excel file for detailed analysis, set to 0 to disable
output_videoredo=0
output_womble=0
output_mls=0            ; set to 1 if you want MPeg Video Wizard bookmark file output
output_cuttermaran=0
output_mpeg2schnitt=0
output_mpgtx=0
output_dvrcut=0
output_zoomplayer_chapter=0
output_zoomplayer_cutlist=0
output_edl=1
output_edlx=0
output_vcf=0
output_btv=0            ; set to 1 if you want Beyond TV chapter cutlist output
output_projectx=0       ; set to 1 if you want ProjectX cutlist output (Xcl)
output_demux=0          ; set to 1 if you want comskip to demux the mpeg file while scanning
sage_framenumber_bug=0
sage_minute_bug=0
live_tv=0       ; set to 1 if you use parallelprocessing and need the output while recording
live_tv_retries=1       ; change to 8 when using live_tv in BTV
erik
Site Admin
Posts: 3369
Joined: Sun Aug 21, 2005 3:49 pm

Re: improve commercial detection at the beginning of a recor

Post by erik »

Is there a short commercial block just after the first part of the show?

You have set

delete_show_before_or_after_current=1

This will cause comskip to try delete the last part of the "previous" show
seminox
Posts: 3
Joined: Mon Apr 15, 2013 10:55 am

Re: improve commercial detection at the beginning of a recor

Post by seminox »

hi erik,

thanks for your fast answer.

recording starts 2 minutes before movie starts and ends 5 minutes after movie ends.

so my movie looks like this:
1. short commercial part in the beginning (always starting from 0 if i would write an edl file)
2. movie starts and runs until first commercial break
3. continues after first break and gets to second break
3. continues after second break and ends. at the end there would be another short commercial sequence.

xxmmmmmmmmmmmmmmmmmmmmmmxxxxxxxmmmmmmmmmmmmmmmmmmmxxxxxxxmmmmmmmmmmmmmmmmmmmmmmmmmmxxxxx

x=commercial
m=movie

btw.: i'm using your linux version which runs great on openelec ;-))
erik
Site Admin
Posts: 3369
Joined: Sun Aug 21, 2005 3:49 pm

Re: improve commercial detection at the beginning of a recor

Post by erik »

To be able to help you better I would suggest you follow the "how to ask for help" post as I need more data
seminox
Posts: 3
Joined: Mon Apr 15, 2013 10:55 am

Re: improve commercial detection at the beginning of a recor

Post by seminox »

hi erik, email is on its way ;-)
Post Reply