SESE Training โ€“ Matthew Fabian

Codecs, bitrate control and GOP

H.264, H.265, AV1 and MJPEG; smart codecs like Axis Zipstream; CBR, VBR and MBR; GOP and frame types.

โฑ ~45 minModule 1 of 11Quiz โ†“Common mistakes โ†“
๐ŸŽฏ Learning objectives
  • Explain how inter-frame compression works (I- and P-frames, GOP)
  • Compare H.264, H.265, AV1 and MJPEG and know when each fits
  • Explain what a smart codec such as Axis Zipstream does
  • Choose a bitrate control mode for a given requirement

Why compression matters

An uncompressed 1080p stream at 30 fps is roughly 1.5 Gbps (1920 ร— 1080 pixels ร— 24 bits ร— 30 fps). A typical compressed surveillance stream at the same resolution is a few Mbps, so the codec is doing a few-hundred-to-one reduction. Codec choice and settings drive network load, storage cost and server count more than almost any other decision.

Frames and the group of pictures (GOP)

GOP length = 10 (one I-frame every 10 frames)IPPPPPPPPPIPPPPPPPPPBar height โ‰ˆ frame size. I-frames are full pictures; P-frames only store changes from the previous frame.Longer GOP = fewer large I-frames = lower bitrate, but slower seek and more loss if a frame is damaged.
A GOP of 10 frames: one large I-frame followed by smaller P-frames.
I-frame (intra / key frame)
A complete picture compressed on its own, like a JPEG. Large. Every playback or seek must start from one.
P-frame (predicted)
Stores only what changed since a previous frame using motion vectors. Small when the scene is static.
B-frame (bi-predictive)
References past and future frames. Saves bits but adds latency; many surveillance cameras do not use B-frames for live streams.
GOP length
Frames from one I-frame to the next. At 30 fps, GOP 30 = one I-frame per second. Some vendors express it as an I-frame interval in seconds.

Longer GOPs cut bitrate in quiet scenes, but playback has to decode from the previous I-frame, so seeking is slower and a corrupted frame affects more of the video. Many VMSs also use I-frames for thumbnails and fast-forward, so extremely long GOPs can make investigation tools feel sluggish.

The codecs

