Option to control automatic commercial skip proximity to marker

What would you think about an option to control the proximity of the automatic commercial skip to the ending marker for detected commercials? We all know comskip accuracy varies quite a bit from channel to channel and even show to show. As a result, I find myself often leaving automatic commercial skip on, but not really trusting it. Because it seems to skip the detected commercial segment completely, you're dropped back into the show but you don't really know if the commercials actually just ended or not. I've seen it overshoot several seconds or even minutes sometimes. I tend to often skip back once after an auto-skip just to make sure the commercials really just ended because often times you just can't tell. I was thinking it'd be nice if it skipped to the end of the commercial segment with maybe a second or two visible before the show started back. At least then you'd know the commercials just ended.

I realize some people might not like the jarring commercial flash, so hence my question for an option to control how much of the end of the commercial segment you see. Or perhaps simply an option to control auto skip to jump either to the end of the commercial segment, or the beginning of the next show segment.

Just a thought-

Keep up the great work-

There already is a setting for this in comskip.ini

padding=0 (0-MAXINT)
;Amount of seconds each commercial will be reduced both as start and end.

Ah I didn't realize that - I will check it out! Thank you!!

I think you can set that using the comskip API. Or your own ini.

Have you tried using the padding setting for this purpose in Channels? Everything I read says it should work exactly like you describe, but after I set it via the API, the only difference I see is that the first commercial in each commercial block was changed from gray to green in the editor (so as not to be skipped). It obviously still knows it's a commercial because that first commercial is separate from the show block, but it's like it thinks the entirety of that ad is green and therefore shouldn't be skipped.

I've tried settings of 1, 2, 4, 6, etc. being set via the API like:
curl -XPUT http://{ip}:{port}/comskip/ini/padding/2
All of which simply respond with "true".

After I change the setting, I then use the web interface to trigger Options - Redetect commercials on the desired show. Once it's finished, I use the Edit commercials option (and also viewing via the app) to review the changes. Maybe it's just the shows I've been testing with or something, but it's just not making much sense at the moment. I was just curious if you'd had luck using that setting for this purpose in Channels?

Thanks,

I just did a test run on a 30 minute recording using padding=10 and it shortened the beginning and end of each commercial block by 10 seconds. The first block of 5.05 seconds was removed.

Easiest to verify by viewing the video.vdr file comskip generates.

padding=0          padding=10
0:00:00.00 start   
0:00:05.05 end     
0:08:54.17 start   0:09:04.17 start
0:10:24.20 end     0:10:14.20 end
0:15:09.17 start   0:15:19.17 start
0:17:08.21 end     0:16:58.21 end
0:20:48.07 start   0:20:58.06 start
0:23:28.20 end     0:23:18.19 end
0:28:34.04 start   0:28:44.03 start
0:29:57.24 end     0:29:47.25 end
1 Like

If you're using the comskip.ini API, you can view the settings you made at http://x.x.x.x:8089/settings

1 Like

Thanks for the info! I was wondering earlier if there was a way to view all the settings. That's good to know. I'll play around with the padding setting some more tomorrow and report back. The fam has Channels pretty tied up at the moment so I'm leery of screwing around with things right now - lol.

After reviewing the /DVR/Logs/comskip/xxx/video.vdr file, everything looks to be functioning as expected.

This is from The Tonight Show's 9/30 episode:

padding=0 padding=10
0:10:37.21 start
0:14:23.18 end
0:24:00.20 start
0:28:16.13 end
0:35:16.19 start
0:40:22.29 end
0:46:02.12 start
0:51:18.01 end
0:54:57.11 start
0:57:48.07 end
0:10:47.21 start
0:14:13.18 end
0:24:10.20 start
0:28:06.13 end
0:35:26.18 start
0:40:12.29 end
0:46:12.11 start
0:51:08.00 end
0:55:07.11 start
0:57:38.07 end

Everything appears to have changed exactly as expected. But the issue is that when I go to play the video via the Channels app, it doesn't actually play according to the adjusted markers. I was expecting to see, for example at the end of the first show block, after adding padding=10, I would have seen the show block end and the commercial block begin and play for 10 seconds. Auto-skip would then kick in and forward to 10 seconds prior to the end of the last commercial - meaning you'd see 10 seconds of the last commercial and then the show would resume.

Unfortunately what I'm seeing is the first show block ends and I see the entirety of the first commercial block (30 seconds). As soon as the first commercial block ends, autoskip kicks in and forwards to the beginning of the next show block (not 10 seconds before the end of the last commercial block).

Is it possible I need to do something else to refresh/clear some kind of cache/etc. to fully update the markers? I'm just Redetecting commercials and then watching the video (starting from beginning) via the app. All of my testing thus far has been with a couple of previously recorded shows. I'm going to leave it set to a padding of 10 and see if any new recordings behave differently.

Thanks again-

The devs will have to answer that.
What does the recorded file json look like?
Should be the same as video.vdr, but in seconds.
http://x.x.x.x:8089/dvr/files/file#

  "Commercials": [
    0,
    16.98,
    655.95,
    871.15,
    1434.15,
    1674.39,
    1933.49,
    2128.87,
    2645.01,
    2827.19,
    3092.87,
    3317.46
  ],

Those seconds should be exactly what displays as commercial blocks when you Edit Commercials for the recording.

The json file does seem to match Edit Commercials (padding=10):

"Commercials": [
    669.1,
    864.36,
    1502,
    1697.19,
    2178.7400000000002,
    2418.38,
    2793.4900000000002,
    3078.77,
    3312.84,
    3462.92
  ],

But as you can see, these don't seem to line up with the video.vdr file. I would have expected the first item in the Commercials array to have been approx 648s, putting it 10 seconds into the Geiko commercial. Instead 669 puts it at the start of the 2nd commercial.

For reference, when I switch back to padding=0 and rerun everything, the only real difference is that now we're back to the first Commercials element being the start of the first ad.

"Commercials": [
    638.47,
    864.36,
    1441.44,
    1697.19,
    2117.38,
    2423.7200000000003,
    2763.16,
    3078.77,
    3298.12,
    3468.9900000000002
  ],

So I guess to summarize, even though the video.vdr times do seem to be taking the padding into account, I don't think the Commercials array (or Edit Commercials) truly is. It's almost like the padding is forcing Channels to treat the entire block that the padding runs into as a show.

Does that make any sense to you?

Thank you!

Only the devs would know.
I don't use the built in Edit Commercials or use a Channels client to autoskip ads.
For programs I want to keep I edit them with VideoRedo TVSuite and save them elsewhere.
Comskip will generate a project file for that video editor which includes cut and scene markers.
So I just double click the project file and the recording opens for editing.
This allows me to adjust the cuts to frame accurate and save in a different format if I want.