This article will explain how the CCTV codecs work and what’s their purpose in the security systems. When the video is generated by a CCTV camera, is necessary to compress it to save bandwidth and storage space. Video compression is the process of using a codec to go through your video files to reduce or eliminate unnecessary files. This makes your video files smaller, so you can store more video on your NVR hard drive or camera’s MicroSD card.

Almost all IP surveillance cameras come with a built-in video compression codec. A CCTV codec works just like a standard codec created to reduce the video size by looking for redundant information to eliminating it.

We can divide the word CODEC into two parts: CO = Compression; DEC = Decompression. The side that generates the video will compress it before sending, while the other side that receives it will decompress to display the video correctly in a computer, mobile phone, tablet or other device. In an analog system, the DVR (Digital Video Recorder) converts the signals from analog to digital and uses an algorithm to compress the video before record it on the Hard Disk (HD) or transmit live to a computer or other device.

Compression in a system with Analog cameras and DVRs

This diagram shows compression works in DVRs.

This diagram shows compression works in DVRs.

The DVR converts the signal from analog to digital and then compresses the video by using a CCTV codec algorithm that will discard unnecessary video information to save as much storage space as possible.

Compression in a system with IP cameras and NVRs

This diagram shows how compression works in an IP surveillance system.

This diagram shows how compression works in an IP surveillance system.

In an IP surveillance system, the IP camera is in charge of the video digitization and compression, so it sends the video directly to the NVR (Network Video Recorder) to be recorded/stored on the hard drive. The NVR receives the footage already converted and compressed. It can be stored locally on the NVR or to any other computer on the network.

The most common CCTV CODECs are:

H.264 compression – this is the newest, and most efficient video compression codec, and it works by taking small groups of frames and evaluating them together as a series to eliminate duplicate content that appears in each frame without changing
MJPEG compression – also called motion JPEG, works by evaluating each frame of the video, compressing them, and sending them as individual JPEG images
MPEG4 compression – this is an older style of video compression, and has largely been replaced by H.264

If you are also recording audio with your surveillance video, the audio files will be compressed separately from the video. For cameras that have multiple video streams, your camera may also be able to use multiple video compression codecs or different levels of compression. This allows you to configure on stream for mobile viewing, one stream for live viewing, and one stream for long-term storage.

Why video compression is important?

Video compression is a valuable tool when your video surveillance system has bandwidth and storage limitations, since video files can be extremely large if they are long clips or recorded in megapixel resolution. If your video is compressed too much, though, the image quality can be compromised— however there are settings that can help you find the best balance of compression and image quality. By compressing the video files your system can more easily send the files over your network without significant delays or slowing it down, which is especially important for mobile viewing with a smartphone or tablet.

Compressed video files also take up less space on your hard drive, allowing you to store more videos or keep the files for longer periods of time. Video compression codecs are available in video surveillance systems and IP security cameras from top manufactures including Dahua, Hikvision, Axis, Mobotix etc.