Leading commercials not cut out

To discuss the tuning of comskip and for posting your ini files
Post Reply
TommyC
Posts: 2
Joined: Sun Sep 17, 2006 9:26 am

Leading commercials not cut out

Post by TommyC »

When recording a show I only use 1 minute pre-padding. This makes each recording start with a commercial. When running comskip it initially detects the leading commercial correctly, but the final commercial list doesn't include the leading commercial. What parameter should I use to correctly detect this?

First example:
---------------------
Initial Commercial List
---------------------
0) 1 345 0:0:13.76
1) 15226 23792 0:5:42.64
2) 40114 44952 0:3:13.52
No change

Logo fraction: 0.6546
Maximum volume: 6190
Average volume: 1406
Average silence: 75
Sound threshold: 500
Silence level found 50
Black threshold: 25
Minimum Black level found: 15
Average brightness: 746
Uniformity level: 500
Average non uniformity: 320
Maximum gap between logo's: 355
Suggested shrink_logo: 49
Max commercial size found: 30
Dominant aspect ratio: 1.3000
Suggested logo_threshold: 0.7500
Score threshold: 1.0500
Framerate: 25.00
Total commercial length: 0:5:56.40
Block list after weighing
----------------------------------------------------
# sbf bs be fs fe sc len scr cmb ar cut bri logo vol sil corr stdev cc
0:-- 3 0 3 1 345 2.00 13.760 0.54 0 1.30 L b 2440+ 0.00 1784+ 87+ 0.000 244
1:++ 11 3 6 346 15225 0.01 595.160 0.05 0 1.30 EL b 399- 0.93 1190- 70- 0.000 39
2:-- 13 6 7 15226 15467 18.00 9.640 0.54 0 1.30 L S a b 2648+ 0.00 1927+ 85+ 0.000 264
3:-- 7 7 0 15468 16214 81.00 29.840 0.09 2 1.47 A LC S a 799+ 0.00 2073+ 92+ 0.000 79
4:-- 1 1 0 16215 16980 4.50 30.600 0.11 2 1.30 LC b 845+ 0.00 1962+ 96+ 0.000 84
5:-- 3 1 2 16981 17235 18.00 10.160 0.18 0 1.30 L S b 1490+ 0.00 1845+ 95+ 0.000 149
6:-- 4 2 2 17236 17989 18.00 30.120 0.17 0 1.30 L S a b 928+ 0.00 1224- 72- 0.000 92
7:-- 3 3 0 17990 18617 36.00 25.080 0.09 0 1.66 A L S a 1092+ 0.00 1362- 85+ 0.000 109
8:-- 1 1 0 18618 18973 2.00 14.200 0.31 0 1.30 L a 2286+ 0.00 1832+ 91+ 0.000 228
9:-- 2 1 1 18974 19259 4.00 11.400 0.16 0 2.28 A L a b 1388+ 0.00 1832+ 95+ 0.000 138
10:-- 4 2 2 19260 19638 18.00 15.120 0.23 0 1.30 L S a b 2205+ 0.00 1935+ 92+ 0.000 220
11:-- 3 3 0 19639 20394 41.63 30.200 0.10 1 1.66 A LC S a 895+ 0.00 1430+ 94+ 0.000 89
12:-- 1 1 0 20395 20608 9.51 8.520 0.03 4 1.72 A LC a 401- 0.00 1924+ 95+ 0.000 40
13:-- 1 1 0 20609 20844 9.51 9.400 0.39 4 2.23 A LC a 3326+ 0.00 1949+ 98+ 0.000 332
14:-- 1 1 0 20845 20903 4.75 2.320 0.56 4 1.30 LC b 1779+ 0.00 1407+ 750 0.000 177
15:-- 3 1 2 20904 21282 27.75 15.120 0.03 2 1.30 LC S a b 348- 0.00 2607+ 96+ 0.000 34
16:-- 3 3 0 21283 21926 16.00 25.720 0.29 4 1.66 A LC a 2338+ 0.00 2108+ 98+ 0.000 233
17:-- 4 1 3 21927 22038 8.00 4.440 0.09 4 1.30 LC b 1508+ 0.00 1940+ 94+ 0.000 150
18:-- 6 4 2 22039 22794 24.00 30.200 0.23 1 1.30 LC S b 1658+ 0.00 2577+ 97+ 0.000 165
19:-- 6 3 3 22795 23550 21.75 30.200 0.50 1 1.30 LC S b 2460+ 0.00 2365+ 97+ 0.000 246
20:-- 7 3 4 23551 23655 5.44 4.160 0.18 3 1.30 LC b 2895+ 0.00 1906+ 90+ 0.000 289
21:-- 7 5 2 23656 23792 8.16 5.440 0.92 3 1.30 LCN b 3562+ 0.00 2058+ 85+ 0.000 356
22:++ 11 2 0 23793 40113 0.01 652.800 0.05 0 1.30 EL b 357- 0.95 1104- 65- 0.000 35
23:-- 4 1 3 40114 40867 23.63 30.120 0.24 1 1.30 LC S aub 1663+ 0.00 2586+ 97+ 0.000 166
24:-- 6 3 3 40868 40997 11.81 5.160 0.18 2 1.66 A LCN b 1861+ 0.00 1468+ 95+ 0.000 186
25:-- 3 3 0 40998 41618 81.00 24.800 0.22 2 1.66 A LC S a 1407+ 0.00 2848+ 98+ 0.000 140
26:-- 4 1 3 41619 41753 6.75 5.360 0.25 2 1.30 LCN b 2592+ 0.00 2241+ 82+ 0.000 259
27:-- 6 3 3 41754 42134 27.00 15.200 0.54 1 1.30 LC S b 2934+ 0.00 1986+ 93+ 0.000 293
28:-- 7 3 4 42135 42239 2.00 4.160 0.18 0 1.30 L b 2914+ 0.00 1908+ 91+ 0.000 291
29:-- 7 4 3 42240 42746 18.00 20.240 0.27 0 1.30 L S b 2587+ 0.00 2220+ 97+ 0.000 258
30:-- 7 3 4 42747 43503 18.00 30.240 0.09 0 1.30 L S a b 1173+ 0.00 1460+ 91+ 0.000 117
31:-- 5 4 1 43504 44261 36.00 30.280 0.08 0 1.72 A L S a b 763+ 0.00 1966+ 95+ 0.000 76
32:-- 2 2 0 44262 44803 4.00 21.640 0.16 0 1.47 A L a 1345+ 0.00 2217+ 96+ 0.000 134
33:-- 1 1 0 44804 44952 2.00 5.920 0.07 0 1.30 L 1644+ 0.00 1820+ 97+ 0.000 164
Second example:
---------------------
Initial Commercial List
---------------------
0) 1 3079 0:2:3.12
1) 19737 27326 0:5:3.56
2) 42201 46370 0:2:46.76
No change

