Home > Media Converter > Video Codec vs Container Format

Posted by Jordi D. Rodríguez - Contact Author

Differences between Video Codec and Video Container Format

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 codec and container? Sometimes, what makes it professional makes it hard to understand. Here we try to offer you an easier access.

In a nutshell, it is the video coding format that decides whether it can be accepted by players or not. Two seemingly similar-format videos may get the opposite playback results. For example, you have two MP4 videos captured by different devices. One plays well in VLC on your Windows 10 computer, while another crashes. How is that? We'll explain it later.

Previously - What Is Video Extension?

Let's start with some other extensions you are familiar with. 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.

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.

Video file extension
Video file extension

Part 1 - 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
File extension: .avi
General: Audio Video Interleaved, launched by Microsoft Corporation in1992.

Pros: Supports alpha channel and can be used for ultra high quality lossless videos.
Cons: 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
File extension: .mpg, .mpeg, .mpe, .dat, .vob, .asf, .3gp, .mp4/ b2, etc.
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.

Video container format
Video container format

Common Video Container Formats and Its Extensions

Video container format

File extension

MP4

.mp4

AVI

.avi

MKV - Matroska

.mkv, .mk3d

MPEG

.mpg, .mpeg

FLV - Flash Video

.flv

QuickTime

.mov, .qt

WebM

.webm

3GP, 3GPP

.3gp

ASF - Advanced Systems Format

.asf, .wmv

M2TS - BDAV MPEG-2 transport stream

.m2ts

Part 2 - 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, Smacke r, Sorenson Video, Theora, VC-1, VP3, VP6, VP7, VP8, VP9, WMV.

ABOUT THE AUTHOR

Jordi D. Rodríguez

Jordi was an amateur tech enthusiast, but now an editor who has published hundreds of stories covering video editing, hardware acceleration, software review and how-tos. He is more like a "tech support" with adventurous soul, eagerly grabbing cutting-edge video technologies off in a professional yet easy-to-understand way. Enjoys gliding, diving, etc.

Home > Media Converter > Video Codec vs Container Format