Bridged Adapter on Blue Iris host (shared with VirtualBox VM)

toreupfeet

n3wb
Joined
Apr 19, 2021
Messages
19
Reaction score
1
I'm setting up Blue Iris on a new 11th gen i7. I'm using the same PC to host a VirtualBox VM of Home Assistant with Bridged Adapter network settings (sharing the ethernet adapter on the PC).

I intend to stream some camera feeds to Home Assistant dashboards (currently using RTSP urls for this), which I presume means each camera stream would then be coming through the PC's ethernet port twice, would it not? Is there a way (and a need) to optimize? ...perhaps, in Home Assistant, use the Blue Iris integration video feeds instead of sourcing the streams via RTSP? Or should I purchase and use a USB ethernet adapter for the HA VM?
 

The Automation Guy

Known around here
Joined
Feb 7, 2019
Messages
1,413
Reaction score
2,813
Location
USA
The bridged network connection will have it's own MAC address (it's prefilled but changable in the Network Settings of the VirtualBox machine) and it's own IP address as well. While I'm not a network expert, I don't think the streams are coming through the network port twice. It's just that the data flow from the virtual machine has it's own (virtual) IP Address. The network load it no more or less than if you ran the virtual machine's software on the host computer itself (ie you ran BI on the host computer instead of a virtual machine on the host computer).

You should be able to add a second NIC (like a USB ethernet adapter) and assign it to the virtual machine, but honestly it isn't really needed unless the amount of data (the total of the host computer and virtual machine) is really high - and I don't think a "normal" BI setup is going to generate that kind of traffic that you need to be concerned.
 
Last edited:

toreupfeet

n3wb
Joined
Apr 19, 2021
Messages
19
Reaction score
1
More specifically, my concerns are to alleviate strain on my router and on my PC's NIC. My UDM Pro's memory usage is already in the mid-60 percentage and CPU load is low 40s, and I have four more cameras to add, plus I'm rarely home these days and overall usage is low at the moment. So as much as the NIC is a concern, I'm also interested in reducing load on my UDM Pro if possible.

I have a separate subnet for my cameras with blocked internet access in my router's firewall settings. I think my routing and firewall settings in my UDM Pro are quite robust. My concern with having only one NIC pertains only to optimizing bandwidth (or is the proper term "throughput"?); I don't want any NICs or router ports to be strained by streaming the same RTSP feeds to both BI and my VM.

I've taken my time in creating this post and I've drawn up four options. Which one would be best to alleviate strain on the router and the PC's NIC? I'm currently using option 1.

My BI host has an IP 192.168.0.100 and my HA VM has 192.168.0.101. Would there be any throughput/bandwidth savings if I use the HA integration for BI and add any video streams through this integration? That is to say, by pulling the video from BI instead of directly from the cameras, am I allowing the data to flow directly from 192.168.0.100 to .101 since they're on the same machine? Or, is the data still passing out of the NIC (BI on .100) and back into the same NIC (HA on .101) ...in which case, connecting a switch between the NIC and router might alleviate strain on the router (option 3)?

option-1.jpg

option-2.jpg

option-3.jpg

option-4.jpg
 

The Automation Guy

Known around here
Joined
Feb 7, 2019
Messages
1,413
Reaction score
2,813
Location
USA
None of those examples are going to change the amount of load on your UDM Pro device. The fact that some examples have two network pipes running to your PC/VM machine and other examples only have one pipe doesn't change the amount of data passing through the UDM Pro. You could take the POE cameras and hook them all up to the POE switch and hook the VM up to the same switch via a 2nd NIC (bypassing the UDM completely) and that would take the load off the UDM Pro.

That being said, I don't think your memory and CPU usage on the UDM Pro is really a reflection of the amount of data passing through it. Sure, data passing through it is going to use some memory and CPU cycles, but I think it is the software running on the device that is using most of that power. Putting less data through it isn't going to drastically change those numbers because the software is still "doing it's thing".
 

toreupfeet

n3wb
Joined
Apr 19, 2021
Messages
19
Reaction score
1
None of those examples are going to change the amount of load on your UDM Pro device. The fact that some examples have two network pipes running to your PC/VM machine and other examples only have one pipe doesn't change the amount of data passing through the UDM Pro. You could take the POE cameras and hook them all up to the POE switch and hook the VM up to the same switch via a 2nd NIC (bypassing the UDM completely) and that would take the load off the UDM Pro.

That being said, I don't think your memory and CPU usage on the UDM Pro is really a reflection of the amount of data passing through it. Sure, data passing through it is going to use some memory and CPU cycles, but I think it is the software running on the device that is using most of that power. Putting less data through it isn't going to drastically change those numbers because the software is still "doing it's thing".
Thanks for the response. It looks like I'll be fine with option 1 then. That's good news.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,680
Reaction score
14,040
Location
USA
I agree you probably don't need to worry about the router's load very much. It should be able to handle full saturation of most of the ports without breaking a sweat. Likewise you're probably fine with just the one NIC being shared. If you really need more speed you would probably be better served by installing a 10 Gbps NIC in the machine and using an appropriate switch and/or router for that, not a USB gigabit adapter.

