How many cores for ComSkip with 4 available?

With a 4 core/4 thread CPU is it wiser to select 2 cores or 3 for ComSkip if recording of two or three channels is expected at the same time, i.e. how much CPU attention does basic mutichannel recording require or want?

The actual recording process has very little demand on the CPU.

1 Like

It takes me less than 5 minutes to process 1 hour of an OTA recording in Comskip with Comskip running on low priority. Using default Comskip settings. Intel i7 Cpu.

Commercial detection for Clarice S01E01 The Silence Is Over 2021-02-11-2159.mpg finished with 10 markers in 3m45.7338481s.

Best answer I came up with is try with 1, then 2, then 3, then 4.

Set Channels DVR to use 1 thread for comskip.
Record a 30 minute (H.264 if you can) show.
Time the comskip run (you can view run time in the DVR log) and observe your CPU usage.

Set Channels DVR to use 2 threads for comskip.
Re-Comskip the same recording.
Time the comskip run and observe your CPU usage.

repeat using 3 threads

I found on my Synology quad-core NAS's that 2 was the best setting. If I also had a transcode going and guide update going while comskip runs my CPU went over 100%. A setting of 3 didn't run much faster than 2 for me, it just resulted in higher CPU usage. YMMV.

I had a similar experience. 2 seems like the sweet spot for my Synology DS718+.

I think the real value in this question is if you are using a low power device such as the Pi 4B, Nvidia Shield or a NAS with a weaker Celeron or Pentium processor that just barely cuts the mustard by having Intel Quick Sync.

I have for years run Channels on my Nvidia Shield Pro with the internal 500 GB HDD. The mature software for the shield has been very stable and comskip times, while not blazingly fast by any stretch of the imagination, had been adequately fast with just 1 core selected. 2 cores on the shield was a bit quicker but it did, for me, quite substantially impact the CPU load.

I have just this week switched over to the Raspberry Pi 4B solution. I'm using the 4GB model since it was immediately available but as well documented the 2GB model is more than sufficient. Comskip on the Pi thus far has been far more variable. For example, an H.264 recording 1-hour long from the HDHR Prime took 65 minutes to place its markers. A 30-minute MPEG-2 OTA recording from the HDHR Connect took 6 minutes. On average the H.264 files from the Prime are taking ~38 minutes per hour to run on 1 core. The MPEG-2 files from the Connect are taking ~13 minutes per hour of video also on 1 core.

I had been running the Pi 4B open as I was waiting for my Flirc case to arrive so will try 2 cores today. The non-case temps would get up to about 70 deg C at load, so below the throttling temp, but close.

For reference, I just have a simple WD MyPassport 1TB HDD attached USB 3.0 for now and it's powered solely with a Canakit 3.5a 5v PSU. I do have a couple of smaller SSD's spare so might try one of those connected at some point to see if there is any improvement from increased I/O capability.

PS. there's not too many guide notes about switching from the Shield to the Pi 4B. I recorded everything internal on the Shield and found the easiest way to switch to the Pi was to:

  1. setup the Pi with a clean install following the Channels walk through.
  2. enable network transfer on the shield under its storage settings.
  3. shutdown the Pi, disconnect the WD HDD and connect it to my laptop.
  4. navigate with windows explorer to the Shield's network transfer (you have to login with credentials that the Shield provides when you turn network transfer on)
  5. navigate to the Channels install folder on the Shield and then copy those folders to the WD HDD (this wasn't too bad for me because I had pruned a lot of recordings I didn't want anymore in advance but can be very slow for those with a loaded DB)
  6. plug the WD HDD back into the Pi, start it up.
  7. restore the DVR database from the most recent save copied over from the Shield.

This is not exactly per the guides noted by Channels staff and users but worked just fine in my case. If you have a shield and already use external storage then it's a lot faster and less steps involved.

A quick post to update the Pi 4B results using 2 cores for the same file processed for each video standard:

MPEG-2 1 hour recording improved by 129% - 11m 25s > 8m 50s
H.264 1 hour recording improved by 165% - 33m 11s > 20m 00s

A far cry from what you will get with a Core I7 or a Xeon but I can live with that since it's more inline with what I saw from the Shield plus I'm selective and don't comskip all recordings. Just movies and key shows.

Been doing some thinking, about moving to a Pi4 4B 4GB as my main Channels DVR server. Like the idea of having a dedicated on device just for Channels.

I am currently using a Intel NUC7 (i7BNH) with an i7-7567U CPU @ 3.50GHz (turbo 4ghz) 2x core, 4 thread cpu, with Linux Mint 19.3. 16GB Ram and a 10Gigabit Thunderbolt NIC.

I use the NUC for other things, like large torrents, network file storage, Emby media server, and various other tasks that require Linux os.

Obviously, there is a drastic hardware power difference between the Pi4 and this NUC pc. But I am trying to determine just how much of a "downgrade" would it be.

I assume that in home live tv and recording playback would see no performance drop.

I extremely rarely remote stream, but since I am the only user, would only be 1 stream, so that hardware power imposed limit should not be an issue.

Comskip...that is where I am going to see a big hit I surmise, reading a few of the posts in this thread.

I just checked my NUC server logs, and with 2 threads set for comskip.
1hr 4min OTA mpeg2 file - 2min 39sec
1hr 4min TVE h264 file - 5min 33 sec

(1hr hour long program with 1min before 3min after padding)

Those numbers are pretty damn good, (way faster than what @gbrnole posted using 2 cores on the pi4).
(Does Intel Quick Sync play any part in how fast this Intel NUC is?)

My questions about the Pi4 and ComSkip:

If the Pi4 has 4x cores, then would it be ok to use the 3 thread option, leaving one core open to handle other things?

I assume the process times @gbrnole posted are at the standard 1.5ghz clock speed?
So a bit of an OC would help speed things a touch up yes?
(I would be setting overclock to 2ghz(as I have set and found to be stable on my other pi4's use for other projects).

If the Pi4 cpu does max out, what happens if it also recording other things, and/or has active playback stream? would they fail or studer or become corrupt?

What about the RockPi board?
That seems to have more powerful hardware than the Pi4?
Would the Channels DVR image work on that?


Edit: I do have a Pi4 setup for my mom to use as her Channel DVR, she does not use comskip....but as a test, i enabled it and ran a test.

With Pi4 at 2ghz OC:
1hr 4min OTA mpeg2
2 threads - 7min 18sec
3 threads - 5min 39 sec.

1h 4min TVE h264
2 threads - 22min 32 sec
3 threads - 15min 33sec

1 Like

We’re getting pretty much the same results. My h.264 streams are from cable and possibly a bit more high res than the TVE streams but our MPEG2 results are essentially the same.

I’d like to have faster processing for commercials but can’t fault the simplicity and the stability of the Pi 4.

Come on, Pi 5!!! :joy: