Calculating bandwidth requirement for switch

amrogers3

Pulling my weight
Sep 1, 2021
196
128
Houston
For a camera I am planning to buy, I found the following specs.

Main stream: 3840 × 2160 @(1–25/30 fps)
Sub stream: 704 × 576@1–25 fps/704 × 480@1–30 fps
Third stream: 1920 × 1080 @ (1–25/30 fps)

I would like to have 8 channels live streaming to a TV.

The sub stream has terrible resolution. Could I use the 3rd stream to live steam to a TV for better resolution?

I am also trying to get a managed switch to isolate the cameras via VLAN and trying to figure out what speed switch I need. Here is the bandwidth I calculate will be generated via 30 fps. This is just for live streaming. Doesnt take account the recording Mb/s that the cameras will generate. I figure there will be at most 6 cameras recording on motion + 8 camera live streaming 24/7.
1635217564605.png

So therefore would I need to get a GB switch?
 
Instead of connecting the switch to my existing network that has internet access, what about just buying a cheap wireless router, dont give it internet access and just use it to administer the NVR/cameras?
 
Keep in mind that these type of cameras and NVRs, although are spec'd and capable of these various parameters, real world testing by many of us shows if you try to run these units at higher FPS and higher bitrates than needed that you will max out the CPU in the unit and then it bugs out just long enough that you miss something or video is choppy. My car is rated for 6,000RPM redline, but I am not gonna run it in 3rd gear on the highway at 6,000RPM...same with these types of units - gotta keep them under rated capacity. Some may do better than others, but trying to use the rated "spec" of every option available is usually not going to work well, either with a car or a camera or NVR.

Look at all the threads where people came here with a jitter in the video or IVS missing motion or the SD card doesn't overwrite and they were running 30FPS and when people tell them to drop the FPS and they dropped the FPS to 15FPS the camera became stable and they could actual freeze frame the image to get a clean capture. The goal of these cameras are to capture a perp, not capture smooth motion. When we see the news, are they showing the video or a freeze frame screen shot? Nobody cares if it isn't butter smooth...getting the features to make an ID is the important factor. As always, YMMV...

Further, these types of cameras are not GoPro or Hollywood type cameras that offer slow-mo capabilities and other features. They "offer" 30FPS and 60FPS to appease the general public that thinks that is what they need, but you will not find many of us here running more than 15 FPS; and movies are shot at 24 FPS, so anything above that is a waste of storage space for what these cameras are used for. If 24 FPS works for the big screen, I think 15 FPS is more than enough for phones and tablets and most monitors LOL. Many of my cameras are running at 12FPS.

In fact, many times if a CPU is maxing out, it will adhere to the 30FPS but then slow the shutter down to try to not max the CPU, which then produces a smooth blurry image..that is the video my neighbor gets who insists on running 60FPS. He gets smooth walking people but you can't freeze frame it cause every frame is a blur, meanwhile my 12FPS gets the clean freeze frame. Shutter speed is more important the FPS as well. We both run the same shutter speed by the way, but his camera CPU is maxing out and something gotta give when you push it that hard.

You could use the 3rd stream to send to the TVs, just recognize that it is a larger network hog for it.

You then have to look at the total bandwidth of your NVR. Probably around 320Mbps, so you are at roughy 110 for the mainstream and if you run 2MP for the substream that could be another 50 or so and then you plan to stream out to 3 TVs so another 150 or so sending 2MP substream, and possibly some remote viewing and then you are approaching or over the capacity of the NVR and have to cut back resolution or bitrate or FPS.

Someone here recently was hitting that bandwidth ceiling and needed to drop down FPS and bitrate in order for the NVR to work.

Most of us once you tile up 8 cameras at once on the screen, the regular substream is just fine. Sure the substream is terrible if it is just one camera on the screen, but 8 on the screen, you probably cannot tell. You simply maximize one camera to go to the mainstream. My neighbor uses his with a projector and the substream of 8 cameras is just fine on a 6-foot tall screen. YMMV.

I run mine at D1 resolution 256bitrate and it is very responsive (especially when watching remotely) and enough for me to see if I need to mainstream a camera. As always, YMMV. Wait until you try to watch your cameras remotely with 8 cameras on your screen pushing out 2MP...laggy as crap in all likelihood. Better be on an unlimited plan.

Here is something interesting...I use OpenALPR to read plates. Somehow I accidentally was sending a D1 resolution to OpenALPR and it still read the plates accurately...

