DEV Community

Cover image for CCTV Retention Maths — Eighty Cameras, One Year, and the Storage Curve Customers Never Expect
Daanial Farrukh
Daanial Farrukh

Posted on Originally published at quabin.com

CCTV Retention Maths — Eighty Cameras, One Year, and the Storage Curve Customers Never Expect

A presales war story about sizing central storage for CCTV — the daily write rate almost nobody calculates — and the three-line method I now run before I quote a single terabyte.

The request came in one sentence.

“We want all our cameras recorded in the cloud. One year.”

Five sites. About eighty cameras. A mix of DVRs at the smaller offices and one NVR at the head office. No video management software in the middle — each recorder would write straight to central storage as a network disk.

“How many terabytes is that?” they asked.

The tempting answer is a rule of thumb. So many cameras, so many gigabytes per camera per day, multiply by 365, add some headroom, done.

I asked one question instead: “For each site, how big is the recorder’s disk, and how many days does it keep before it overwrites?”

They had to go and check. Nobody had ever looked at the cameras that way.

That’s the trap. A camera count is not a storage number. The real number hides in plain sight — in two figures every recorder already shows on its own status page.

What You Are Actually Sizing — a Daily Write Rate

Every CCTV recorder is a loop. It writes video until the disk is full, then overwrites the oldest day. So the disk size and the retention days together tell you exactly how much the site writes per day.

Daily write rate = recorder disk size ÷ days of retention.

That one line replaces every rule of thumb. It already includes the real codec, the real resolution, the real frame rate, motion versus continuous recording, and the hours the cameras are busy. You are not estimating the cameras. You are reading what they actually did.

The flow, for a design with no video management server:

Camera → Site DVR/NVR → Site-to-site link → Central storage (network disk)

Here is what the five sites reported, with the daily rate worked out:

  • Site A (NVR, 16 cameras): 6 TB holds 15 days → 400 GB/day
  • Site B (DVR, 5 cameras): 2 TB holds 45 days → about 44 GB/day
  • Site C (DVR, 5 cameras): 2 TB holds 45 days → about 44 GB/day
  • Site D (DVR, 32 cameras): 4 TB holds 30 days → about 133 GB/day
  • Site E (DVR, 24 cameras): 2 TB holds 30 days → about 67 GB/day

Total: about 690 GB per day.

Where this pattern is common:

  • Multi-branch retailers and distributors with a recorder at every shop or warehouse
  • Offices that grew one site at a time, each with whatever recorder the local installer liked
  • Any estate where the head office bought the “good” cameras and the branches bought the cheap ones

Why the Camera Count Misleads — One Site Wrote 57% of the Data

Look at the cameras per site again. Site D has 32 cameras. Site A has 16.

Now look at the daily rate. Site A writes three times as much as Site D, with half the cameras.

Per camera, the bitrates were:

  • Site A (NVR): about 2.3 Mbps per camera
  • The DVR sites: between 0.26 and 0.8 Mbps per camera

Same customer, same kind of building, a three- to nine-fold difference per camera. Over a year, Site A alone is about 146 TB of a roughly 250 TB total — one site with 20% of the cameras writes 57% of the data.

A per-camera rule of thumb would have spread that evenly across eighty cameras. It would have been wrong for every single site, and the errors would not cancel out. Here’s why: the expensive site is the one with the best cameras, and that is exactly the site the customer cares most about.

This is also where the first question for the next meeting comes from. A 2.3 Mbps stream per camera usually means higher resolution, a higher frame rate, or an older codec. If Site A can move to a more efficient codec, the whole design changes. The biggest saving in this quote sits in one recorder’s settings, not in the storage price.

The Storage Curve Nobody Expects

The second surprise was the shape of the bill.

A one-year retention store does not start full. On day one it holds one day of video. It fills in a straight line for twelve months, and only then does it level off — because from month 13 the oldest month is deleted as the newest arrives.

Month 1: ~21 TB → Month 6: ~124 TB → Month 12: ~248 TB → flat after

At 690 GB a day, a 30-day month adds about 20.7 TB. Twelve of those make about 248 TB. If you count 365 days instead, you get about 251 TB. Our first quote said 256 TB; the final design said 248 TB, built as a monthly step-up. Both are honest. The difference is only how you count a month — so write down which one you used.

What changed the conversation was the billing shape, not the total. If the customer pays for 250 TB from the first day, they pay for eleven months of empty disk. So the final proposal billed storage as a step-up: month 1 covers month 1’s data, month 12 covers a full year, flat after that. The first month came to about a quarter of the steady-state month.

The customer had expected one flat number. The curve was the thing they remembered.

One spreadsheet lesson from the same deal. The first cost model for this deal had a cumulative row, and it added the fixed monthly charges — the link and the server — again every month, on top of the month before. Storage grows. Fixed charges do not grow. Only the variable line should step up.

How to Actually Size This

Step 1: Collect two numbers per site — disk size and retention days.

Ask for them from each recorder’s status page, not from memory. If a recorder has more than one disk, use the total. If it shows “days of recordings available”, use that number, not the policy setting.

A quick check per site:

