A video or audio compression component that can both compress and decompress (encode and decode) files. Media formats and players, such as Windows Media, RealMedia, and QuickTime have a selection of codecs built in, and can add additional codecs to support new file formats.
A video codec works like a standard codec, looking for unnecessary information to reduce video size. We can divide the word CODEC into two parts: CO is compression, and DEC is decompression or decompression. The creator of the video compresses the video before it is sent, while the other party decompresses the video for proper viewing on a computer, mobile phone, tablet, or other device.
In an analog system, the DVR-digital recorder converts analog signals to digital signals and uses an algorithm to compress video on the hard disk or stream it live to a computer or other device. By switching from analog to digital, the DVR compresses the videos using some codec algorithms to save as much storage space as possible.
The most common codecs used in CCTV systems are:
MJPEG: Works on a sequence of images
MPEG-4: Works with full and partial video variations
H.264: An evolution of MPEG-4 with a few improvements.
H.265: is the improved version of H.264.
How does the MJPEG codec works;
MJPEG is nothing more than a series of complete images sent in a fast order to give the impression of continuous motion. Let's say we have 5 pictures played in a fast sequence to give the impression of motion. If the camera continues to capture more images, there will be more complex movements in the image. This is the principle of the MJPEG algorithm, which sends the full camera images to the recorder.
The more frames per second sent, the less stuttering will occur in the video, most CCTV projects are calculated using 1 FPS, which is enough to show video with good motion quality without spending too much resources on transmission and storage.
How the MPEG-4 codec works;
MPEG-4CODEC is designed to send video from camera to recorder in an intelligent way, combining and sending full and partial images. The goal here is to save resources by sending the video to the receiver (NVR or computer) responsible for reorganizing and combining the video in full and partial frames (images). The camera sends the first full frame, and then only the moving parts of the image, and so on for other frames.
How do H.264 and H.265 codecs work;
H.264 is nothing but an evolution of MPEG-4, so it uses the same principle but with an improved algorithm that uses less bandwidth for transmission and storage. H.265 and + version codecs, which further compress their videos and become the new standard, can save up to 70% compared to H.264.