
When facing the world of video, you have to take into account a series of concepts. Thus, we must be clear about the differences between the container format, the video codec, the video specification and the audio codec:
Video formats
Container format
This type of file contains several elements and, at least, video and audio.
The video codec
It is often confused with the video format, but it really is not the same. It is not a mandatory element, since if no codec is specified, the video will be uncompressed, that is, in RAW format. Therefore, a codec is generally chosen to compress the video. And depending on which codec we choose, a better or worse quality will be achieved and, in turn, a larger or smaller size.
The video specification
Each video codec is usually based on a specific video specification (H262, H263, H264, H265), which is nothing more than a set of standards that define how they should behave.
The audio codec
As with the video, we can have several audio channels included in the file. In addition, they are usually also compressed with a certain codec, in order to save space: MP3, WMA, etc.
Video formats
Types of container formats
AVI format
It is probably one of the best known container formats. Corresponds to the English acronym of Audio video interleave. It was developed by Microsoft in 1992 and is one of the most popular formats, perhaps due to its wide use on Windows platforms. Being one of the most basic, it only allows audio and video channels.
Among the codecs that we can find are the DivX codec and the XViD.
MKV format (Matroska)
It is an open source container format, created in 2002.
Among the most common codecs that we can find are H264.
WebM format
It is a project that is based in Matroska. Initially, it was developed by the company On2 Technologies, but in 2010 it became part of Google, which released the source code, guiding it to use with HTML5 as a free standard.
As for the codec used by WebM we find the VP8, which has evolved to the current VP9, giving great performance.
MPG format
Rather than being a format, it is a specification, standardized by the Moving Picture Experts Group (MPEG). MPG files are used to create movies that are distributed on the Internet and, depending on their compression, we find the versions MPG-1 or MPG-2.
MP4 format
The MPEG-3 specification was discontinued and never developed, the MPEG-4 standard later being defined.
The commonly used codecs are x264.
HEVC format
The MPEG-H / HEVC (High Efficiency Video Coding) specification is considered H.265, and doubles the performance of its predecessor, supporting resolutions that could reach 8K (UHDTV).







