Choosing the right file format for CCTV footage affects video quality, storage requirements, playback compatibility, and forensic usability. This guide covers the major container formats and codecs used in surveillance systems.
Containers vs Codecs
A container format (like MP4 or AVI) wraps video, audio, and metadata together. A codec (like H.264 or H.265) determines how the video is compressed inside that container. Modern CCTV systems typically use H.264 or H.265 video inside an MP4 container.
Container Formats
AVI (Audio Video Interleave)
AVI was introduced by Microsoft in 1992. It stores data with minimal compression, producing large files with high quality.
Best for: Short-term forensic clips where detail matters more than storage.
MP4 (MPEG-4 Part 14)
MP4 is the dominant format in modern surveillance. It balances compression efficiency with broad compatibility across NVRs, mobile apps, and cloud platforms.
Best for: Long-term recording, remote viewing, and multi-platform workflows.
MOV (QuickTime File Format)
MOV was developed by Apple and is common in post-production workflows. Some NVRs export to MOV for editing or archival purposes.
Best for: macOS-based workflows and footage destined for video editing.
MKV (Matroska Video)
MKV is an open-standard container that can hold multiple audio tracks, subtitle streams, and chapter markers in a single file.
Best for: Multi-camera exports or archiving footage with metadata.
WMV (Windows Media Video)
WMV was designed by Microsoft for Windows-based playback. It achieves small file sizes but at a noticeable quality cost.
Best for: Legacy Windows-only DVR systems.
FLV (Flash Video)
FLV was widely used for web streaming in the 2000s. It is largely obsolete since Adobe ended Flash support in 2020.
Best for: Legacy webcam or browser-based surveillance interfaces.
3GP
3GP was developed for 3G mobile phones. Some older mobile CCTV viewers use this format.
Best for: Very old mobile-centric surveillance apps.
Compression Standards (Codecs)
H.264 (Advanced Video Coding)
H.264 is the most widely deployed video compression standard in CCTV. It can reduce file size by up to 50% compared to MJPEG while maintaining comparable quality.
Best for: HD recording and continuous 24/7 surveillance on existing hardware.
H.265 (High Efficiency Video Coding)
H.265 (also called HEVC) roughly doubles the compression ratio of H.264, making it the go-to choice for 4K and multi-channel NVRs.
Best for: 4K cameras, high-channel-count NVRs, and systems with limited storage or bandwidth.
MJPEG (Motion JPEG)
MJPEG encodes each frame as an independent JPEG image. This makes frame-by-frame analysis simple but produces large files since no inter-frame compression is used.
Best for: Applications requiring low encoding latency or easy frame extraction.
RAW / Uncompressed Video
Uncompressed video captures every pixel from the sensor with zero compression. Files are enormous but offer maximum evidentiary value.
Best for: Forensic evidence, courtroom exhibits, and investigative analysis.
Proprietary DVR Formats
Many DVR manufacturers use proprietary container formats that embed metadata such as timestamps, motion events, and camera IDs. These files require the vendor's software or player for playback.
Best for: Seamless playback within the manufacturer's ecosystem.
Storage Considerations
Codec choice directly affects storage planning. A 4-channel 1080p system recording 24/7 requires roughly:
Refer to the H.264 reference implementation or x265 project for technical depth on these codecs.