EaseFab Studio, Share Wonderful Software!
To Make Your Digital Life Easier!

  • 100% Satisfaction Guarantee
  • |

Codec vs Container: What Is a Codec? What Is a Container?

A digital video file usually consists of two parts. These two parts are called the "Container" and the "Codec". The distinction between codecs and container file formats is often ambiguous. And they are frequently and mistakenly used interchangeably. This page attempts to clarify this distinction briefly and without going into technical details.

What is a codec?

Simply put, a codec is a method for encoding and decoding data and more specifically, a protocol for compressing data, especially video. There are many codecs available out there, each with their strengths, weaknesses and peculiarities, and choosing the right codec with the right settings for the right situation is close to be a form of art in itself. Currently h.264 is the predominant codec on the web.

What is a container?

In comparison, a container is what holds the grouping of compressed video as defined by the codec. A container is also referred to as a format. The container takes care of packaging, transport, and presentation. Containers "contain" the various components of a video: the stream of images, the sound, and anything else. For example, you could have multiple soundtracks and subtitles included in a video file, if the container format allows it. Example of popular containers are OGG, Matroska, AVI, MPEG.

While there are literally hundreds of container/codec combinations, there are two predominant pairings. The MPEG4 container with the h.264 gained widespread popularity after it was adopted as the leading format for iOS devices. Similarly, Google's support for the WebM container and the VP8 codec in the chrome browser ushered in an era of popularity for this combo.

As the digital video landscape evolves, so do the types of codecs and containers. This evolution is usually marked by increased quality and lower file sizes. As screen size and resolutions increase, an evolution that makes containers and codecs more efficient is only natural. That's why we're working hard to offer support for the latest broadcast codecs including MPEG2 TS, Avid DNxHS, Apple ProResHD, Sony HDCAM/XDCAM, and Panasonic DVCProHD.

So there you have it. Now that you understand the differences between codecs and containers, you can work towards finding one that best suits your video project. If you want to learn more about containers and codecs, you should probably look at Wikipedia's page on containers and codecs.

The relationship between containers and codecs

codecscontainers.jpg

Instructables