Request: Make comskip cpu cores a selectable option

If possible to make it so that the number of cores used by comskip can be modified; if not user selectable in the DVR settings, at least via a command line configuration option. I realize that it is now set to 1 due to issues that some devices had with high temps and other items when more than one core was used. This would be for those devices with CPUs that can handle it (like a 2014 mac mini with 2 cores / Intel® Core™ i7-4578U CPU @ 3.00GHz) for even faster comskip (especially when there are 2-4 items queued up for commercial detection.

This is already configurable, as you can put a comskip.ini file in the data directory and Channels will use it.
For example, here is mine:

djcastaldo@synology:/volume1/@appstore/ChannelsDVR/channels-dvr/data$ cat comskip.ini
use_existing_logo_file=0
verbose=10
logo_fraction=0.39
delete_logo_file=1
output_vdr=1
output_edl=1
output_ffmeta=1
output_ffsplit=1
thread_count=2
lowres=10

Only the last two lines are changed from defaults. Note that this is used on a processor with 4 cores (using 2 of 4 for comskip) and tuned for fastest performance with mpeg2 streams.

It would be good if this can be manageable from the Web GUI.

2 Likes

It should be noted that going from 1 to 2 cores does not have a noticable speed benefit for mpeg2 streams. The much bigger benefit is the lowres=10 option, which reduces the frame size that comskip needs to look at in order to figure out the marker positions. But comskip will load a file with these parameters if you put it in the data directory. Try it. Just copy my ini file. It works perfectly for me. If it causes a problem with your commercial detection, you can delete it.

Has this been improved in more recent builds? Can you configure comskip in an interface to take advantage of the cores more efficiently! I was planning to use my 2012 Mac mini quad core i7 with 16GB of RAM and external drives. Commercial Skip

No. Still have to use a modified override comskip.ini file to do it.
At least we have that option for now.
Don't think it's high on the priority list to put it in the web admin gui.

Thank you, and just to confirm the attributes I should edit:

thread_count=2 — adjust this to no greater than the number of cores your processor has, so a quad-core should be 4?

lowres=10 — what is this setting for, and what is optimal?

See this thred

1 Like

This has been added in v2021.02.09.0017

5 Likes

Do I need to delete the custom comskip file I have in the data directory to see the new option for Thread Count?

Yes.

This new option is amazing! I have a Synology 918+ (4 cores), and went from 10 minutes per hour of commercial detection down to about 4-5 using 3 threads. This is probably a loaded question, but is 3 threads too taxing on the system? Would I be better off switching to 2?

It’s worth it. I use 7 cores so 30 min takes 40 sec, 1hr takes less than 2 minutes. Soooo worth it.

1 Like

Unfortunately I don't have that many cores!!!

1 Like

I really do no see a big benefit to this I have 8 cores on my I7 and I just use 1 core ... As Comskip in Channels DVR does not run more than one and only when recording is finished.

1 Core a little over 4 minutes 1 hour.
Commercial detection for The Blacklist S08E07 Chemical Mary 2021-02-19-1959.mpg finished with 14 markers in 4m42.5318777s

Well, that also depends on what processor you have. My Synology has a Celeron J3455, which is not as beefy as the I7. One core core for you completes commercial detection more than twice as fast as one core for me! So using multiple threads is beneficial in my scenario.

Good point. Sometimes us techies get tunnel vison.