What are video codecs and how do they work?

Video codecs: Digital video has come a long way since the early 2000s. We’ve seen picture quality improve leaps and bounds, in tandem with the introduction of new display technologies like OLED. As consumers too, we have higher expectations than ever before, both at home and on portable devices such as smartphones and tablets. Codecs enable all of this, compressing large swathes of raw information into a video file that’s much more manageable for storage, broadcast, and distribution.

< type="image/webp" />“Vb” title=”oppo reno3 pro camera app” src=”https://www.tipsclear.com/wp-content/uploads/2021/12/oppo_reno3_pro_camera_app.jpg” alt=”oppo reno3 pro camera app” />

Over the years, major industry players like Google, Intel, and Apple have been interested in new ways to compress and package video. You may have heard of YouTube adopting the new AV1 standard, for example, and newer iPhone models targeting professional videographers with Apple’s ProRes codec. Indeed, there are at least a handful of different standards currently in use, each with their own strengths and weaknesses.

With so many video codecs on offer then, it’s worth discussing what they do, why the digital video industry is still fragmented, and how some of the most popular standards differ from each other. Here’s everything you need to know.

What is a video codec?

< type="image/webp" />“Vb” title=”Huawei Matebook 14 2020 AMD watching a YouTube video” src=”https://www.tipsclear.com/wp-content/uploads/2021/12/Huawei-Matebook-14-2020-AMD-watching-a-YouTube-video.jpg” alt=”Huawei Matebook 14 2020 AMD watching a YouTube video” />

Ryan-Thomas Shaw / Android Authority

The term codec itself offers a pretty big hint to understanding how it all works — it’s simply shorthand for encoding and decoding. Why are videos encoded and decoded, you ask? In simple terms, it’s because they typically carry a lot of raw data.

You may have heard that videos are essentially a series of still images. Old-school movie projectors are the best showcase of this principle. They are physically fed a reel of film and show you 24 frames per second, tricking your brain into thinking it’s a motion picture.

While you could absolutely do the same with digital images instead, the storage needed for so much data is unfathomable. According to Mozilla’s calculations, a single 30-minute video — stored in the form of raw images — would weigh well over 1TB. For context, that’s ten times the total storage capacity of a typical 128GB smartphone.

A single 30-minute video — stored in the form of raw images – would weigh well over 1TB.

To that end, video storage and playback simply is not feasible without using complex compression algorithms in the form of codecs. It’s also worth noting that codecs exist for audio too, for many of the same reasons. Raw and uncompressed video and audio can both quickly balloon in size, making them impossible to edit, store, and distribute.

Related: 10 best video editor apps for Android

How do codecs work?

< type="image/webp" />“Vb” title=”HEVC vs AVC” src=”https://www.tipsclear.com/wp-content/uploads/2021/12/HEVC-vs-AVC.jpg” alt=”HEVC vs AVC” />

While codecs employ several complex compression algorithms, a few basic methods are easy to visualize. For example, what if you only store the information related to changes between one frame and the next, instead of storing full-sized images? That way, a several minutes-long, mostly static scene can be compressed significantly. A person speaking against a fixed background, for example, wouldn’t have much motion, and this is a fairly common scenario in most videos and movies.

You can also take this one step further with motion vectors and compensation algorithms. These can achieve higher compression levels by predicting where a particular pixel ends up in a future frame. If a camera is simply panning horizontally, for example, the codec can tell that a particular pixel will be displaced to the left or right after a few frames.

Codecs aim to deliver an acceptably accurate image at a fraction of the original file size.

Another compression method involves grouping nearby pixels with similar colors. When taken to the extreme, however, this is what causes the infamous “blocky” look in low-quality videos. In this instance, the compressed file simply doesn’t hold enough information for the decoder to reconstruct the original image.

In moderation, these compression techniques — alongside others — can put out an acceptably accurate image at a fraction of the original size. While you inevitably lose some information during compression, it’s a worthwhile tradeoff, to say the least.

Each video codec uses a slightly different approach or method to achieve compression. And as you’d expect, newer codecs are designed to retain or improve picture quality while also reducing file size.

Why do video codecs matter?

< type="image/webp" />“Vb” title=”Video Chatting Apps Stock Photo” src=”https://www.tipsclear.com/wp-content/uploads/2021/12/Video-Chatting-Apps-Stock-Photo.jpg” alt=”Video Chatting Apps Stock Photo” />

From chat a