Hardware encode and Hardware acceleration

marklyn

Pulling my weight
Jun 13, 2015
469
107
Can someone explain what the differences are for the Hardware encode (under camera options/video) and the Hardware acceleration (under camera options/record/encoder options)?
I have kept my video compression set to direct-to-disk but was wondering now that I'm using a dedicated NVIDIA card for hardware encode, could I use the re-encoding feature or is there just no real benefit?
I have an intel i7-4790 chip and 16gb RAM on this computer. My CPU normally stays around 25%-35% busy on average except when it's windy out.
I wasn't able to find enough clarification in the online manual for my understand; hoping someone can elaborate.
 

Attachments

  • BI HW decode.JPG
    BI HW decode.JPG
    72.7 KB · Views: 26
  • BI Encoder options.JPG
    BI Encoder options.JPG
    140.4 KB · Views: 28
  • Like
Reactions: mat200
Direct-to-Disc is the most efficient method and changing it may result in perceived drop in CPU, but it will ramp up the moment you try to play a file.

Hardware acceleration isn't as critical now with the substreams option and has made even 4th gen machines more capable.

I member here is running 50 cameras on the same 4th gen as you at 30% CPU.

Have you done EVERY optimization in the wiki? Substreams and direct-to-disc are a must.

 
  • Like
Reactions: mat200 and marklyn
Direct-to-Disc is the most efficient method and changing it may result in perceived drop in CPU, but it will ramp up the moment you try to play a file.

Hardware acceleration isn't as critical now with the substreams option and has made even 4th gen machines more capable.

I member here is running 50 cameras on the same 4th gen as you at 30% CPU.

Have you done EVERY optimization in the wiki? Substreams and direct-to-disc are a must.

I haven't done the sub-streams from the wiki, but pretty much everything else and I kept a copy of that for reference.
I need to read about the sub-streams more and how/when to use them. I think I was misunderstanding why to use them and didn't pay as much attention to their use.
Is the summation of it to use the sub-streams with lower resolution for console viewing but using the main stream for trigger recordings, or is that wrong?
I'll re-read that part again. and see if I can make sense of it now :)
 
Yes, substream is used for console viewing of more than one camera. But it brings down CPU usage by using the substream for motion triggering. Nobody here has reported a degradation of motion detection capabilities with the use of the substreams. Further, this allows you to record 24/7 at a much reduced storage capacity - it will record the substream until triggered then switches to mainstream.

From the wiki:

Sub streams typically reduce CPU usage by 5x to 20x and make a struggling system run great. The full quality main stream is still recorded and available when you need it.
When you configure a camera in Blue Iris to use a sub stream, Blue Iris will pull video from both the "main" and "sub" streams. Each stream is used for different purposes.
The main stream is used for:
  • direct-to-disc recording
  • single-camera live viewing and recording playback
  • audio

The sub stream is used for everything else:
  • multiple-camera viewing
  • motion detection
  • alert snapshots
  • etc.
 
  • Like
Reactions: mat200 and marklyn
Thanks wittaj! I am re-reading that section again and apparantly with fresh eyes, or at least it's clicking now.
I'm going to do a test of this on 3 of my cameras now and see what happens.
One last question based on my original post. If I use direct-to-disk recording (which I do for all my cameras) then are any of the encoder options used under the record tab?
I think, like a fool, I was still going into that tab and thinking I was making 'tweaks' but probably no changes mattered since I have the direct-to-disk option ticked... correct?
 
Can’t recommend enough to go to sub streams! Saves resources and I have not noticed any drawbacks. I use ONVIF triggers from each cameras AI so it further reduced the load on my BI machine. It only has to process motion for 3-4 cameras.


Sent from my iPhone using Tapatalk
 
  • Like
Reactions: marklyn
Just select direct to disc and let the remaining settings remain the same.

Can't wait to here the amount your CPU % drops!

You will have to go in to the motion settings and redraw the zones if you use them.
 
  • Like
Reactions: marklyn
Thanks, I'm futzing with it now and will report back in a day or so. Last question. I'm setting up my two dahua cameras with substream on, etc., but how can I actually tell in BI that it's using substream for viewing and mainstream for recording? Is there a clear way to tell?
 
Done half of my cameras and now CPU typically is staying around 18-23%. Occasionally though it bounces up to 49% for no apparant reason but does come back down. I checked the status window/log and don't see anything obvious happening at the time, but will look at that more later if it continues.
Question: I've changed all of my cameras HW Decode to NVidia but occasionally most of them change back on their own. Again, log doesn't show an obvious reason so unless someone has some ideas, I'll monitor that as well.
Will put up my final CPU numbers once I'm done with all of my cameras that allow substream.
 
With the substreams option, HW decode isn't as critical as it used to be.

In fact, for some people, with recent versions of Blue Iris that added DeepStack (AI), hardware acceleration has become unstable. I suspect that is happening to yours and it is kicking out the NVIDIA acceleration.

Because of this, many now do not use HA for their cameras, and instead use the NVIDIA card to run DeepStack with.
 
So, I've configured all of my cameras for substream enabled and added the correct substream string in BI for all 14 cameras. I do see the mainstream and sub stream numbers for each cam now.
Phew!
Now, my task manager CPU usage hovers around 7-9% but my CPU usage showing in BI @ bottom is typically 13-16% (always showing a few points higher than task manager does).
Task manager GPU (GeForce GT1030) consistently shows around 11% usage.
So far it looks really good and I'm glad I popped on today and had the right smart people on :) Thanks!
I'll continue to monitor this. I do realize I need to go back in and re-setup my trigger masks, or so it seems.
If the HW Decode switches back to off by itself, however that happened, would you then suggest just leave it off to see if it increases my CPU usage now that I'm using sub streams?
 
  • Like
Reactions: sebastiantombs
I guess I should also mention that my total bitrate dropped from an average of 547mb/s to now around 120mb/s
That seems pretty substantial bandwidth savings and I'm guessing that also means my LAN traffic will benefit from this drop.
 
  • Like
Reactions: sebastiantombs
Awesome - yes there really isn't a downside to using the substreams. Your 4th gen is now working a lot less, which saves power and extends life.

Yeah if HW decode switches, then just leave it off on the problem camera. It may only be one or a few or maybe all of them, but with the substreams, HW decode saves maybe 2% CPU.
 
  • Like
Reactions: marklyn