Differences between a GB and 100MB switch are not that great, so I would favor the GB switch.
 
Last edited:
+1^^^.
And prices on GB switches have come way down in the last few years and it gives you some "headroom" over a 100 MB switch, so just go with it. :cool:
 
Most of us started with the mindset that 30 or 60 FPS is needed.

Then we learn that shutter speed is more important than FPS. 60 FPS can provide a smoother video but no police officer has said "wow that person really is running smooth". They want the ability to freeze frame and get a clean image. So be it if the video is a little choppy....and at 10-15FPS it won't be appreciable. My neighbor runs his at 60FPS, so the person or car goes by looking smooth, but it is a blur when trying to freeze frame it because the camera can't keep up.

Then we learn these are not Hollywood movie capable cameras.

Then we learn that all cameras struggle without light.

Then we learn that running a camera at every rated spec can hinder performance and 15 FPS may actually produce a better image than 30 FPS for the same shutter speed because the camera is operating below capacity.

Then we add more cameras. System starts lagging and not being responsive and misses stuff. We lower FPS because people say that is a good way to lower usage. We learn that the cameras perform just fine at the lower FPS and in some instances actually better when not running them at full capacity.

Most of my cameras are between 8-12 FPS, and I have a few at 15FPS for the tighter field of view cams.

Cutting video from 30FPS to 15FPS just about reduces the storage requirements in half. A lot of wasted storage for no real return.

Take a look at several of these comparison videos. For most people it isn't until 7FPS that you really start to see a difference.



 
Last edited:
15 FPS is adequate. But you can't go wrong with a Gigabit switch. if Camera 9-10-11 ever show up in your system you'll want GB.
 
Heck, most of us using Blue Iris stream UI3 to our phones and monitors at 6FPS at a lower resolution LOL.

The whole goal of seeing all the cameras at once on the screen is for cursory overview to see if something is happening. And you want it snappy and responsive, not lagging 30 seconds because you are trying to push 30FPS at 2MP or 4MP quality to see 8 cameras at once.

You always have the ability to get mainstream and higher FPS by soloing a camera.
 
Last edited:
Your ideas suggest you are not experienced with reviewing recorded video, and not experienced with purchasing cameras.
You do not tell us which Camera you are looking to buy. Maybe there are cameras better suited to your needs.
You always want to stream the 8 cameras in a substream for a screen displaying all 8. Security camera's have a specific job.
Being neat and perfectly clear in substream isn't a requirement for capturing the required image.
 
Thanks wittaj, great explanation and example videos.

And good point on the bandwidth on the NVR. Something I didnt even think about. Like we talked about before, there is so much involved with these cameras. I am trying to think of everything and make the right decision before I purchase but it's difficult. Thanks for helping me think through all this stuff.

Are you familiar with pfSense? I run a pfSense box as my router
  • I was thinking about using a managed switch with VLANs to segment the network so the cameras cannot talk out. The other option I was thinking about is buying a cheap wireless router, dont give it internet access and just use it to administer the NVR/cameras. What you guys think?
I can reduce the FPS but I am still unsure of the switching capacity, packet forwarding rate, and the packet buffer memory I need. Does anyone know how to calculate those for a worse case scenario?

Also, to calculate bandwidth, let's take my example since I already did the calculations for 30 FPS (I know it will be less than this for 15 FPS), let's say I am running 8 cameras, would the bandwidth be 8 cameras x (2 streams worst case, 1 recording and 1 live stream) x 107 Mb/s? Just for an example, I know the main stream and substream woudl be different. If that formula is correct, I can do the calculation on the revised frame rate numbers.
 
Last edited:
just get a Giga bit switch and you don't have to fret and calculate Bandwidth.....you just won't have to worry about it. it'll just work.
I've got 17 cameras on a 802.3at- 24 port switch. it's Gigabit. no worries. things are clear enough to see what's goin on. here are 17 substreams on a 1080P 22" monitor.

Screenshot 2021-10-26 141159.pngScreenshot 2021-10-26 141416.png
 
Last edited:
You're seriously over thinking this. Even an 8MP camera running 30F/ps won't take more than 10Mb/ps. Eight cameras like that and you have 80Mb/ps. Can we all say "CAT5" together?

I've got a mix of 2M and 4MP cameras running at 15F/ps with resolutions of 2048 on the 2MP and 8192 on the 4MP and that produces about 150Mb/PS. Don't sweat the small stuff.
 
Last edited: