تخطَّ إلى المحتوى
iTime Solutions

كاميرات المراقبة

كيفية حساب مساحة التخزين المطلوبة لكاميرات المراقبة

احسب عدد التيرابايت التي تحتاجها كاميراتك لمدة الاحتفاظ المطلوبة، بمعادلة معدل البت ومثال محسوب لـ 64 كاميرا وجدول لحجم RAID.

iTime Solutions 10 دقائق قراءة

جزء من الدليل: الدليل الشامل لتصميم أنظمة كاميرات المراقبة المؤسسية: الكاميرات والشبكة والتخزين وVMS

Most CCTV storage quotes go wrong in the bitrate, not in the arithmetic. The arithmetic is a single multiplication. This guide gives you the formula, a worked 64-camera example where every number was checked in code, and the adjustments that can move the answer by a third or more.

Short answer: Storage per camera in GB per day equals its bitrate in Mbps multiplied by 10.8. Multiply by the number of cameras and the retention days, add about 20 percent headroom, then choose a RAID layout whose usable capacity, after parity, still covers that figure. The hard part is an honest bitrate, so measure it or model it with the camera vendor's own tool instead of guessing.

What is the CCTV storage formula?

A camera encoding at 1 Mbps writes 1,000,000 bits every second. Divide by 8 for bytes, multiply by the 86,400 seconds in a day, divide by a billion to get decimal gigabytes, which is how drive makers count. The result is 10.8 GB per day for every 1 Mbps of bitrate.

Storage (GB) = bitrate (Mbps) x 10.8 x cameras x days

Same thing, spelled out:
Storage (GB) = bitrate (bit/s) / 8 x 86,400 x cameras x days / 1,000,000,000

You can sanity-check it against Reolink's published example: 2 cameras at 1,024 kbps recording for 7 days. 1.024 x 10.8 x 2 x 7 gives 154.83 GB, which matches the figure on their page. Watch the units. Bitrates are in bits (lowercase b, Mbps). File sizes and disk capacities are in bytes (uppercase B, GB and TB). Mixing them is a factor-of-8 error, and it is the most common one.

Bitrate per cameraGB per dayTB for 30 days
1 Mbps10.80.324
2 Mbps21.60.648
4 Mbps43.21.296
8 Mbps86.42.592
12 Mbps129.63.888

So one 4 Mbps camera needs 1.296 TB for a month of continuous recording. That single line is worth memorising, because every larger estimate is that number scaled up.

Which bitrate should you plug in?

This is where estimates drift. Bitrate depends on resolution, frame rate, codec, compression level, GOP length and, above all, the scene. A camera watching an empty corridor and the same camera watching a busy entrance can differ several times over. Axis lists compression level, GOP length, resolution, frame rate and image settings as the settings that move bitrate.

The encoder's rate-control mode matters just as much. Under variable bitrate (VBR), quality stays constant and storage becomes hard to predict, so Axis says VBR systems need large storage margins. Under maximum bitrate (MBR), the camera is capped, storage is predictable, but quality drops in busy scenes. Axis also warns that storage tools relying on a low MBR cap can underestimate what you will really need, because factory defaults are often very low. Its recommendation for most cases is average bitrate (ABR) with an MBR limit, which needs about 24 hours of typical scene variation to settle.

For a first-pass estimate, before you have the cameras, these are the placeholders I would start from. They are planning assumptions for a moderately busy indoor or retail scene at 15 to 25 frames per second, not vendor specifications. Replace them with measured values as soon as you can.

Camera classH.265 planning bitrateH.264 (about double)GB per day with H.265
2 MP (1080p)2 Mbps4 Mbps21.6
4 MP4 Mbps8 Mbps43.2
8 MP (4K)8 Mbps16 Mbps86.4

The doubling for H.264 reflects the commonly cited figure of roughly 50 percent lower bitrate for H.265 at equal quality, as summarised by EngineersUniverse. For the codec trade-offs in detail, see H.264 vs. H.265 vs. H.265+, and for how resolution drives bitrate, CCTV resolution explained.

The better method is to measure. Configure one camera per scene type exactly as it will run in production, record 24 hours covering day and night, and read the actual bytes written from the VMS or the camera. Axis Site Designer and the bitrate calculators built into most camera web pages are acceptable models, and far better than a rule of thumb copied from a forum.

Worked example: 64 cameras, 30 days, continuous recording

Take a mid-sized office and warehouse site with 24 cameras at 2 MP, 32 at 4 MP and 8 at 8 MP, all H.265, all recording continuously for 30 days. The 8 MP units cover the yard and the loading bay.

GroupCamerasMbps eachGB/day eachGB/day groupTB for 30 days
2 MP H.26524221.6518.415.552
4 MP H.26532443.21,382.441.472
8 MP H.2658886.4691.220.736
Total64240 combined2,592.077.76

Eight cameras, one eighth of the site, consume 26.7 percent of the storage. That is the usual surprise: a handful of high-resolution cameras dominates the total. Adding 20 percent headroom for bitrate peaks, retention slack and the fact that nobody operates a volume at 100 percent gives 77.76 x 1.2 = 93.312 TB. The combined ingest is 240 Mbps, or 30 MB per second, which matters later for the recorder and network. The script below reproduces every figure above (Python 3, no libraries).

def gb_per_day(mbps):
    return mbps * 1_000_000 / 8 * 86_400 / 1_000_000_000   # = mbps * 10.8

groups = [("2MP H.265", 24, 2), ("4MP H.265", 32, 4), ("8MP H.265", 8, 8)]
days = 30
total_gb = sum(n * gb_per_day(mbps) * days for _, n, mbps in groups)
print(total_gb / 1000)          # 77.76 TB
print(total_gb / 1000 * 1.2)    # 93.312 TB with 20 percent headroom

How much do motion recording, H.265 and smart codecs really save?

Motion-only recording is the biggest lever and the least reliable. If the 32 four-megapixel cameras record only half the time, the example drops from 77.76 TB to 57.024 TB (68.43 TB with headroom), a saving of 20.736 TB. But that "half the time" is a guess about the site, and a guess about a building is a poor basis for a purchase. I would keep continuous recording on entrances, cash points, server rooms and anywhere an incident is likely, and use motion triggers only on low-traffic areas with a pre-event buffer.

Codec choice is predictable. With the 2x assumption above, the same 64 cameras on H.264 would need about 155.5 TB raw and 186.6 TB with headroom, double the H.265 figure. In 2026 there is little reason to buy new cameras that cannot do H.265.

Smart codecs are the least predictable. Axis states that Zipstream cuts storage by 50 percent or more on average, and its own white paper gives ranges by algorithm for H.264: 10 to 50 percent for dynamic region of interest, 0 to 50 percent each for dynamic GOP and dynamic frame rate, depending on how much motion the scene has. IPVM has long cautioned that predicting savings in all situations is close to impossible. In an older IPVM test of Vivotek's comparable Smart Stream, savings were 15 to 30 percent in well-lit scenes. My rule: never bank more than 20 to 30 percent from smart compression in a design. Treat anything beyond it as spare capacity.

AV1 is not a storage windfall over H.265. In Axis tests across four scenes, AV1 beat H.264 by 18 to 33 percent but beat H.265 by only 0.04 to 5.8 percent. If your VMS and cameras support it, fine. Do not shrink the design because of it.

From terabytes to a disk count

Two conversions bite here. First, drive makers sell decimal terabytes (10^12 bytes), but Windows and many recorder menus show binary units (2^40 bytes) and label them TB. The 93.312 TB requirement is 84.9 TiB, and a 16 TB drive appears as roughly 14.55 TiB. Size in one unit throughout and say which. Second, parity and hot spares take capacity before you record a single frame.

Layout (16 TB drives)Usable capacity formulaDrives for 93.3 TBUsable
RAID 5(n - 1) x 16796 TB
RAID 6(n - 2) x 16896 TB
RAID 10n / 2 x 161296 TB

For this workload I would pick RAID 6 with a hot spare, so 9 drives. A rebuild on large drives takes long enough that a second failure during it is a real risk, and RAID 5 leaves no margin. RAID 10 costs 4 more drives for faster rebuilds and is rarely worth it for sequential video writes. The wider RAID and NAS trade-offs are covered in CCTV storage planning with RAID and NAS.

Set the retention policy to match the disk. Milestone's documentation notes that retention time and maximum size work as "whichever comes first": whichever limit is hit first triggers deletion or archiving. It also advises configuring low-disk-space thresholds so alerts fire before the volume fills, and says not to design the system around the last-resort fallback that deletes the oldest data to make room. If you archive, Milestone recommends doing it every 4 hours for best performance, and warns that archiving adds load to the recording server.

Will the drives and the recorder cope with the write load?

240 Mbps is 30 MB per second, which is 2.592 TB per day and about 946 TB per year. Spread across an 8-drive RAID 6 group, each drive writes roughly 158 TB per year including parity. Seagate's SkyHawk AI datasheet rates its drives at a 550 TB per year workload and for up to 64 HD streams (1080p, H.265, 25 fps), so this site sits comfortably inside the limit. Desktop drives are a different story. They are not designed for continuous writing, and putting them in a recorder is a false economy.

Capacity is only one of the recorder's limits. Every NVR and recording server has a maximum incoming bandwidth and a maximum camera count, and playback and export reads compete with the writes. Check both against the datasheet. The network side of the same calculation is in CCTV bandwidth calculation, and the choice between recorder types is in NVR vs. DVR. Heat shortens drive life, so in Egypt's summer a recorder in an unventilated cupboard is a storage risk in its own right.

The FASTCABLING channel on YouTube has a video titled "Managing Bandwidth & Storage for IP Camera Networks".

Managing Bandwidth & Storage for IP Camera Networks
Managing Bandwidth & Storage for IP Camera Networks · FASTCABLING · YouTube

How long should you keep footage?

Retention is a business and legal decision first and a storage decision second. Thirty days is common, but the right number depends on how fast incidents are reported, and on contract and insurance terms. The article on how many days of recording you really need walks through that choice. In Egypt, Law No. 151 of 2020 on personal data protection and its executive regulations, issued in November 2025, cover visual surveillance in public places and call for licensing, so keeping footage far longer than you can justify creates its own exposure. Confirm the specifics with your legal adviser.

Retention changes the answer linearly. The same 64-camera site needs 77.76 TB at 30 days. At 90 days it needs 233.28 TB, or 279.936 TB with 20 percent headroom. If a long retention requirement turns the design into hundreds of terabytes, consider tiering: full frame rate for the first week, then a reduced frame rate or archive tier for the rest.

What to do next

  1. List every camera with its resolution, codec, frame rate and scene type.
  2. Assign a bitrate to each from a vendor tool or a 24-hour test, not from the box.
  3. Apply bytes = Mbps x 10.8 x cameras x days, then add 20 percent.
  4. Convert to usable capacity in one unit, choose RAID 6 plus a spare, and check the write load against the drive datasheet.
  5. Confirm the recorder's incoming bandwidth and camera limits, then set retention and low-disk alerts to match.

The same numbers feed the wider design, which is laid out in the complete guide to enterprise CCTV design. If you want a second pair of eyes on a storage design, iTime Solutions designs and installs CCTV systems in Egypt and can check your numbers against the recorder and drive datasheets. You can reach the team through the contact page.

References and further reading

أسئلة وأجوبة

لماذا تعرض حاسبة جهاز التسجيل مساحة أقل من هذه المعادلة؟

كثير من الحاسبات تفترض حدا أقصى منخفضا لمعدل البت أو تسجيلا عند الحركة فقط. وتحذر Axis من أن الأدوات المعتمدة على سقف منخفض قد تقلل من الاحتياج الحقيقي. أدخل معدل البت الذي ستشغله فعليا، وقارن النتيجة بتسجيل مقاس لمدة 24 ساعة.

لماذا يظهر قرص سعته 16 تيرابايت بنحو 14.5 تيرابايت في ويندوز؟

يحسب مصنعو الأقراص التيرابايت بالنظام العشري (10^12 بايت)، بينما يعرض ويندوز الوحدات الثنائية (2^40 بايت) ويسميها TB. القرص 16 تيرابايت يساوي نحو 14.55 TiB. احسب التصميم بوحدة واحدة، وتذكر أن التكافؤ في RAID يخصم جزءا إضافيا.

كم تحتاج كاميرا 4 ميجابكسل من التخزين لمدة 30 يوما؟

عند متوسط معدل بت 4 ميجابت في الثانية تكتب الكاميرا 43.2 جيجابايت يوميا، فيلزم 1.296 تيرابايت لتسجيل مستمر لمدة 30 يوما قبل إضافة الهامش. وعند 8 ميجابت، كما في H.264، يتضاعف الرقم إلى 2.592 تيرابايت. قس معدل البت الفعلي لأن المشهد يؤثر فيه أكثر من عدد الميجابكسل.

هل يخفض التسجيل عند الحركة التخزين إلى النصف؟

فقط إذا كان المشهد خاليا نصف الوقت، وهذا يعتمد كليا على الموقع. المداخل المزدحمة وصالات البيع قد تسجل بشكل شبه مستمر، بينما قد يسجل المخزن نسبة صغيرة من اليوم. صمم على التسجيل المستمر حيث تهم اللقطات، واعتبر وفر الحركة مكسبا إضافيا.

هل أستخدم RAID 5 أم RAID 6 لتخزين كاميرات المراقبة؟

مع الأقراص الكبيرة وثمانية أقراص أو أكثر اختر RAID 6. إعادة البناء تستغرق وقتا طويلا، وفشل قرص ثان أثناء إعادة بناء RAID 5 يفقد المصفوفة. يتحمل RAID 6 فشل قرصين، وقرص التكافؤ الإضافي زهيد مقارنة بفقدان أسابيع من التسجيلات. أضف قرصا احتياطيا للاستبدال السريع.

تابع القراءة

حدثنا عن مشروعك.

احجز معاينة مجانية للموقع واحصل على عرض واضح بالنطاق والمدة والتكلفة.