USB Camera High CPU Usage


I see NCS use between 20% and 30% CPU usage when the USB webcam has been enabled. The resolution of the webcam stream is 1080p at 30 fps and hardware acceleration has been enabled in NCS (decoding set to use Direct3D and encoding set to Intel). There is absolutely no way the hardware acceleration is being utilised (high bitrate 4K HEVC uses a third of this amount of CPU usage on the same machine) and I can’t find any other setting to control this.

When using the Windows 11 camera app to view the Webcam stream (same resolution of 1080p 30fps), CPU usage is at 2%.

Any ideas why NCS is not utilising hardware acceleration?

Thanks in advance.

For HW acceleration the camera must stream in h264/265(HEVC). That’s what the GPU is handling.
For a usb cam streaming mjpeg in 1280x960 at 30 FPS I have a cpu load of about 1% with an i5-8350U

Thanks for the quick reply. I am using a 12th gen Intel CPU which is more than capable of hardware acceleration of the most common CODECs. I’m pretty sure the camera is using H264 streaming but I’ll check using DirectShow.

IP cameras streaming in rtsp works very well.
Intel 12th generation GPU handle AV1, h264 and h265.
Which usb camera is it?

I don’t even know which USB cam it is as it was bought from a Chinese website. I found out that the CPU usage was not caused by the decoding of the video. It’s the NCS Server displaying the video stream. I noticed in Windows Task Manager, that GPU was being utilised so I closed NCS Server and ran it as a service - CPU usage was much better (around 1% like you mentioned).

So, the high CPU usage is more than likely to be NCS Server displaying the image but why it is using at least 20% CPU usage, I’m not sure. I’m not too concerned about that anyway because I have always ran NCS as a service. The camera is new so I only noticed the 20% CPU usage while setting it up and never noticed this in the past.

Another thing I am having issues with when using webcam is that in the web based client, the “streaming mode” changes from jpeg to motion. This causes problems on othe clients (such as Home Assistant and even the NCS Android app). After setting up the webcam, the streaming mode is on jpeg (or maybe mjpeg) and I can view it in web client, Home Assistant and NCS Android client app. After a while, the Web Client, Home Assistant and Android NCS app can NOT view the stream. However, in the web client, I can change the Streaming Mode to Motion and am able to view it again in the web client, but Android app and Home Assistant does not have this option. What has caused the streaming mode to change to “motion”?

Never heard of this before. Maybe the configuration for the camera View is set to show motion istead of Live view.

It is very similar to The media could not be loaded with LIVE type on Mobile

After a reset of the service, everything is fine but after a while (don’t know the exact time) I lose the ability to view from clients except web client set to “motion”. I don’t see a setting to show the camera view as motion.

Anyway, I think I know what the issue is. It may be upon motion detection, the recording cannot be saved, because the service is running as a user that does not have permission to write to the drive. I will verify this over the weekend.

Seems to be working fine when I changed the NCS service to run under a different user account that has access to a specific storage device!

When using a storage device “outside” the computer like a NAS, Netcam Studio service must be logged into a user account with admin rights. This is a demand in Windows for security.