Safsale Smart Link Academy
Chapter 11 of 14

Compression Codecs, Bitrate Types, and Storage Calculations

This chapter is part of the Practical Guide to Video Surveillance, an open technical resource for U.S. installers, integrators, businesses, and security system designers.

A codec (compressor/decompressor) is used to reduce video bandwidth while preserving as much quality as possible. Common codecs in surveillance:

  • MJPEG (Motion JPEG)
  • MPEG-4
  • H.264
  • H.265 (HEVC) – More recent, typically offers ~25–35% better compression efficiency over H.264.

Frame-by-Frame Codecs

MJPEG compresses each frame independently. You get full-frame clarity for each image—ideal for detailed forensic analysis (stop-frame), but bandwidth usage can be high.

Streaming (Interframe) Codecs

H.264 and MPEG-4 use a structure of GOV (Group of VOPs) or GOP (Group of Pictures) with periodic I-frames (key frames) plus P and B frames. The greater the distance between I-frames, the higher the compression ratio—but also the more dependent the video is on preceding frames.

  • If GOV=50 at 25 fps, only every 2 seconds do you get a full reference frame (I-frame).

Note: This structure reduces bandwidth but can make certain forms of stop-motion analysis more difficult because only the I-frames contain complete images. Intermediate frames only store changed data relative to reference frames.

H.265 (HEVC)

H.265 is essentially the successor to H.264. It can achieve an additional 25–35% reduction in bit rate at a given quality level by using more sophisticated block partitioning and multi-threaded encoding. While beneficial for bandwidth/storage savings, H.265 requires more CPU/GPU resources for encoding and decoding.

BIT RATE TYPES

“Bit rate” is the data transfer rate in bits per second (bit/s), often expressed as Kbit/s, Mbit/s, or Gbit/s. In video surveillance, you can configure the camera or DVR to use CBR (Constant Bit Rate), VBR (Variable Bit Rate), or more advanced hybrids (VBR with Cap, VBR with Frame Skip).

VBR (Variable Bit Rate)

  • Delivers a constant quality by dynamically adjusting bit rate based on scene complexity (more motion = higher bit rate; less motion = lower bit rate).
  • Ideal when you want consistent image detail and your network can handle variable peaks in bandwidth usage.

CBR (Constant Bit Rate)

  • Keeps the bit rate fixed.
  • If there is a lot of motion and the bit rate is capped, image quality can degrade (motion blur, block artifacts).
  • Used in networks with strict bandwidth limits.

VBR with Cap

  • Hybrid approach: generally variable bit rate, but with a maximum threshold.
  • If the camera tries to exceed that threshold, it increases compression to keep the bit rate below the cap.

VBR with Cap & Frame Skip

  • Extends “VBR with Cap” by dropping frames if the cap is exceeded, reducing frame rate instead of heavily compressing. This approach can preserve better quality per frame, at the cost of lower frame rate under heavy motion.

MAXIMIZING RECORDING DURATION

To get the longest possible recording time on a DVR/NVR, consider these factors:

  • HDD Capacity: Larger HDD = more days of stored video.
  • Recorded Resolution: Lower resolution or substream = smaller file size per frame.
  • Frame Rate: Fewer frames per second = less data per second.
  • Motion-Activated Recording: Only record when motion is detected, saving disk space during inactivity. Note: With H.264, the motion detector typically checks only I-frames; a large GOV (long gap between I-frames) might cause missed events.
  • Noise Reduction (DNR): Reduces random noise in low-light images, minimizing false triggers for motion-based recording.
  • ROI (Region of Interest): Different compression levels in selected areas can save bandwidth/disk space.
  • Properly Choosing CBR/VBR: Striking a balance between stable bit rate (CBR) vs. consistent quality (VBR).
  • Codec Selection:
  • For low or intermittent motion, a high GOV H.264 (or H.265) can greatly reduce storage.
  • For continuous motion or detailed scenes, you may reduce GOV so you don’t lose detail or smoothness during rapid action.

Example Bandwidth Values

Provided tables show approximate bit rates in Mbit/s for 1920×1080 resolution at various GOV or I-frame intervals, frame rates, and motion intensities (e.g., 50% vs. 90%). Use these to estimate bandwidth usage and hence storage requirements.

STORAGE (HDD) CALCULATIONS

Use the above bit rate estimates to figure out total daily data per camera. For example:

Data per second (Mbit/s) → Mbits per hour = Mbit/s × 3600

Mbits per hour / 8 = MB per hourMB per hour / 1024 ≈ GB per hour

Then multiply by number of hours/days. The provided nomographs or tables can help to quickly approximate how many days of continuous recording (or motion-based) fit onto, say, a 2 TB or 4 TB HDD.

STOP-FRAME CLARITY AND SHUTTER SPEED

Many high-traffic or public areas demand the ability to perform post-incident forensics, needing crisp stop-frames of moving subjects (people, vehicles). Problems arise when the default camera shutter speed is too slow (e.g., 1/30 s or 1/50 s). Fast-moving subjects will blur, losing identifying details.

Recommended Shutter Values

A suitable shutter speed depends on:

  • Camera resolution (higher resolution reveals more motion blur).
  • Movement direction (toward the camera = less blur, perpendicular = more blur).
  • Focal length (longer focal length can magnify motion blur).
  • Subject speed.

Example: For a camera at 1920×1080 resolution with a 6 mm lens, installed about 10 ft (3 m) above ground, capturing a subject approaching the camera at ~2.5 mph (4 km/h). Some calculations might yield recommended shutter speeds of around 1/100–1/200 s to avoid noticeable blur in each frame. If the subject moves perpendicular to the camera’s view, a faster shutter is needed (1/200–1/500 s or more).

Key:

  • If your priority is face identification in dynamic environments, you likely need a shorter shutter time, plus adequate lighting or gain.
  • This can also affect your camera’s low-light performance if no IR or bright lighting is available.

Compression vs. Stop-Frame Quality

Excessive compression under H.264/H.265 can also degrade stop-frame clarity. Fine detail can be lost due to block artifacts or heavy quantization.

Need help with a surveillance project?
Safsale can assist with CCTV, IP cameras, NVR/DVR systems, PoE, cabling, fiber transmission, and access control system planning for U.S. projects.