Commercial Detection for In-Process Recordings (Catch-up to live broadcast - especially useful for live sports/events)

I noticed a couple that never comskipped also.
Hopefully it's fixed in the latest pre-release.
I'm manually running windows command scripts for each server to list those missing comskip.
Simple check for a sidecar .vprj file since I use the VideoRedo integration.

@ECHO OFF
ECHO Checking HDHR TV directory for missing vprj files and sending results to V:\Missing_HDHR_vprj.txt
ECHO Missing HDHR vprj file > "V:\Missing_HDHR_vprj.txt"
FOR /R "\\192.168.1.4\chDVRhdhr\TV" %%I IN (*.mpg) DO IF NOT EXIST "%%~dpnI.vprj" ECHO %%I >> "V:\Missing_HDHR_vprj.txt"
PAUSE
EXIT

This was a pleasant surprise. I noticed this on our Firesticks a few days ago, and it's a feature I've quietly wished for but never thought to ask about.

Fast-forwarding commercials to catch up on a show-in-progress somehow became my assigned task, so this has effectively eliminated one of my chores. :wink:

2 Likes

Yeah I have noticed that commercials are skipped early and end up still playing an ad or two at the end of the skip when I'm live. Hoping this can be fine tuned because I love the feature! Just really jarring as it is currently implemented.

In-progress scanning will always be less accurate than post-recording scans; this is a limitation of the Comskip program and not something that can be changed.

You can always manually request that Channels re-scan for commercials after the recording finishes if you like.

I've been using SageTV for 10+ years and it's always had in-process Comskip. My experience was that SageTV was much more accurate with in-process detection than the current Channels DVR implementation, but I have no idea why. Both are using Comskip.

Here's the default SageTV comskip.ini, in case it's of any use:

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			; 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
min_silence=12				; 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
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
logo_filter=0               ; set the size of the filter to apply to bad logo detection, 4 seems to be a good value.
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_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
padding=0
ms_audio_delay=5
volume_slip=40
skip_b_frames=0				; Set to 1 to force Comskip to skip frames for higher processing speed.
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		; CommercialDetector 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			; CommercialDetector 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_data=0				; create a dump of the user data channel, used for CC and XDS (such as V-Chip info). Can be use together with output_framearray to remote debug CC decoding
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_default=0			; CommercialDetector
output_edlx=0
output_vcf=0
output_bsplayer=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_avisynth=0
output_vdr=0				; set to 1 if you want XBMC to skipping commercials
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				; CommercialDetector set to 1 if you use parallelprocessing and need the output while recording
live_tv_retries=4			; change to 16 when using live_tv in BTV, used for mpeg PS and TS
dvrms_live_tv_retries=300			; only used for dvr_ms
standoff=0					; change to 8000000 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"
avisynth_options="LoadPlugin(\"MPEG2Dec3.dll\") \nMPEG2Source(\"%s\")\n"
dvrcut_options="dvrcut \"%s.dvr-ms\" \"%s_clean.dvr-ms\" "
windowtitle="Comskip - %s"

Possibly this should be done automatically by channels DVR

So you want the system to queue up already spent resources to re-do what it has already done to ~75% efficacy again at the detriment of existing—yet unwatched—recordings?

Chances are that if you are watching it while in-progress, then by the time the recording ends you are finished watching it. If you need further intervention for commercial detection, then you can manually do it.

Please don't demand developer resources to tackle the last 10% of edge cases that a bare minority of users need.

(Yes, my view is opinionated. But outside of a vocal minority, I don't feel I am misaligned.)

I guess it should be an option for those with systems that can handle it. As a developer I don't see doing both as time consuming or the effort to add the option.

I also see this as a waste of resources .. If you want to Comskip something again you already have that option. It only takes a little time.

... and this is the reason why most OSS projects have poor UI/UX and/or documentation: developers focus on the code, and neglect the users. Yes, it would be a trivial addition; however, it would be a net negative in terms of UX.

It's not if you can do something, it's if you should do something. Knowing the difference is good UX.

1 Like

So you accept pore function. I wish to see the community have a quality DVR

No, I accept that a superior user experience can (at times) necessitate fewer "options". I can see that you are of the mentality that there is no such thing as too many options or features, so I will leave you to consider which new features and options are needed for the next shipping version of Word.

(And yes, I am completely comfortable with my manual typewriter without a 1/! key ... I know perfectly well to use l for 1 and '^H. for !; and if that latter one throws you, maybe you're not quite as rounded as you think.)

Edit:

Since this is both effortless and non-time consuming, I will leave this to you: there is already the ability to monitor the DVR for both what it is recording and what it is streaming to clients; you can check that if ever those two streams are for the same program concurrently to have a command execute once the former finishes to re-detect commercials.

I can see the use case for having ComSkip re-run when the recording finishes. Maybe you started watching it behind on live, but couldn't finish and had to come back later because of any life reasons.

So let's go with the middle ground it make it another option checkbox (default off). For those who think it is a waste of resources, you don't have to do anything. For those that have a use case and don't mind the resource use, you can check it off.

1 Like

If you stop watching and come back later Comskip will still complete.

1 Like
  • The issue from above stated that when ComSkip is started live that it is off a little bit.
  • The suggestion was to just rerun ComSkip manually to fix it being off.
  • The request was for the ComSkip to rerun itself without manual intervention.
  • The counterargument was that a rerun is a waste of resources.
  • The refutation is that what is a waste of resources is up to end-user, so why not make it an option?
3 Likes

Can we re-run Comskip from the Channels clients directly? Or do we need to use another device to handle it via the webUI?

1 Like

No.

3 Likes

At the very least then, I’d say that capability should be available, especially if users aren’t granted the option to automate the second Comskip via the server.

1 Like

I think that the point you are missing is that you don't know you need to re-scan for commercials until you start to watch a recording and find out the commercial skips are missing.

As far as I can tell, there is no option available in the Android App to have it re-scan a program for commercials, so additional work is involved in getting to the server, starting the process, and waiting for results. Much more complicated if you are away from home.

I would be willing to use the resources to have a final scan that improves upon the live scans previously done.

4 Likes

I usually watch and delete ... so maybe those that watch and keep might like that option.

1 Like