Minimize PC CPU usage

General discussion about Blue Iris
User avatar
Pogo
Posts: 454
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Minimize PC CPU usage

Post by Pogo »

It's done in the camera's software and correspondingly in its Blue Iris video settings.

Which Tapos do you have?
kirk39
Posts: 14
Joined: Sat Apr 06, 2024 8:32 pm

Re: Minimize PC CPU usage

Post by kirk39 »

Tapo C110 and C120
User avatar
Pogo
Posts: 454
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Minimize PC CPU usage

Post by Pogo »

Neither have their own web UI for any advanced configuration stuff, but both are ONVIF compliant with a certain level of customization accessible from third party VMS platforms.

In your particular case, the current objective is to ultimately activate the sub streams in the Blue Iris configurations for each camera and ensure that QuickSync is actually enabled and functioning as the default HA mode for the cameras.

First and foremost is establishing the correct ONVIF service port which is a rather odd 2020 for the Tapos. And since we're only talking about three cameras, maybe starting from scratch would be the best course anyway.

So pick one and open its Blue Iris configuration. We want it to look like this when finished -- with your information, of course:

TapoCfg.jpg
TapoCfg.jpg (109.48 KiB) Viewed 951 times

If it doesn't, start over by entering the IP address and login credentials you established in the Tapo app. Use RTSP port 554 and use port 2020 for the Discovery/ONVIF port.

Hit 'Find/Inspect' which should populate the stream options and the ONVIF source boxes.

/Stream1 will populate. /Stream2 will likely require being selected from the 'Minor stream' drop down box to the left of the stream entry area. This is where the magic is supposed to happen. Click OK to save the configuration.

If you haven't actually established the default HA mode as being 'Intel' in the Cameras tab of the main Blue Iris Settings window, this needs to be established to take advantage of the QuickSync GPU -- which is presumably active and visible in Windows Task Manager. If not, it needs to be enabled in Windows.

Once Intel has been established as the default CPU/GPU processor, it needs to also be established in each camera configuration. This should happen by default with a new camera config. Otherwise an existing camera will require a restart to recognize the change in the main Blue Iris Settings for 'Cameras'.

When this is all sorted out, make double sure you have Direct-to-Disk enabled and Blue Iris DVR/BVR file format selected in the Video File Format and Compression settings under the 'Record' tab.

This should straighten out most of what has been suggested so far by everyone.

One other little video nugget with these Tapos is that they can actually do 2304x1296 for pretty damned nice 2K performance. You can set this in the 'Video Quality' setting of the Tapo App camera menu.

Give it all a whirl and see how it goes as a basic camera configuration for starters.

The UI3 tweaks may take a bit more work, but should be easier with sub-streams already in place.

I'm also going out on a limb and will predict your CPU load will decrease significantly after all of the above is correctly established.
Last edited by Pogo on Wed May 01, 2024 12:27 pm, edited 1 time in total.
kirk39
Posts: 14
Joined: Sat Apr 06, 2024 8:32 pm

Re: Minimize PC CPU usage

Post by kirk39 »

Pogo, you nailed it. Thank you, thank you, thank you.

I had been messing around with those encoding settings so much that I took your advise and deleted all the cameras, re-adding them with your exact recommendations. With constant recording on (3) 2k cameras, motion zones active on all cameras, the CPU/GPU is now typically between 0.1% and 1%. This is a MASSIVE savings in CPU usage - I was around 40% at a minimum with re-encoding, and 50% CPU when reviewing via UI3.

The one thing that isn't working correctly - one of the C110's that I have rotated to 270 degrees (it's kind of mounted sideways). Everything looks fine on the server, when viewing all cameras or double-clicking to maximize any camera (including the rotated cam). When I view all three cams on UI3 everything looks fine until I select the C110 that's rotated 270 degrees - for some reason that maximized image is stretched vertically in UI3 and I don't know why.

One other thing that I will mention about the Tapo cameras for anyone setting them up for the first time, you must set a username and password in the Tapo app on the cam's "Advanced Settings > Camera Account." If anything is wrong with that account user/pass and its link to the camera, a quick way to know is that it won't find the ONVIF capability when scanning for it (Find/Inspect in "video > configure" for that camera) on port 2020. One of my C110's somehow lost that account link and I ended up having to re-enter the account info and reboot the camera.

What exactly do the substreams save CPU on in basic unattended daily operation? Does it reduce the quality of object detection as a result?
User avatar
Pogo
Posts: 454
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Minimize PC CPU usage

Post by Pogo »

Happy to help and glad to see the progress.

And yes, the account credentials established in the app are the required credentials for the Blue Iris (or any)VMS configuration) for successful interaction to be possible. Now that there is ONVIF communication you can try some BI triggering via the Tapo settings and see how that flies.

