Video compression affects network capacity, recording retention, playback performance, and the detail available after an incident. A codec encodes video into a compressed form and decodes it for viewing. The best setting is the one that preserves the information you need while working reliably throughout the camera, recorder, viewing, and export chain.

Storage cost matters, especially when many cameras record continuously. However, a small file is not useful if a face, hand movement, or license plate has become unreadable. Compare codecs using recorded footage from the real scene, not a general claim that one format always saves a fixed percentage.

How video compression works

Spatial compression reduces redundancy within an image. Temporal compression uses similarities between images over time. A static wall, for example, need not be described in full in every frame when a previous image can help predict its appearance.

Motion compensation divides image information into blocks and predicts how those blocks relate to reference pictures. Motion vectors describe displacement, while additional residual data represents differences that prediction did not explain. The stream contains more than a list of object movements: it must provide enough information for the decoder to reconstruct the image.

Prediction does not necessarily mean that the codec understands people, cars, or other semantic objects. Some surveillance-specific systems add object-aware or region-of-interest processing, but basic block-based compression is a different operation from recognizing a person or tracking an identity.

Quantization reduces the precision of encoded information and is an important source of loss in common surveillance codecs. Adaptive methods can allocate different amounts of data to different regions or conditions. Stronger compression of a quiet background may save space, but aggressive settings can also erase a small, distant target or create visible artifacts.

Lossless compression preserves the represented information exactly. Most practical surveillance streams use lossy compression to keep data rates manageable. “Archived” footage is not automatically lossless merely because it has been saved. The archive normally retains the quality of the encoded stream that was recorded.

Bitrate, quality, and file size

Bitrate is the amount of encoded data per unit of time, commonly expressed in megabits per second, or Mb/s. It determines data volume directly, but it is not an independent quality score. Two codecs or two scenes can look different at the same bitrate, and a higher bitrate cannot repair poor focus or motion blur already present in the source image.

  • Constant bitrate: aims to maintain a target rate, making network and storage planning more predictable. Quality may vary when scene complexity changes, and actual implementations may still allow short-term variation.
  • Variable bitrate: allows the rate to change with scene complexity and quality targets. It can save space in quiet scenes but requires planning for peaks and average consumption.
  • Capped or average-rate modes: combine quality and rate controls in implementation-specific ways. Read the camera documentation rather than relying on the mode name alone.

A crowded checkout area often needs more data than a simple static scene at similar settings. A perimeter view is not automatically a low-bitrate application: trees, rain, low-light noise, moving vehicles, or small distant targets can be demanding. Decide from representative day and night recordings.

For capacity planning, a continuous 1 Mb/s stream produces approximately 10.8 GB per day in decimal units. Multiply the measured aggregate average bitrate by 10.8 and by the number of retention days. Include recorded audio and additional streams. Allow for overhead, variability, and usable storage after formatting or redundancy.

Codecs are different from streaming protocols

The codec describes how pictures are represented. Other standards control sessions, transport media, or help devices interoperate. Several may operate together in one camera connection, so they should not be treated as competing compression formats.

RTSP

Real Time Streaming Protocol controls media sessions, commonly including setup and playback requests. It is used for live camera streams as well as supported recorded-media access. Pause, seek, and playback-speed operations depend on the server and client; their availability should not be assumed for every live stream.

ONVIF

ONVIF defines interoperability specifications and profiles for devices and clients. It is not a video codec. Profile T addresses advanced video streaming, including H.264 and H.265-related capabilities, imaging settings, and events. Some features are conditional on device and client support.

Check the exact product, firmware, profile, and required functions. A broad “ONVIF compatible” statement does not prove that every recording, audio, analytics, or playback feature will work across manufacturers. Test the actual camera-recorder combination.

WebRTC

WebRTC supports real-time communications in browsers and other applications. It can provide low-latency media with congestion handling and encryption, but a practical deployment still needs signaling and may need relay infrastructure. A peer-to-peer connection is not always possible through every firewall or network arrangement.

Browser playback may also require a gateway or transcoding if the camera's native codec is unsupported by the client. “No browser plug-in” does not mean “no servers or processing anywhere in the system.” Check the complete delivery path.

TCP

TCP provides an ordered, reliable byte stream while a connection is functioning, using retransmission when data is lost. On an impaired link, retransmission and buffering can increase latency. Reliability at the transport layer does not mean that an application can never disconnect or that every video frame will arrive before its viewing deadline.

RTP

Real-time Transport Protocol carries media with information such as sequence numbers and timestamps. RFC 3550 explicitly does not promise timely delivery or quality of service. RTP can support real-time applications, but it does not eliminate delay, packet loss, or network congestion.

Vendor remote-access services may simplify connections without a fixed public IP address. Their use of direct connections, relays, or cloud infrastructure varies. Evaluate authentication, encryption, service dependence, and bandwidth rather than assuming every “P2P” feature means a direct server-free link.

Hardware and software encoding

Many IP cameras use a dedicated system-on-chip with hardware encoding blocks. This can provide efficient real-time compression within the camera's power and thermal limits. Servers and workstations may use software encoders or supported hardware acceleration for transcoding, export, or other processing.

Technologies such as NVIDIA NVENC, Intel Quick Sync, and AMD video engines are examples associated with suitable computing platforms; they are not a list of chips universally installed inside surveillance cameras. The available codecs, profiles, resolutions, and simultaneous sessions depend on the particular hardware and software.

Recording an incoming compressed stream, decoding it for display, and re-encoding it are different workloads. A server may save many streams efficiently while struggling to display them all at full resolution. Test the viewing and export workload as well as recording throughput.