If you want to only pull in one video stream and then split it off to both Blue Iris and Home Assistant... Blue Iris can sort of proxy the video, but there's no way to do that efficiently yet. Blue Iris's web server will transcode the video which is very CPU intensive and results in quality loss and very likely a worse compression ratio than the camera originally delivered.

A more efficient approach is to use a program like rtsp-simple-server which simply redistributes the compressed video stream without doing excessive processing on it. I use this for my doorbell cam which is on wifi so I don't have to double its airtime usage just to get a stream to both of my Blue Iris machines. Unfortunately this is a linux app without a GUI so you need to be comfortable with reading documentation and editing config files and other nonsense like that. Plus you'd probably not be able to run it on home assistant's custom linux OS which is super locked down, which means another VM would be needed. It is probably not worth the trouble unless you have wifi cameras.
 

toreupfeet

n3wb
Joined
Apr 19, 2021
Messages
19
Reaction score
1
I agree you probably don't need to worry about the router's load very much. It should be able to handle full saturation of most of the ports without breaking a sweat. Likewise you're probably fine with just the one NIC being shared. If you really need more speed you would probably be better served by installing a 10 Gbps NIC in the machine and using an appropriate switch and/or router for that, not a USB gigabit adapter.

If you want to only pull in one video stream and then split it off to both Blue Iris and Home Assistant... Blue Iris can sort of proxy the video, but there's no way to do that efficiently yet. Blue Iris's web server will transcode the video which is very CPU intensive and results in quality loss and very likely a worse compression ratio than the camera originally delivered.

A more efficient approach is to use a program like rtsp-simple-server which simply redistributes the compressed video stream without doing excessive processing on it. I use this for my doorbell cam which is on wifi so I don't have to double its airtime usage just to get a stream to both of my Blue Iris machines. Unfortunately this is a linux app without a GUI so you need to be comfortable with reading documentation and editing config files and other nonsense like that. Plus you'd probably not be able to run it on home assistant's custom linux OS which is super locked down, which means another VM would be needed. It is probably not worth the trouble unless you have wifi cameras.
Thank you. I do have two Amcrest AD110 doorbells and I'm streaming the video feeds to my BI and my HA. If it seems that I'd benefit from running rtsp-simple-server I'll give it a shot. I've dabbled with CLI and am fairly comfortable. Thank you for mentioning it. I wasn't aware of its existence. To be clear, you have rtsp-simple-server running solely as a proxy for one doorbell cam? ...is one doorbell cam worthy of implementing such a proxy? I thought 1080p was fairly light.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,680
Reaction score
14,040
Location
USA
Yes, in my case it was worth using the proxy server. I already have a linux VM doing web server proxy tasks so it was not a big deal to set this up on the same VM as its resource usage is negligible.

My doorbell camera (ezviz db1c) was having really bad network performance. It had a lot of dropouts even with just one stream coming out of the camera. A second stream made both streams unusable. Well it turned out the proxy server doesn't behave particularly well with an unstable video source, as it seemed to be lengthening the periods of downtime for the camera in Blue Iris. I was able to solve this by reducing the camera's bit rate from 2 Mbps to 1 Mbps. This is a really low bit rate for a 2 MP camera, so I also reduced the frame rate to 10 FPS so that each frame would get a bigger slice of what little bit rate was remaining. The video stream is quite stable now, but to get there it required using a very low bit rate and only pulling one stream out of the camera.
 

toreupfeet

n3wb
Joined
Apr 19, 2021
Messages
19
Reaction score
1
Yes, in my case it was worth using the proxy server. I already have a linux VM doing web server proxy tasks so it was not a big deal to set this up on the same VM as its resource usage is negligible.

My doorbell camera (ezviz db1c) was having really bad network performance. It had a lot of dropouts even with just one stream coming out of the camera. A second stream made both streams unusable. Well it turned out the proxy server doesn't behave particularly well with an unstable video source, as it seemed to be lengthening the periods of downtime for the camera in Blue Iris. I was able to solve this by reducing the camera's bit rate from 2 Mbps to 1 Mbps. This is a really low bit rate for a 2 MP camera, so I also reduced the frame rate to 10 FPS so that each frame would get a bigger slice of what little bit rate was remaining. The video stream is quite stable now, but to get there it required using a very low bit rate and only pulling one stream out of the camera.
I see. Thank you for the details. If I run into any similar issues it's very useful to know there is a possible solution.
 
Top