Matroska is an advanced, open-source, and expansible container that is still under development. It can contain virtually any sort of video, audio, or subtitle track. Matroska Video and Matroska Audio are the two variants, with the latter having little popularity until now.
- Supports practically every kind of video, audio, or subtitle track.
- AVI support for h.264 is completely hacked and nonstandard, leading to incompatibility in some cases.
- AVI doesn't support Vorbis without major hacks, which incur a huge overhead penalty that makes its use completely unjustified.
- AVI doesn't support Theora
- Open source
- In theory, this means that it can be compatible with almost any Operating System.
- Low overhead.
- A Matroska containing EXACTLY THE SAME as an AVI will be smaller and faster than it. KEEP THIS IN MIND - Matroska is SMALLER and FASTER. It's BETTER for older computers. (Certainly, the difference - especially in speed - is practically irrelevant. But it is there. So next time someone says mkv is slower, you can flame them.)
- Supports anamorphic video.
- AVI can do it if it's encoded directly into the video bitstream, but only if the codec supports it. It's generally considered a bad thing to do, and won't play back correctly on most places.
- Why anamorphic? Anamorphic allows you to retain the most quality in the video with the least space by avoiding a resize. When you have a widescreen DVD, it's 704x480, anamorphised to 16:9. You can either leave it anamorphic and achieve the best quality, or you can upsize it, making file huge and losing some quality, or you can downsize it, losing large amounts of detail.
- Supports Variable Frame Rate video.
- Variable Frame Rate is the ONLY solution to solve hybrid anime that has 23.976 mixed with 29.97 content. AVI doesn't support VFR at all, but it allows you to do a hack to emulate it, by making the video 120 FPS, full of NULL frames. However, this incurs in a huge overhead, making the file much larger than it needs to be.
- Variable Frame Rate is NOT only for DVDs!! Most fansubs could benefit from it. About half of the animes around are actually VFR, and would look better with proper support for it. What fansubs do is simply kill the 29.97 sections, making them 23.976. They probably don't even know that they're doing that, too.
- High error recovery.
- Seeking a corrupt AVI is a nightmare. Matroska works fine most of the time.
- Allows files (such as fonts or even a/v codecs) to be attached to the video file.
- This is particulary relevant for ASS softsubs: without this, you need to make the user download and install fonts separately. Softsubs are important because they let the user switch or disable them, for multiple languages, and because they look much better than hardsubs. They also use less space, by avoiding adding lots of information to video stream. Yet again, Matroska is smaller than AVI.
- Many people argue that softsubs can be stolen, but they often overlook the fact that stealing hardsubs with an OCR program is very easy. Point being: if someone wants to steal your subs, they WILL, whether they're soft or hard.
- Future support for DVD-style menus.
- Supports DVD-style chapters.
- An often overlooked feature - Matroska lets you setup chapters, then you can just press the appropriate key (e.g. Page Down) to skip a chapter. So if an anime has a really annoying opening, just hit the "Next Chapter" key, and you're right at the starting point. It really is that easy.
- Extensively documented (unlike other formats, such as OGM).
- Is still being developed.
- Few programs support it natively.
- Requires the installation of a DirectShow filter to be played on several Windows players.
CPU Usage Comparison
I saved the opening from Hiro's TLB in VirtualDubMod as both AVI and MKV, shut down all programs running in the background and played the files with exactly the same settings in MPC using ffdshow and Haali splitter on my 2 GHz PC.
If your video is jerking or lagging behind the sound, the more probable causes are
- Very high resolutions (like HDTV).
- Softsubs, especially with subtitle effects.
- H.264 video codec (to a lesser extent, also WMV9).
- Misconfigurations or disadvantageous playback software.
- Your slow CPU.
- Shit running in the background or things that go beyond my comprehension.
Why the switch from AVI?
Recently, KickAssAnime has used AVI less in favor of Matroska Video. Several groups did the same (switching from either AVI or OGM), with the notable exception of fansubs. The main reason behind this is that only Matroska supports two features that play an important role in video quality: anamorphism and Variable Frame Rate. Matroska is also generally considered to be superior to the other containers in every aspect.
There are currently three main Matroska DirectShow filters, that can be used to parse a mkv file. These are called "splitters":
- Haali Media Splitter: Similar to Gabest's. Was the first filter to properly support H.264 content and currently included in the CCCP. This is the only filter you should ever consider using.
- Gabest's Matroska Splitter: The first non-official splitter. Used to be stable and well-featured, but is no longer fully compliant to the MKV specifications, and no updates seem likely in the forseeable future. It was included in the KickAssAnime Playback Pack.
- Official Matroska Splitter: Known to have some bugs.