Common codec families

MJPEG

Motion JPEG represents video as a sequence of individually compressed JPEG images. Because frames do not depend on motion prediction from neighboring frames, frame-by-frame access is relatively straightforward. This can be useful for particular integrations or image-processing workflows.

The tradeoff is generally higher bandwidth and storage than efficient inter-frame codecs at comparable visual quality. There is no universal 1:5 compression ratio, and image quality is not inherently poor. JPEG quality settings and image complexity determine the result. Motion does not create inter-frame savings, but changed scene content can still change individual JPEG sizes.

Independent frames also do not eliminate every error: a corrupted frame, missing packet, or failed recorder remains a problem. Verify actual device support and any applicable licensing conditions rather than assuming universal compatibility or a blanket license-free status.

MPEG-4 Part 2

Older surveillance equipment may list “MPEG-4” to mean MPEG-4 Part 2 formats such as Advanced Simple Profile. These use prediction between pictures to reduce repeated information. Intra-coded pictures and supported predictive picture types help reduce bandwidth compared with sending every image independently.

MPEG-4 is a family of standards, so the label can be ambiguous. MPEG-4 Part 2 and MPEG-4 Part 10/AVC are not the same codec. Identify the exact format when connecting legacy equipment or converting an old archive. Compression is normally lossy even when the visual difference is small.

H.264 / AVC

H.264, also called AVC or MPEG-4 Part 10, is widely supported in surveillance systems and playback software. Its combination of compression efficiency and compatibility often makes it a practical choice where older clients or export recipients must play the footage easily.

H.264 uses macroblock-based coding and prediction tools. A 16-by-16-pixel macroblock can be subdivided for different operations. It does not always encode one reference frame followed by exactly twenty-four other frames. The group-of-pictures structure, reference choices, frame rate, and keyframe interval depend on the encoder and its configuration.

A longer keyframe interval may reduce overhead in some scenes, but it can affect seeking, startup, and recovery after missing data. Shorter intervals can improve responsiveness at the cost of additional data. Use settings supported by the recorder and test both normal playback and exported clips.

Claims that H.264 simply halves an uncompressed file are misleading: compression ratios vary dramatically with source format and settings. Compare it with another configured codec at equivalent useful quality, not an undefined uncompressed baseline.

H.265 / HEVC

H.265, or HEVC, is a separate coding standard designed for improved compression efficiency. The ITU recommendation defines the format. Its more flexible coding structure can reduce the bitrate needed for similar visual quality, particularly in demanding high-resolution applications.

HEVC uses coding tree units up to 64 by 64 pixels, not megapixels. Its prediction and filtering tools are more sophisticated than a simple increase in block size. The standard includes 35 intra-prediction modes in the conventional description, including planar, DC, and directional modes; these are coding choices, not camera shooting directions.

Potential savings compared with H.264 are scene- and implementation-dependent. Do not promise an exact fifty-percent reduction for every camera. Decoder support, hardware acceleration, client software, and export compatibility can be more important than a theoretical saving. A supported hardware decoder may handle HEVC efficiently, while a software-only client can require considerably more processing.

Processor instruction sets and parallel-processing tools can help particular implementations, but the codec name alone does not guarantee a camera's latency or throughput. Likewise, scalable coding features are not necessarily available in every product implementing the basic standard.

H.265+ and other smart-codec modes

Names containing a plus sign commonly describe vendor-specific optimization built around a standard codec rather than a single universal new standard. Hikvision's H.265+ white paper describes prediction, noise suppression, and longer-term bitrate control for surveillance scenes.

These methods can reduce data assigned to stable backgrounds while retaining more information about activity. Benefits are often greatest when the background changes little, motion is intermittent, and the camera operates for long periods. Vendor test percentages describe those tests, not a guaranteed saving at every installation.

Check compatibility with analytics, third-party recording, frame-rate settings, playback, and export. Aggressive background or noise processing can affect useful detail. H.265+ is not inherently an audio codec, and a particular product's 4K or 12 MP limit does not define a universal ceiling for the technology. Old promises about future 8K support should not substitute for current product specifications.

Motion wavelets and specialized formats

Wavelet-based approaches represent image information at different scales and can appear in specialized or historical video systems. “Motion Wavelets” alone does not identify a universally supported surveillance interchange format. Determine the exact implementation, decoder availability, licensing, and export options before adopting one.

There is no substantiated universal claim that such a format is new or produces files five to ten times smaller than all alternatives at equal quality. Metrics such as PSNR can compare reconstructed images with a reference, but no particular “checker” program is required to decode every wavelet stream. Numerical scores should accompany visual review of the details that matter.

Match the settings to the scene

SituationPriorityWhat to test
Checkout or transaction viewHands, items, and relevant fine detailMotion, compression artifacts, timestamps, export
General sales-floor overviewMovement and incident contextBusy periods, occlusion, night lighting
Outdoor perimeterSmall targets and changing conditionsRain, foliage, low-light noise, peak bitrate
Legacy viewing clientsReliable playbackSupported codec, profile, and decoding load

Financial or other regulated facilities should define their actual recording and retention obligations rather than assume one universal “maximum quality” rule. Preserve the details needed for the task, measure the resulting load, and document the settings that passed the test.

When comparing security cameras and recording systems, check the entire workflow: capture, transport, recording, search, playback, and export. A codec is successful when it saves resources without preventing that workflow from delivering useful evidence.

Operator reviewing video on a desktop workstation.
Operator reviewing video on a desktop workstation.
Shop this topic

Related products from Safsale

Continue from Academy guidance to live equipment and components available on Safsale.

Browse Surveillance Cameras