I have a setup with 15 cams generating a CPU load of 95 to 100%. The computer is an HP server with a Xeon cpu, 4 cores running at 3,1 GHz. OS is windows server 2012 R2. Using the latest NCS 1.3.6.8 and enabling background encoding my assumption was that the CPU load would decrease so I maybe could add another camera or exchange and old camera for a new in HD. Settings in NCS are the default ones. Here are some results and a discussion. First I would like to stress that this is what happened in my system.
1A. 15 cams in motion detection. Background encoding is off.
CPU load of 95 to 100%. Video is directly encoded and saved in mp4. This resulted in a little jumping in videos and a Library delay of zero. Library delay, see 1B.
1B. 15 cams in motion detection. Background encoding is on.
CPU load is maybe a little bit lower, but still up to 95 to 100% very often. Videos are saved in AVI and afterwards encoded to mp4 one by one when there is time. This resulted in a little jumping in videos. A library delay is now 10 minutes. When I go to Library on top is the thumbnail of the last cam that triggered the motion detection. When I click on that to see the video clip it is not possible since the video is still in avi-format. I have to scroll down in the Library for about 10 minutes to be able the view the clip in the web browser when it is in mp4. The clip is then encoded from avi to mp4.
In this case I should say that the NCS server load is lower than in case 1, but the load for the ffmpeg encoder (avi to mp4) is increased so the sum of the processes are “the same” which results in the CPU load of the computer.
2A. 7 cams in motion detection. Background encoding is off.
CPU load is now about 75 to 80%. The videos are directly saved in mp4. Library delay is zero. Still some jumps in videos.
2B. 7 cams in motion detection. Background encoding is on.
CPU load in now back to 95 to 100%. The videos are first saved in avi. The ffmpeg encoder starts to work and use about 20 to 25% CPU load. The Library delay is now only 4 minutes until the video is encoded to mp4.
Discussion
This was not the result I expected or hoped for, but quite logical. When there are fewer cams there are more cpu power available for the ffmpeg encoder that works faster and shorten the Library delay. However, the total CPU load is still on max. An interesting question is of cause then the number of cams that I can use to have a Library delay of zero? In my case that is a hypothetical question since I see no use for the background encoding. The NCS system is so well optimized from the other parameter settings that the background encoding has no effect of interest here. Again my system with default settings. If there are different settings results may change. As usual there are no shortcuts ;). More cams need better hardware.
-Henrik