One caveat I neglected to mention is the 2 simultaneous streams limitation for these rascals -- one for Mom and one for Dad as Tapo puts it. Drove me crazy until I stumbled across it in a sales feature list somewhere for its 'Baby Cam" application. I believe I've actually had three going at the same time, but they spec a limit of two.

Is the 270 degree cam just physically situated in that orientation or does there happen to also be a 90 degree or 180 flip/rotate added via the firmware? I can see that throwing a wrench into the gears for UI3 trying to maintain what it thinks should be the correct rendering according to how the frame is perceived to be presented otherwise. Just guessing at something like that possibly occurring as I'm not that familiar with UI3.
User avatar
Pogo
Posts: 454
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Minimize PC CPU usage

Post by Pogo »

kirk39 wrote: Sun Apr 21, 2024 9:10 pm What exactly do the substreams save CPU on in basic unattended daily operation? Does it reduce the quality of object detection as a result?
Missed this.

The sub streams are the general stream being processed when activated even though the main stream is always the stream being recorded and/or viewed when the camera is selected in 'solo' mode or triggered. Otherwise, the main stream is not being continually processed since there is no requirement for it. There's where the CPU/GPU savings occur.

The other aspect of sub streams that many don't understand is they provide the trigger source for any related functions (unless the main stream is otherwise designated). This is a whole other subject, but suffice to say, it's important to understand the impact wonky sub stream settings can have on any of the basic activity detection functions -- particularly those requiring fast response times and detailed images.
Last edited by Pogo on Wed May 01, 2024 12:31 pm, edited 1 time in total.
kirk39
Posts: 14
Joined: Sat Apr 06, 2024 8:32 pm

Re: Minimize PC CPU usage

Post by kirk39 »

Pogo wrote: Sun Apr 21, 2024 9:45 pm Is the 270 degree cam just physically situated in that orientation or does there happen to also be a 90 degree or 180 flip/rotate added via the firmware?
I'm not having the camera do anything to the image, all the rotation occurs in Blue Iris. The camera is mounted to look out a window that is more vertical than horizontal, so it works well this way ... and having 2 cams in landscape in 1 in portrait works well for the multi-camera screen to get things to fill a 16:9 screen better.

When I was re-encoding to h.264 I was using the same settings and it was not a problem.

EDIT: I just realized that the stretching only occurs in the "Live View" not when reviewing prerecorded clips.
Last edited by kirk39 on Sun Apr 21, 2024 11:07 pm, edited 1 time in total.
kirk39
Posts: 14
Joined: Sat Apr 06, 2024 8:32 pm

Re: Minimize PC CPU usage

Post by kirk39 »

The reason I asked about the sub-stream being used for motion detection is because I have the object size set very small so the camera can pickup on things like birds and groundhogs in the yard. Groundhogs annoy me, and I like to see where they're at and then set them up for an interesting day with my little dog.

I lead a small life.
User avatar
Pogo
Posts: 454
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Minimize PC CPU usage

Post by Pogo »

I'm a possum kinda guy myself. LOL

You may find your motion sensitivity a bit different with the sub streams simply due to the difference in pixel size compared to a 3MP image which is obviously comprised of much smaller and many more pixels than the 640x360 sub stream. There will be much less adjustment sensitivity with the larger pixels. Much finer trigger tuning can be achieved with the main stream.

Depending on the actual cause of your previously high CPU number, you may want to see how things behave now without the sub streams. It may have been a case of the Intel default not doing what it's supposed to do vs. the sub streams not being active. This would essentially retain your existing triggers if they were working as desired. This would also affect what you may be trying to achieve with UI3 as well and would need to be factored into whatever may be acceptable results of either or both situations.
User avatar
Pogo
Posts: 454
Joined: Tue Jul 18, 2023 7:21 pm
Location: Reportedly in the Area

Re: Minimize PC CPU usage

Post by Pogo »

kirk39 wrote: Sun Apr 21, 2024 10:56 pm EDIT: I just realized that the stretching only occurs in the "Live View" not when reviewing prerecorded clips.
Check for any setting in UI3 that may allow some control over the original aspect ratio. Again, my familiarity is limited.
Post Reply