The Differences between Video Codecs and Video Containers

Cecilia Hwung
3 min readSep 28, 2020
Video Container vs Codec

How many of you have posted such questions in forums like which format is best for video editing, for watching on iPhone, or for uploading to YouTube? Did you get confused by the answers involving terms like video codec and container? Sometimes, what makes it professional makes it hard to understand. Here we try to offer you an easier access.

To sum it up:

  1. It is the video coding format that decides whether it can be accepted by players or not.
  2. Two seemingly similar-format videos may get the opposite playback results.

What Is Video Codec?

Video codec, the video coding format, refers to the method by which digital video gets compressed and decompressed. There are both lossy and lossless compressing algorithms. Common coding formats are as follows.

H.26X series
H.261: Main for old video conferencing and video telephony products.
H.263: Main for video conferencing, video telephony, and web video.
H.264: Compression standard widely used in high-quality video encoding and streaming.
H.265: The successor to H.264, also known as HEVC. H.265 is known for high compression ratio, keeping nearly the same quality as H.264 at half the size. Also it supports 4K resolution or even 8K (8192 x 4320).

MPEG series
MPEG-1 Part 2: Main for VCD and some online videos. The quality is roughly the same as that of VHS tape.
MPEG-2 Part 2: Aka H.262, used on DVDs, SVCD, and most digital video broadcast systems and cable distribution systems.
MPEG-4 Part 2: Can be used on network streaming, broadcast, and media storage.
MPEG-4 Part 10: Known as both H.264 and AVC.

Other codecs include: AMV, AVS, Bink, CineForm, Cinepak, Dirac, DV, Indeo, Video, Pixlet, RealVideo, RTVideo, Sheer, Smacker, Sorenson Video, Theora, VC-1, VP3, VP6, VP7, VP8, VP9, WMV.

What Is Video Container Format?

Popular video container formats include MP4, AVI, MPEG, VOB, MKV, etc. As its name reveals, video container is used to store media information. Here media refers to video, audio, subtitle and some others. Take a look at the following widely used video container formats.

AVI: Audio Video Interleaved, launched by Microsoft Corporation in1992. Supports alpha channel and can be used for ultra high quality lossless videos, but has huge file size. Errors like “video cannot play” and “video plays only sound without images” may happen for various compression standards in different ages.

MPEG: MPEG is the international standard for motion image compression algorithms, including MPEG-1, MPEG-2, and MPEG -4. MPEG-1 and MPEG-2 are rarely used now. MPEG-4 is designed for high-quality streaming media, featuring optimal image quality with minimal data. The best thing of MPEG-4 is it encodes video in smaller size but keeping DVD-level quality.

Common Video Container Formats and Its Extensions

Common video container formats and file extensions

If you have two MP4 videos captured by different devices. One plays well in VLC on your Windows 10 computer, while another crashes. That might be caused by incompatible video codec/container issue.

Frequently Asked Questions

1. What is file extension?

Files in Windows systems have extensions such as xx.doc, xx.wps, xx.psd, and so on, by which applications identify and correlate these files in order to finally open them. For example, when you double-click on xx.doc file, the system would have Microsoft Office to open it, instead of Photoshop.

2. What is video extension?

Common video file extensions like .mp4, .avi, .mpg work the same way. They are associated with video players installed on your computer. Simply renaming the extension, like from .avi to .mp4, won’t change what the video really is (the encoding way). But people usually recognize different file types only by the extension.

What is video file extension

--

--

Cecilia Hwung

Tech writer on AI, hardware, and software. I share reviews, trends, and tips. Visit me at videoproc.com for the latest in multimedia.