How do video codecs work?
Every wondered how video codecs work? The different ways of compressing a video are discussed here.Generally speaking, video codecs are used to compress video data. These codecs come in different forms, such as H.264/AVC, VP8, Predictive codecs, and Inter-frame compression. They help to reduce the amount of video data and allow video files to be compressed more efficiently.
Video files, such as an MP4 or an OGG file, are simply containers for audio and video that has been created and processed using a codec. Think of a codec like a zip or rar file, which has been compressed and needs a player that can read the file. In that example, your computer needs a special program to read compressed rar files. In the same way your computer or player needs to support the codec that was used to compress the video.
We have a number of example video files, including example MP4 files and example AVI files available. The codec that has been used for compression is always available.
Inter-frame compression
Using inter-frame compression is one of the ways to reduce the amount of data in a video stream. The technology has been around for decades, but it's recently become more prevalent thanks to the growth of HD video.
Inter-frame compression uses a variety of techniques to squeeze more pixels into a single frame. The most efficient use of this technology involves exploiting temporal and spatial redundancy. A good example of this is a fast moving image element, such as a moving car. In one frame, that element may move 20 pixels. Inter-frame coding makes use of this information to improve the compression ratio of each frame.
The bits and bytes that inter-frame compression can save depend on the video codec. Most codecs are lossy, meaning that they don't give back the original data. However, there are some lossless codecs that exist for local playback, such as MPEG-2.
Spatial reduction
Using a spatial noise reduction filtering technique in compression of a video signal can increase the quality of a compressed video. Using spatial noise reduction in a video signal requires the use of a directional low pass filter. This is a technique that provides a high compression ratio while retaining acceptable image quality.
Common spatial low pass filters provide an average performance. These filters apply a similar degree of smoothing to the whole image. A special image analyzer controls the coefficients of the spatial noise reduction filter. This allows for a parametric adjustment of the degree of smoothing.
In this paper, we propose a novel spatial resolution adaptation approach that exploits temporal correlations in sequences. This approach enables spatial downscaling transcoding that reduces the bit rate and computational complexity of video compression. It is integrated with the High Efficiency Video Coding (HEVC) reference codec. It was evaluated on 15 high-resolution test sequences and it yielded an average bitrate savings of 4%.
Predictive codecs
Compared with existing video coding techniques, predictive video codecs can improve rate-distortion performance and error resilience. In the present work, a novel predictive video codec is proposed that uses a recursive integer transform, a modified quadtree-based adaptive loop filter, and a temporal prediction method. Its implementation is described and performance results are presented.
In predictive video coding, a predictive encoder sends a compressed bit-stream to a predictive decoder. The predictive decoder produces a reconstruction signal that can be used by the client to recover the corresponding video frame. If a reconstructed video frame at the encoder does not match the corresponding video frame at the decoder, the prediction loop is broken. The prediction approach can spend some additional rate to resynchronize the encoder and decoder side-information.
H.264/AVC
Besides being one of the most commonly used video codecs, H.264/AVC also has a variety of benefits. These include better quality video at lower bitrates and lower storage requirements.
The video coding standard requires a relatively low number of arithmetic operations. This means that the encoding process does not use expensive hardware. It also enables better interoperability.
The standard includes several profiles, which allow manufacturers to create products for different applications. A profile is defined by the manufacturer and is used by the device to decode H.264. It also allows users to specify a profile in a user interface.
Several manufacturers have developed products for H.264/AVC, and they usually come in various forms. They include the baseline profile, the main profile, and the high profile. Each profile has its own performance characteristics and benefits.
H.264 is a base standard that has multiple versions. H.265 and H.266 both exist, and H.265 is quickly becoming the defacto standard for web browsing video.
VP8
VP8 video codec is a video compression technology that is open source and royalty free. It is used for video broadcasting, video conferencing and recording from mobile devices. It is also used in HTML5 video compression. This technology is compatible with modern browsers.
This scalable video coding technology allows adjustment of the video stream characteristics including resolution and frame rate. It also lets the user alter the video bitrate. This enables content to be optimized for 4K streaming.
The VP8 video codec is able to encode motion vectors in an efficient manner. It uses prediction mode information and inter prediction modes. It can also use an alternate reference frame. It uses four different maps per frame. The TM_PRED mode is one of the most common intra prediction modes.