Commercial Detection fails

I’ve noticed that occasionally I get no commercial markers on a recording. When I look in the log commercial detections fails with code “1”. This is on a Synology DS218+ running latest Production version. Log snippet:

2019/12/01 17:25:00 [DVR] Finished job 1575223190-9 NFL Football
2019/12/01 17:25:01 [DVR] Processing file-1269: TV/NFL Football/NFL Football New York Jets at Cincinnati Bengals 2019-12-01-1259.mpg
2019/12/01 17:25:01 [DVR] Waiting 3h34m48.093426047s until next job 1575251990-12 Shark Tank
2019/12/01 17:25:02 [DVR] Running commercial detection on file 1269 (TV/NFL Football/NFL Football New York Jets at Cincinnati Bengals 2019-12-01-1259.mpg)
2019/12/01 18:15:41 [DVR] Commercial detection failed with exit status 1

It could fail for a number of reasons. The one I've had happen most often is if there was an error in the stream (source file) that comskip had issues with reading/recovering from, and just gave up trying to scan the file. Another possibility is that something happened on your NAS and the process was killed for some reason.

The exit code of 1 just means the process had an error, nothing more specific than that. (A successful program run returns a code of 0.) You can always re-run commercial detection to see if it's a problem with the NAS just killing the process, or if it fails to run again, perhaps the problem is the recording, and there's nothing you can do about it in that case.

Open http://x.x.x.x:8089/dvr/files/1269/comskip.log to see where comskip failed

Here’s the end of that file. Looks like it completed successfully.. maybe it throws a 1 if it just wasn’t able to detect any breaks?

    Caption sums
---------------------------
Pop on captions:    45400: 9.52 - 0:25:14.84
Roll up captions:  339007:71.10 - 3:08:31.53
Paint on captions:   1378: 0.29 - 0:00:45.97
No captions:        78950:16.56 - 0:43:54.29
The ROLLUP type of closed captions were determined to be the most common.
Start -      1	End - 476801	CCF -  0	CCL - 265	Type - COMMERCIAL

Fuzzy scoring of the blocks
---------------------------
Block 0 has twice excess length.
Block 0 score:	Before - 1.00	After - 0.00
CC's commercial type - Block 0 score:	Before - 0.00	After - 0.00
Dictionary not processed successfully
Threshold used - 1.0500	After rounding - 1.0500


	---------------------
	Initial Commercial List
	---------------------
No change

Logo fraction:              0.0000      Logo disabled
Maximum volume found:         6180
Average volume:                503
Sound threshold:               500
Silence threshold:             100
Minimum volume found:            0
Average frames with silence:    42
Black threshold:                19
Minimum brightness found:       18
Minimum bright pixels found:   112
Minimum dim level found:      2072
Average brightness:            615
Uniformity level:             1700
Average non uniformity:        326
Maximum gap between logo's:     -1
Suggested logo_threshold:   0.7750
Suggested shrink_logo:	    0.00
Max commercial size found:      -1
Dominant aspect ratio:      1.7800
Score threshold:            1.0500
Framerate:                  29.970
Average framerate:          29.970
Total commercial length:    0:00:00.00
Cut codes:
  F: scene	 c: change
  A: aspect	 t: cutscene
  E: exceeds	 l: logo
  L: logo	 v: volume
  B: bright	 s: scene_change
  C: combined	 a: aspect_ratio
  N: nonstrict	 u: uniform_frame
  S: strict	 b: black_frame
  		 r: resolution
----------------------------------------------------
Block list after weighing
----------------------------------------------------
  #     sbf  bs  be     fs     fe        ts        te       len     sc   scr cmb   ar                   cut    bri logo   vol sil   corr stdev   cc
  0:+     0   0   0      1 476801     0.00s 15909.19s 15909.19s   0.00  0.07   0 1.78  7      {  E         br  6150 0.00  5030 420  0.000    61 COMMERCIAL

476801 Frames Processed
################################################################
Time at end of run:
Sun Dec  1 18:15:41 2019
################################################################