A media container format (or sometimes called a container format) is a format that can contain various types of data, such as audio and video data. The data is compressed using a codec.

A codec (a composite of encoder and decoder) is an algorithm used to compress and / or decompress a multimedia data stream in order to reduce the number of bytes required to store or send.

Some container formats are limited to audio, such as WAV files for Windows, AIFF for Mac, and XMF; some are limited to still images such as FITS and TIFF. There are also containers that are flexible; it can contain various types of audio, video, and other media such as ASF files for Windows, MP4, and Matroska. The most common multimedia containers are:

  • 3GP: used by mobile phones
  • ASF – standard WMA and WMV container
  • AVI: standard Windows container
  • Matroska – open standard container
  • MPEG: standard container for MPEG-1 and MPEG-2
  • MP4 – standard container for MPEG-4
  • Ogg – Free and open standard container for Vorbis (audio) and Theora (video) codecs

The distinctions between the different container formats arise from five (5) main issues:

  • Popularity. Wide support container.
  • General expenses. Example: a two hour movie can be 3MB larger in AVI than in Matroska (MKV). The overhead is the difference between AVI and MKV, which is 3MB.
  • Supports new codec features and functions. Some older container formats do not support the codec function, such as VBR audio and B-frames.
  • Support for subtitles, chapters, meta tags, and user data.
  • Media streaming support.

Here’s a comparison of the different popular container formats today (from Wikipedia).

3GP
Support for frames B; variable audio bit rate; variable frame rate; 3GPP Timed Text Captions; supports MPEG-4 Part 2, H.263 and H.264 / MPEG-4 AVC video formats; Supports AAC, AMR-NB, AMR-WB +, AMR-WB, HE-AAC and HE-AAC version 2 audio formats

Advanced system formats
Support for B-frames, chapters, subtitles, and metadata / tags; variable audio bit rate; variable frame rate; supports almost any video format via DMO or VFW; supports almost any audio via ACM or DMO

AVI
Support for frames B; variable audio bit rate; variable frame rate; chapters and subtitles are through a third party modification; supports almost any video format via VFW; supports almost any audio format through ACM

Matroska (MKV, MKA)
Support for B-frames, chapters, subtitles, and metadata / tags; variable audio bit rate; variable frame rate; supports almost any video and audio format

MPEG video file (MPG, MPEG)
Support for frames B; variable audio bit rate; variable frame rate; supports MPEG-1, MPEG-2 video formats; Supports MPEG-1 Layers I, II, III (mp3) audio formats, other formats only in private streams

MP4
Support for B-frames, metadata / labels, and menus; variable audio bit rate; variable frame rate; chapters a) in a specially formatted text track, and b) in the user data atom cannot work together with the scene description or segment descriptor; ttxt and BIFS subtitles, VobSubs subtitle with private objectTypeIndication does not work with sceneDescription; Supports Dirac, H.263, MPEG-4 ASP, H.264 / MPEG-4 AVC, VC-1 and other video formats; supports AC-3, ALS, Apple Lossless, SLS, MPEG-2/4 (HE) -AAC, MPEG-1/2 Layers I, II, III (MP3), Vorbis (with private objectTypeIndication) and other audio formats

Ogg
Support for B-frames, chapters and subtitles Ogg Writ and Ogg Kate; variable audio bit rate; variable frame rate; supports almost any video format via VFW and supports almost any audio format via ACM

With a growing number of media containers, it’s no wonder that video and audio converters are popular these days. Some converters can convert almost all different types of audio or video formats, while others are limited to today’s popular formats.