Logo fraction: 0.6900
Maximum volume: 11166
Average volume: 866
Average silence: 55
Sound threshold: 500
Silence level found 50
Black threshold: 25
Minimum Black level found: 16
Average brightness: 1010
Uniformity level: 500
Average non uniformity: 434
Maximum gap between logo's: 316
Suggested shrink_logo: 5
Max commercial size found: 44
Dominant aspect ratio: 1.3000
Suggested logo_threshold: 0.6500
Score threshold: 1.0500
Framerate: 25.00
Total commercial length: 0:7:10.68
Block list after weighing
----------------------------------------------------
# sbf bs be fs fe sc len scr cmb ar cut bri logo vol sil corr stdev cc
0:-- 1 0 1 1 60 2.00 2.360 0.22 0 1.30 L b 2783+ 0.00 1544+ 79+ 0.000 278
1:-- 1 1 0 61 185 3.94 4.960 0.39 1 1.30 LCN b 2336+ 0.00 1278+ 91+ 0.000 233
2:-- 1 1 0 186 937 23.63 30.040 0.06 1 1.30 LC S a 683- 0.00 1388+ 92+ 0.000 68
3:-- 1 1 0 938 1686 47.25 29.920 0.03 1 1.46 A LC S a 316- 0.00 1313+ 83+ 0.000 31
4:-- 2 1 1 1687 1809 5.91 4.880 0.01 2 1.30 LCN a b 292- 0.00 1969+ 82+ 0.000 29
5:-- 7 1 6 1810 2441 72.00 25.240 0.09 2 2.10 A LC S ub 503- 0.00 1394+ 90+ 0.000 50
6:-- 7 7 0 2442 2477 4.74 1.400 0.31 3 2.10 LC a 2055+ 0.00 3835+ 93+ 0.000 205
7:-- 3 1 2 2478 2937 4.74 18.360 0.11 3 1.30 LC b 1452+ 0.00 1559+ 61+ 0.000 145
8:-- 4 3 1 2938 3079 3.56 5.640 0.01 2 1.30 LC b 190- 0.00 390- 29- 0.000 19
9:-+ 1 1 0 3080 19736 0.01 666.240 0.13 0 1.30 EL a 749- 0.96 566- 43- 0.000 74
10:-- 1 1 0 19737 20226 7.11 19.560 0.14 2 1.66 A LC a 1220+ 0.00 711- 59+ 0.000 122
11:-- 1 1 0 20227 20261 7.31 1.360 1.00 5 1.54 LC a 2514+ 0.00 652- 62+ 0.000 251
12:-- 1 1 0 20262 20375 7.31 4.520 0.36 5 1.66 LC a 2192+ 0.00 814- 83+ 0.000 219
13:-- 2 1 1 20376 20476 4.11 4.000 0.26 3 1.30 LC ub 1623+ 0.00 586- 52- 0.000 162
14:-- 7 2 5 20477 21230 27.32 30.120 0.32 2 1.30 LC S a b 1787+ 0.00 1761+ 96+ 0.000 178
15:-- 5 5 0 21231 21347 2.63 4.640 0.57 1 1.54 LC a 2170+ 0.00 1822+ 96+ 0.000 217
16:-- 2 1 1 21348 22352 3.00 40.160 0.61 0 1.30 L N b 3747+ 0.00 1654+ 94+ 0.000 374
17:-- 2 1 1 22353 22403 2.00 2.000 0.53 0 1.30 L b 4588+ 0.00 2020+ 93+ 0.000 458
18:-- 1 1 0 22404 22902 18.00 19.920 0.80 0 1.30 L S a 6667+ 0.00 1749+ 95+ 0.000 666
19:-- 2 1 1 22903 23526 36.00 24.920 0.07 0 1.66 A L S a b 995- 0.00 1379+ 92+ 0.000 99
20:-- 2 1 1 23527 24278 21.75 30.040 0.05 1 1.30 LC S b 442- 0.00 1112+ 82+ 0.000 44
21:-- 1 1 0 24279 24334 7.25 2.200 0.39 4 1.30 LC a 3428+ 0.00 1338+ 76+ 0.000 342
22:-- 2 1 1 24335 24778 14.50 17.720 0.20 4 1.54 A LC b 1173+ 0.00 1512+ 95+ 0.000 117
23:-- 1 1 0 24779 25026 48.00 9.880 0.17 1 1.54 A LC S a 1245+ 0.00 2036+ 97+ 0.000 124
24:-- 1 1 0 25027 25402 18.00 15.000 0.07 0 1.30 L S b 566- 0.00 1789+ 96+ 0.000 56
25:-- 1 1 0 25403 26201 2.00 31.920 0.12 0 1.30 L b 944- 0.00 1757+ 94+ 0.000 94
26:-- 1 1 0 26202 27326 18.00 44.960 0.38 0 1.30 L S b 2600+ 0.00 1855+ 97+ 0.000 260
27:-+ 1 1 0 27327 42200 0.01 594.920 0.08 0 1.30 EL a 608- 0.98 454- 28- 0.000 60
28:-- 3 1 2 42201 42318 3.00 4.680 0.18 0 1.30 L N ub 1516+ 0.00 562- 47- 0.000 151
29:-- 2 2 0 42319 43068 25.31 29.960 0.61 2 1.30 LC S b 1770+ 0.00 933+ 57+ 0.000 177
30:-- 1 1 0 43069 43107 19.64 1.520 0.38 10 1.30 LC a 2282+ 0.00 1562+ 88+ 0.000 228
31:-- 1 1 0 43108 43696 51.32 23.520 0.27 12 1.46 A LC a 1733+ 0.00 1696+ 98+ 0.000 173
32:-- 6 1 5 43697 43823 48.71 5.040 0.28 14 1.30 LCN a b 1322+ 0.00 1767+ 92+ 0.000 132
33:-- 6 6 0 43824 44318 99.99 19.760 0.14 11 1.66 A LC S a 1181+ 0.00 703- 60+ 0.000 118
34:-- 1 1 0 44319 44352 8.64 1.320 1.00 9 1.54 LC a 2470+ 0.00 658- 64+ 0.000 247
35:-- 1 1 0 44353 44474 21.76 4.840 0.43 12 1.66 LCN a 2729+ 0.00 792- 77+ 0.000 272
36:-- 2 1 1 44475 44569 22.67 3.760 0.12 14 1.30 LC b 663- 0.00 590- 53- 0.000 66
37:-- 1 1 0 44570 44619 6.86 1.960 0.24 7 1.30 LC u 3460+ 0.00 1348+ 93+ 0.000 346
38:-- 1 1 0 44620 44661 6.34 1.640 0.05 6 1.30 LC u 761- 0.00 1369+ 70+ 0.000 76
39:-- 6 1 5 44662 45114 6.34 18.080 0.08 6 1.30 LC a b 309- 0.00 1528+ 76+ 0.000 30
40:-- 5 5 0 45115 45868 50.75 30.120 0.07 2 1.66 A LC S b 893- 0.00 1238+ 95+ 0.000 89
41:-- 2 1 1 45869 46118 36.00 9.960 0.31 0 1.66 A L S a b 2128+ 0.00 1632+ 96+ 0.000 212
42:-- 3 2 1 46119 46370 18.00 10.040 0.15 0 1.30 L S b 1817+ 0.00 1691+ 97+ 0.000 181
43:-+ 4 2 2 46371 53947 0.01 303.040 0.22 0 1.30 EL a 1174+ 0.81 1220+ 75+ 0.000 117
My ini-file:
detect_method=43 ;1=black frame, 2=logo, 4=scene change, 8=fuzzy logic, 16=closed captions, 32=aspect ration, 64=silence, 255=all
subtitles=1
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
max_commercialbreak=600 ;maximum length in seconds to consider a segment a commercial break
min_commercialbreak=25 ;minimum length in seconds to consider a segment a commercial break
max_commercial_size=125 ;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=125 ; any segment longer than this will be scored towards show.
non_uniformity=500
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
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
punish=0 ; 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
intelligent_brightness=0 ; Set to 1 to use a USA specific algorithm to tune some of the settings, not adviced 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.75
logo_present_modifier=0.01
punish_no_logo=1 ; 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
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=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
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
padding=0
ms_audio_delay=5
max_repair_size=40 ; Will repair maximum 40 missing MPEG frames in the timeline, set to 1 to disable repairing for players that don't use PTS.
delete_logo_file=1 ; set to 1 if you want comskip to tidy up after finishing
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=0
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=1 ; 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
cuttermaran_options="cut=\"true\" unattended=\"true\" muxResult=\"false\" snapToCutPoints=\"true\" closeApp=\"true\""
mpeg2schnitt_options="mpeg2schnitt.exe /S /E /R25 /Z %2 %1"
dvrcut_options="dvrcut \"%s.dvr-ms\" \"%s_clean.dvr-ms\" "
erik
Site Admin
Posts: 3370
Joined: Sun Aug 21, 2005 3:49 pm

Post by erik »

Both examples say

---------------------
Initial Commercial List
---------------------
0) 1 3079 0:2:3.12
1) 19737 27326 0:5:3.56
2) 42201 46370 0:2:46.76
No change

"No change" means the final comercial list is identical to the initial commercial list, could you post the .txt file that shows the initial commercial is no longer there?
TommyC
Posts: 2
Joined: Sun Sep 17, 2006 9:26 am

Post by TommyC »

Unfortuntly I have deleted those two specific mpeg's and files. But the final commercial-list in the text-files were identical to the initial list except the first commercial, which was missing.

When viewing the file in GB-PVR while analyzing it at the same time, it did cut out the leading commercial until comskip finished and removed it from the text-file.

Hope this helps!

And also, big thanks for the quick reply! :D
erik
Site Admin
Posts: 3370
Joined: Sun Aug 21, 2005 3:49 pm

Post by erik »

I will have a look in the code because I do not remember where that could be done without being shown in the log file. Will take a couple of days due to travel.
Post Reply