CodecStandardRelative efficiencyStrengthsWatch out for
MJPEGSequence of independent JPEGsLowest (every frame is an I-frame)Simple, every frame stands alone, very low decode latency, easy to extract stillsVery high bitrate and storage; rarely appropriate for continuous recording
H.264 / AVCITU-T H.264 | ISO/IEC 14496-10BaselineUniversal support in cameras, VMSs, browsers and hardware decodersHigher bitrate than newer codecs at the same quality
H.265 / HEVCITU-T H.265 | ISO/IEC 23008-2Designed to roughly halve bitrate vs H.264 at equal quality; real-world surveillance savings vary by sceneLower storage and bandwidth, especially at 4KMore decoding load on clients; patent licensing landscape is complex; check VMS, browser and mobile client support
AV1Alliance for Open Media (AOMedia)Comparable to H.265 (per Axis' implementation)Royalty-free intent, strong browser and WebRTC support, good fit for cloud and web clientsNewer in surveillance; requires camera SoC support (Axis: ARTPEC-9 or later) and VMS/client support
Verified example: AV1 in Axis cameras

Axis supports AV1 encoding on devices with the ARTPEC-9 system-on-chip or later (Main Profile, 8-bit). Axis states its AV1 implementation offers compression efficiency comparable with H.265, works with Zipstream and signed video, and is supported by VMS partners including Genetec and Milestone as well as AXIS Camera Station. Check each camera's datasheet: not every Axis model has ARTPEC-9.

Smart codecs: Axis Zipstream as the example

"Smart codec" technologies sit on top of H.264/H.265/AV1 and decide where to spend bits. They remain standards-compliant streams, so the VMS decodes them normally. Axis Zipstream is a well-documented example and consists of three algorithms:

Zipstream featureWhat it does
Dynamic ROI (region of interest)Identifies regions with objects, people or motion and keeps forensic detail there while compressing static background harder. The ROI expands, shrinks and moves automatically.
Dynamic GOPSends bandwidth-heavy I-frames less often when there is no motion, extending the GOP up to a configurable maximum.
Dynamic FPSLowers the encoded frame rate in static scenes; the camera still captures and analyses at full frame rate and raises fps when motion appears.

Axis recommends dynamic GOP and dynamic FPS when Zipstream strength is set to 30 or higher. Other manufacturers have their own smart-codec features; compare them by measuring bitrate on the same scene, not by datasheet percentages.

Smart codecs and storage estimates

Smart codecs make bitrate scene-dependent. A quiet corridor may drop dramatically overnight while a busy lobby barely changes. Base storage estimates on measured averages from a pilot camera in a representative scene and keep headroom for busy periods.

Bitrate control modes

ModeBehaviourGood forRisk
CBR โ€“ constant bitrateEncoder holds a fixed bitrate; quality drops when the scene gets busyPredictable network links (e.g. wireless backhaul), fixed-budget designsSmearing/blockiness exactly when something happens
VBR โ€“ variable bitrateEncoder holds a quality (compression) level; bitrate rises and falls with scene complexityForensic quality on wired LANsBitrate spikes in rain, snow, night noise or busy scenes; harder to size storage
MBR โ€“ maximum bitrateVBR with a ceiling; quality is held until the cap is reached (Axis term)Most enterprise designs: quality with a safety limitCap set too low behaves like CBR at the worst moments
ABR โ€“ average bitrate (Axis)Targets an average over a retention period, letting short peaks throughHitting a storage budget over days/weeksRequires the camera to plan over time; check VMS support

What really drives bitrate

  • Scene motion and complexity: trees, traffic, rain and crowds cost far more than an empty hallway.
  • Noise in low light: sensor noise looks like motion to the encoder, so night bitrate often exceeds day bitrate. Good low-light sensors and noise reduction lower it.
  • Resolution and frame rate: roughly proportional, but not linear; doubling fps rarely doubles bitrate because P-frames get smaller.
  • Compression level / quality setting and GOP length.
  • Overlays and timestamps add a small amount; privacy masks can reduce it.

Multiple streams

Most cameras can produce several simultaneous streams (for example a high-resolution recording stream and a low-resolution live stream). Security Center lets you assign stream usage such as live, recording, remote and low/high resolution to different streams, so operators watching a 16-tile wall do not pull 16 ร— 4K streams. Design the streams on purpose; do not accept the default.

Common mistakes

  • Using MJPEG for continuous recording and being surprised by the storage bill.
  • Sizing storage from a daytime bitrate measurement only; night noise and weather can double it.
  • Setting a GOP so long that seeking and thumbnails become painfully slow in investigations.
  • Switching a site to H.265 or AV1 without checking that the VMS, mobile app, web client and video walls can decode it.
  • Choosing CBR on a LAN and getting smeared video during the one incident that matters.
  • Comparing smart codecs by marketing percentages instead of measured bitrate on the same scene.

Check your understanding

1.Which frame type can be decoded entirely on its own?

An I-frame (key frame) is a complete picture. P- and B-frames depend on other frames.

2.A camera runs at 30 fps with a GOP length of 60. How often is an I-frame sent?

60 frames รท 30 fps = one I-frame every 2 seconds.

3.Which bitrate mode holds quality but caps the bitrate at a ceiling?

MBR (maximum bitrate) behaves like VBR until it hits the configured ceiling.

4.Which Zipstream algorithm reduces how often I-frames are sent when the scene is static?

Dynamic GOP lengthens the GOP when there is little or no motion.

5.Why is night-time bitrate often higher than daytime bitrate?

Low-light noise changes pixels frame to frame, so P-frames get bigger.

6.Name two things to check before standardizing a site on H.265 or AV1.

Decoder support in every client that will view video (VMS desktop client, web client, mobile app, video wall/decoders), client CPU/GPU decode capacity, camera support for the codec, and for AV1 whether the camera SoC supports it (Axis: ARTPEC-9 or later).
Progress is saved in this browser only.