Video Compression: Formats, Codecs, and Containers

Let’s talk about codecs, which is key in compressing audio AND video files. First, bear in mind that compression can be either lossless or lossy. The quality between the two can be seen if you know what to look for, and in some more lossy scenarios visuals become grainy, with flat or muffled sound and can impact how the video plays.

In order to compress a video, a corresponding codec is required in the output file, or container (we’ll get to that). Codecs are bits of software that interpret the compressed video so it can be stored and played back. Most web browsers and mobile devices have adopted compatibility to the almost ubiquitous h.264 codec, which can be used to playback high-definition digital video content.

A quick note on bit rate, which refers to the amount of data stored for each second of media that is played. In short the formula is: the higher the bit rate means there will be less compression and overall higher quality… and consequently the larger the file size.

Video files come in a container which packages the codec along with the video. You can think of the container in the traditional sense like a food to-go box that contains your video, audio, metadata (captions, or information that maps the video parts for playback). It bears a file extension that may seem familiar: AVI, MOV, or MP4… where MP4/h.264, is currently the most widely adopted format for high definition video.

More on MP4/h.264 soon… for now, digest.