echo "scale=1; 6000 / 15" | bc
Enter fullscreen mode Exit fullscreen mode

That is 6,000 GB ÷ 15 days = 400.0 GB per day for Site A.

Step 2: Turn each daily rate into a bitrate.

This is the number the network team needs, and it exposes the outlier site at once.

echo "scale=2; 400 * 8 * 1000 / 86400" | bc
Enter fullscreen mode Exit fullscreen mode

400 GB a day is about 37 Mbps, sustained. Divide by the cameras on that site (16) and you get about 2.3 Mbps per camera. Do this for every site. If one site is several times the others per camera, that is your first conversation.

Step 3: Measure one real camera when a site looks odd.

If you can reach a camera’s RTSP stream, record one minute and weigh it:

ffmpeg -rtsp_transport tcp -i rtsp://<CAMERA_IP>/<STREAM_PATH> -t 60 -c copy sample.mp4
Enter fullscreen mode Exit fullscreen mode
ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,width,height,avg_frame_rate sample.mp4
Enter fullscreen mode Exit fullscreen mode

File size × 8 ÷ 60 gives the bitrate in bits per second. The second command shows the codec, resolution and frame rate. A busy daytime minute and a quiet night minute will differ — that is normal, and it is exactly why the disk-and-days method beats a one-minute sample for the total.

Step 4: Add the sites and size the year.

echo "scale=1; 690 * 365 / 1000" | bc
Enter fullscreen mode Exit fullscreen mode

About 251.8 TB at 690 GB a day. This is raw recorded data. Any protection overhead on the storage side — replicas, erasure coding — comes on top, and so does any free-space margin your platform needs.

Step 5: Size the link from the same number.

echo "scale=1; 690 * 8 * 1000 / 86400" | bc
Enter fullscreen mode Exit fullscreen mode

About 63.9 Mbps sustained, all sites together. We put a 100 Mbps link at the data centre. Remember this is an average across the day: recorders on motion detection write in bursts, and every site needs its own uplink sized for its own share, not just the central link.

Step 6: Verify before you sign.

This step is where most sizing sheets stop and where mine starts. Three checks were still open when this proposal went out, and I wrote them into it:

  1. The codec at the heavy site. It decides more storage than any discount.
  2. The recorder’s network-disk size limit. Many DVRs and NVRs cap the size of a network disk they can mount. If the cap is smaller than one site’s share, that site needs several volumes or a different design.
  3. Free capacity at the data centre. 250 TB of HDD by month 12 has to exist by month 12.

If one of these comes back wrong, the quote is wrong. That is not a failure of the method. It is the verification.

The Sizing Checklist

  1. Daily rate per site — disk size ÷ retention days, from the recorder’s own status page.
  2. Bitrate per camera per site — daily rate × 8 ÷ 86,400 ÷ cameras; flag any site several times higher.
  3. One measured sample — ffprobe on a one-minute recording from the odd site.
  4. Year total — daily total × 365, and say whether a month is 30 days or a calendar month.
  5. Link — sustained Mbps from the same daily total, plus each site’s own uplink.
  6. Growth curve — linear for the retention period, flat after; bill it as a step-up if the platform allows.
  7. Recorder limits — maximum network-disk size per DVR/NVR.
  8. Spreadsheet sanity — only variable lines grow; fixed charges are counted once per month.

What I Tell Every Customer Now

Before any CCTV storage quote, I ask one question:

“For every recorder you own, what is the disk size and how many days does it keep?”

If they can answer it per site, we can size it in ten minutes and the number will hold. If the answer is “about eighty cameras”, we’re not done yet.

I write about the questions I ask in real customer rooms — the ones that change architectures and surface the problems no one else noticed. If you found this useful, drop your email below and I’ll send the next one when it’s ready.

FAQs

How much storage do I need for CCTV with one year of retention?

Take each recorder’s disk size and divide it by the number of days it keeps. That gives the daily write rate per site. Add the sites and multiply by 365. In this case five sites wrote about 690 GB a day, which is roughly 250 TB for one year, before any storage protection overhead.

Why is sizing by camera count wrong?

Bitrate per camera varies a lot with codec, resolution, frame rate and recording mode. In this case one site ran about 2.3 Mbps per camera while the others ran 0.26 to 0.8 Mbps. That site had 20% of the cameras and wrote 57% of the data.

How much bandwidth does central CCTV recording need?

Convert the daily total to a bitrate: GB per day × 8 × 1,000 ÷ 86,400 gives Mbps. 690 GB a day is about 64 Mbps sustained. That is an average, so leave headroom for bursts, and size each site’s own uplink for that site’s share.

Does a one-year CCTV store need all its capacity on day one?

No. A retention store fills in a straight line until the retention period is reached, then stays flat as old video is deleted. Month 1 needs about one-twelfth of the year’s capacity, which is why a step-up billing plan fits CCTV better than one flat price.

What should I check before quoting central CCTV storage?

Check the codec at the heaviest site, the maximum network-disk size each DVR or NVR can mount, and that the data centre will have the full year’s capacity free by the end of the year. Any one of these can change the design.

Download the PDF


Originally published at quabin.com.

Top comments (0)