Video Codec VS. Container

With so many video codecs and containers, it’s easy to get confused. Here’s a simple explanation.

Codec (Video Format)

Codec stands for coder-decoder. Video codecs are algorithms for encoding and decoding video data.

  • An encoder compresses video streams, which reduces the amount of data for storage and transmission.
  • A decoder reverses the conversion for playing or editing a video stream.

For simplicity, you can think of a video codec as the video format.

Examples of video codecs are H.261, H.263, VC-1, MPEG-1, MPEG-2, MPEG-4, AVS1, AVS2, AVS3, VP8, VP9, AV1, AVC/H.264, HEVC/H.265, VVC/H.266, EVC, LCEVC

Currently, the most popular codec is AVC/H.264.

Container (File Format)

With respect to video, a container is a data storage. It can include compressed video and audio sequences, subtitles, service information and metadata. It is a package or bundle.

For simplicity, you can think of a media container as the file format.

Examples of media containers are MPEG-1 System Stream, MPEG-2 Program Stream, MPEG-2 Transport Stream, MP4, MOV, MKV, WebM, AVI, FLV, IVF, MXF, HEIC

Currently, the most popular codec is MP4.