Bitrate, Bandwidth, And Budget Primer

You want to install as many surveillance cameras as your budget will allow. But what part of the budget does the batch of surveillance cameras take and what part of the budget does the video storage take up for those surveillance cameras feeds? Although we’ve been unable to substantiate this claim, system integrators and consultants that we’ve spoken to over the years claim the storage portion of a video surveillance project’s budget is over 50%.

Even if it is close to that percentage, with this amount of money on the line, having a good understanding of how to calculate the bitrate of the video streams created by the IP-cameras, the network bandwidth that video streams use, and how much all of that will cost is probably one of the most mystical acts of a video surveillance project.

Trying to use online storage and bandwidth calculators seem to yield a different answer for each site visited. How can that be? Let’s walk through an exercise to determine the storage and network bandwidth utilization of a video surveillance infrastructure.

What about these variations in those online calculators; how can we get such differing calculations if we use the same input variables. The answer is actually pretty straight forward.

Bitrate
Each camera’s bitrate -the bandwidth used to feed video out of the camera and onto the network- is greatly determined by the camera’s internal video imaging encoder circuitry. And as you can guess, there are a number of manufacturers of these chipsets and sensors that make a camera a camera.

The capability (dare say quality) of this imaging encoder functions produce the bitrate / bandwidth and thus determine the network utilization and ultimate storage requirements of the recorded video. Unfortunately, there is no magic “set” number here and thus the variations in all those various online calculators. Each site is either taking into account some “average” bitrate, or some known bitrates of particular IP-camera. You could ascertain that a camera manufacturer’s online storage calculator will take into account their own camera’s best bitrate performance and use those figures for the calculations.

Solve for X.
If X is the amount of hard disk storage capacity an IP-camera will utilize, how do we perform the math to solve this equation? Understanding the data level (bitrate) of a video imaging encoder is determined by the format of the video stream (MPEG2, MPEG4, H.264, etc) and even from frame to frame within that video. Therefore, you can really only hope for an average bitrate for this calculation (and thus the genesis of all those differing online calculations).

Start with the set resolution of the surveillance video camera. For example, if the camera is set to 1080p HD resolution (1920 x 1080) then you will need to multiple the vertical by horizontal sizes to get the total resolution, in this case it would be 2,073,600 pixels per frame of video.

Then we need to multiple that number by the number of frames we set the camera to output per second. Let’s say 15 frames-per-second (15 fps). This would give us 31,104,000 total pixels. But wait, there is more. If this is a color image, there are 24 bits of data for each pixel; gray scale (some call it black and white) has two (2) bits of data per pixel. Crossing the chasm from pixels to bits, we need to multiple the number of pixels by the color bits and in our example we get the product of 746,496,000 bits.

We convert this to bits-per-second and we get 12,441,600 bits-per-second. Most video is measure in Kilobits-per-second (kbps) and thus we divide our number by 1000 and get 12,442 kbps.

Now the magic happens.
What compression algorithm are we employing? The H.264 (aka MPEG4 part 10) format is great at determining the consistent bits and compressing those. Motion within the video determines a consistent image –or not– and therefore can compress bits based on the amount of motion in the video scene. And as motion is changing all the time, here is where a number gets pulled from the heavens. We are unable to know how much motion we will have at any given time throughout all of the video so we pretend an “average” and work with that. Let’s go with 30% motion for our example.

Based on the 12,442 kbps the 30% motion H.264 video stream would generate an “average” bitrate of 3,732kbps. Remember, this is an average and your mileage will vary (subject to change without notice). But at least we have a fairly reasonable figure to work with.

If you already have the cameras, you can use a software tool to analyze recorded video from that camera and it will give you the bitrate that is actually generated. No calculator needed. Download the Bitrate Viewer tool (http://www.winhoros.de/docs/bitrate-viewer/index.html ) from EDV & Astro Service out of Germany. This handy tool quickly gives you the average and peak bitrate in kbps removing any guesswork. Keep in mind that this is still an “average” so your overall storage and network utilization can still fluctuate.

Storage Capacity Calculation
Now that we have the bitrate, we multiple that by the number of cameras and the number of days retention we desire and we will get the total amount of computer storage we need for our recorded video.

Network Utilization
Again, with our known bitrate (3,732kbps in our example above) we can determine how much of the network traffic these camera feeds will consume. Are we on a 10/100Mbps (megabits per second) network or are we on a 1Gig (one gigabits per second) network –or even 10G? We convert our kbps to Mbps and we see that on a 10/100 switched network, we utilize 3.7% of the network … for one (1) camera. Put 200 cameras on this network and we see we would utilize 746% of the network and come to the realization that we could not really put 200 cameras on this network. Time to divvy up the network.

Now that you know…
Hopefully, you have a better understand of how all these online storage calculators work and also appreciate the black magic portion of H.264 and how motion creates this psychotic variable that makes it hard to nail down an exact calculation.

This leads us into a deeper conversation of what’s the best-practices for surveillance video storage? How do we save more and more video without going bankrupt? Glad you asked: read our Best Practices Storage article.

0 Comments