
Differences between AVI, MKV, MP4 which format to choose
The difference between the container formats AVI, MP4 and MKV as well as between the audio / video codecs H.264, H.265, Xvid and WMV
If you download a video from the Internet or record it from your PC, mobile phone or video camera, the video is in most cases in AVI, MP4 or MKV format.
But what’s the difference between these three popular media file formats? Which is better and which should you target?
To answer these questions, you first need to understand what is behind the abbreviations AVI, MP4, MKV. Let us clarify something.
Each media file consists of two parts: the container format and the codec. The container format is the extension of the multimedia file (AVI, MP4, MKV), with which the type of data that can be contained is identified: audio and / or video, subtitles, metadata names, etc. Specifically from the three in question:
-AVI is a container format created by Microsoft in 1992 that can contain one or two audio streams and a video stream, but does not support subtitle formats.
-MP4 was introduced in 2001 and later improved in 2003. It can contain a variety of video and audio streams, as well as subtitles and still images.
-MKV was introduced in 2002 and can contain virtually all types of video and audio codecs as well as multiple subtitle tracks, chapters and DVD menus, etc., making it the most complete of the three.
The data contained in the container file is compressed by a codec, the function of which is to reduce the size of the audio or video file (with data compression) in favor of the portability or portability of the multimedia file in question.
When it comes to container formats, the audio / video codecs are diverse and differ from one another. Regarding video files, the following four are the most popular codecs.
-WMV (Windows Media Video): The codec introduced in 1999 was developed by Microsoft and is part of the Windows Media platform. It can be integrated into the AVI and ASF container formats. Although it supports multiple Windows platforms, the WMV codec is gradually falling out of favor with other, more preformed codecs.
-Xvid (H.263 / MPEG-4 Part 2): This codec, launched in 2001, has been highly valued for its compression features that allow it to compress DVD movies to fit a CD without undue loss of quality.
-x264 (H.264 / MPEG-4 AVC): Introduced in 2003, better known as H.264, is the standard codec used and compressed in Blu-ray discs and for video transmission on YouTube, Vimeo and other portals can create videos in small files with high video quality (video resolution up to 4K).
-x265 (H.265 / MPEG-H HEVC): It was introduced in 2013 and is better known as H.265. It is the successor codec for H.264, but can compress more than twice the data compared to the latter, but guarantees the same quality as H.264 and supporting resolutions up to 8K. H.265 is undoubtedly the near future of codecs, but it hasn’t been widely supported since its release.
Which video container and codec format should I choose?
HandBrake video codec and container format options
In the event that you create a video (possibly to distribute it to the public) and / or convert it using software that allows you to choose the codec and format of the container (e.g. HandBrake, where that previous screenshot), available data, today it is better to point out the MP4 format because it is largely compatible with different devices and the large amount of data it can contain. You can also opt for the larger MKV container, which is constantly growing compared to MP4, but is currently less common.
With audio / video codecs, it is currently better to focus on the H.264 codec, which is the best compromise to get reasonably sized high quality video files while waiting for H.265 more Support is given instead, the WMV remains less and less popular, as does the good Xvid, which can compress files correctly but does not offer the same video quality as the H.264 codec.





