AnimeSuki Forum (
-   Playback Help (
-   -   The "What the heck is MKV and what can I do about it?" thread (

TheFluff 2006-01-04 06:26

The "What the heck is MKV and what can I do about it?" thread
Lately, more and more groups, even in the fansub scene, are starting to use MKV. Lots of people doesn't know what an MKV is, what can be done with it, or why anyone would want to use it. This thread is here to remedy that, and prevent further statements like "AVI compresses good, DivX compresses more, MKV compresses morer". It's also here to prove that I can write other things than flames ;)

What is MKV?
MKV, also known as Matroska, is a multimedia container format. This is all well and good, but what does that MEAN? It is NOT a "codec", as some people seem to believe (we'll get to that later).

Consider a fansub episode. It has video and it has audio, both stored together in one file - namely, an AVI (AVI, which stands for Audio-Video Interleave, is an ancient container format invented and developed by Microsoft at some unspecified point in time before the dinosaurs died out). To explain what a container is, I'm going to use an analogy. Think of fansub episode file as a box. It can CONTAIN different things. In most cases, it contains one video stream and one audio stream (in theory, you could have one file with video and an MP3 with audio, and play them at the same time in different programs... but that'd be horribly inefficient, no?), and when you unpack the box in your media player, both the streams play together, and... magic! You get anime!
Now, uncompressed video is HUGE (20+ GB for a 20 minute episode), and so is uncompressed audio, so obviously both the video and audio streams are COMPRESSED in some way. If we open a random fansub AVI and look inside, the odds are great that we'll find MP3 audio inside. Yes, the exact same MP3 as you play in Winamp or your iPod. It works the same in an AVI. As for the video, XviD is the by far most common compression format (or "codec" (CODEC stands for "COmpressor/DECompressor")). It's kinda like MP3, but for video - it compresses the original video to a fraction of its original size, but loses some quality in the process. All common Windows versions has an MP3 decoder builtin, but one needs to install XviD separately (unless one uses players like VLC, which has its own builtin decoders).

After this sidetrack, we get back to MKV. MKV is similiar to AVI - it is another container format. The difference is that MKV is much newer, and can contain all kinds of stuff that doesn't fit into AVI. It also has numerous other features that AVI lacks. There's also the difference that Windows knows how to open the AVI "box" by itself, since the format was developed by Microsoft in the first place. MKV, however, was NOT developed by Microsoft, and Windows does NOT handle MKV's by itself. You need to install a separate filter to "teach" Windows how to deal with MKV's.

Finally... Matroska is an open standard, meaning that it's free for anyone to use, and that all the specifications are public. Its homepage can be found at

Why would anyone want to use MKV instead of AVI?
The added features. As stated above, AVI is ancient. It does not support newer codecs (like the increasingly popular H.264/AVC, or Vorbis, or AAC) without very ugly hacks. There are also other things that you can stick into MKV that AVI does not support. "Soft" subtitles is one example ("softsubs" refers to subtitles that are not encoded into the video, but is displayed on top of it when you play it back, and therefore can be turned off). Another thing that casual users can appreciate is chapters (like on a DVD). There are also several other more technical features that are mostly interesting to encoders, which I won't mention here. Visit the Matroska website for more information, if you are interested.

Well, what do I need to play an MKV then?
If you just want the really simple answer to this question and don't want to bother, get the CCCP, or read the Anime-Suki Playback guide. If you want more detailed information, do read on.

First you need a filter that can "open" the MKV "box". This is called a "splitter", since it "splits" the MKV into its component parts. Currently, the best splitter for Windows (in fact, the only fully functional one) is Haali's Media Splitter. You can read about where to get it and how to install it in the Anime-Suki Playback Guide. Note that some players, like for example VLC, has a built-in splitter - it does not rely on Windows filters to open MKV's. Media Player Classic is another example that has an internal MKV splitter. BE WARNED, however! MPC's internal MKV splitter is not as reliable as Haali's splitter and MAY NOT WORK PROPERLY. My advice is to disable it - this is done by opening the View menu, going to Options -> Filters and unchecking "Matroska".
Also, many codec or filter packs (like, for example, the CCCP) installs the Haali splitter for you. However, some of them installs other, older, not fully functional splitters instead, which may or may not work depending on how lucky you are.

However, only the splitter is not enough. What good does it make if you can open the box but not watch or listen to the stuff inside? You need filters or codecs to handle the contents of the MKV. This might be a problem, since one can basically stick anything from XviD over AC3 to fonts and cats inside MKV's (OK, maybe not cats, but you get the idea). Fortunately, there are simple solutions. One is Anime-Suki's playback guide (read the sticky thread in this forum), another is the Combined Community Codec Pack. Both will install the needed components to handle almost all the common things one can put into an MKV.

Another way to play MKV's is VLC (VideoLan Client). It's a player that has all the necessary components builtin - it doesn't install anything into Windows that other players can use. This has the advantage that you don't have to worry about installing stuff properly, you just install VLC and play. However, VLC is far from perfect. Its subtitle drawing is really, really ugly (if more than one line is displayed at a time, the subtitle drawer draws them on top of each other, making them effectively unreadable), and the fact that all components are builtin means that if it fails to play something, the only thing you can do is updating it and pray that the developers fixed your problem. It is also known to have problems with certain MKV features and some formats that can be stored in MKV.
Update: With the increasing popularity of softsubs, VLC is becoming a very bad choice. Don't use it if you really have to.

I'm not using Windows, silly! What now?
MKV is perfectly playable under both MacOS X and Linux/BSD/Solaris/other *nixes. One possibility is VLC, as mentioned above, since it works just about everywhere. Another, better but slightly more complicated way is MPlayer. MPlayer is a command-line video player, and is therefore rather user-unfriendly. It is however a very competent player which handles most formats flawlessly. Like VLC, it has an internal splitter.
There are several threads about MPlayer and how to get proper softsubs in it:
Guide to compiling and installing MPlayer on Linux and MacOS X
How to play fansubs on your Mac

List of things commonly found in MKV's, and what you need to handle them
All the formats below are handled correctly by both the CCCP and Anime-Suki's playback guide. A full list of formats supported in Matroska can be found here (technicality level warning - the list is almost unuseable to most people).

Video formats
  • DivX - DivX decoder, or ffdshow
  • XviD - XviD decoder, or ffdshow
  • H.264 - H.264 decoder (ffdshow, CoreAVC etc.)
  • Other MPEG4 ASP video - The corresponding decoder, or ffdshow
  • Theora - A Theora decoder (i.e. ffdshow)
Audio formats
  • MP3 and its relatives - MP3 decoder (builtin in Windows)
  • AAC - AAC decoder - CoreAAC or ffdshow
  • AC3 - AC3 decoder, for example AC3filter, or ffdshow
  • Vorbis - Vorbis decoder - CoreVorbis or ffdshow
  • DTS - DTS decoder - i.e. ffdshow. I do not know of any other libdts wrappers.
Subtitle formats
  • VOBSUBs - Subtitle renderer, i.e. VSFilter (some players have builtin subtitle renderers, that may or may not work like you want them to - VSFilter is almost always the best choice)
  • SSA/ASS - Subtitle renderer, i.e. VSFilter
  • SRT - Subtitle renderer, i.e. VSFilter
  • Truetype fonts - Loaded by Haali's splitter
  • Various images - Handled by the Matroska shellextension. NOTE: the Matroska shellextension is NOT included in the CCCP, nor in the Asuki playback guide.

Error message: "First element of file isn't EBML" or something like that. Help!
This is a message that Haali's splitter sends when it's really, really confused. Without getting too technical, it means that the MKV file structure is severely damaged (which means you should go redownload the file) or that the file isn't an MKV at all (in which case you're doing something wrong).

Why are MKV's frequently bigger than AVI's?
They certainly doesn't have to be. If one takes an AVI and repacks it to MKV, the result will be somewhat SMALLER (only one or maybe a few percent - nothing spectacular). If we use the box analogy, the "MKV box" has thinner walls than the "AVI box" has, hence it takes less space than an AVI containing the same things. However, the size of an MKV depends on what you put in it. The final size is up to the encoder to decide, and most encoders go for the standard 170 or 230 MB sizes. The MKV container itself has nothing to do with the filesize.

How do I get stuff out of an MKV?
There's a very nifty toolkit package for handling MKV's, appropriately called mkvtoolnix. It contains several useful programs, for example mkvmerge (put stuff into MKV's, or take an MKV you have and create a new MKV from it, but with new/partly new stuff in it) and mkvinfo (tells you a lot about what's hiding inside an MKV). There's also a program called mkvextract, which can, surprise, surprise, extract stuff from MKV's. It's a commandline program, which tends to confuse people, but there's a GUI for it, too (although it's rather outdated at the time of writing...). Put the GUI in the mkvtoolnix folder, fire it up, and extract all you like.
NOTE and WARNING: You can NOT extract H.264 video to anything useful with mkvextract (yet?). What you get is a raw, containerless H.264 bitstream, and that's almost never useful.

What about MP4?
It is another container format, also much more modern than AVI. It was originally developed by Apple, but then given over to the MPEG consortium. It is the "standard" container for H.264 and AAC. However, it lacks some features that Matroska has (functional VFR, for example, although this is a limitation of the currently available tools) and is by some regarded as more clunky to work with. Regardless, some people prefer it to MKV anyway. Note that the .mp4 file extension DOES NOT MEAN that it has anything to do with MP3. They are completely different things.
Haali Media Splitter can handle MP4's as well.

Revision history
2007-03-05 - +don't use VLC, +mplayer updates
2006-03-01 - +more features, +not windows, +warning about outdated mkvextract GUI, -some confusion
2006-01-15 - +more VLC info, +first element of file is not EBML
2006-01-07 - +filesizes
2006-01-06 - Initial version, +MP4, -spellos, -Ogg (I AM SORRY AMZ)

Asakura_Y0h 2006-04-17 08:18

For those who don't want to read the very detailed and great explanation, here's the bottom line.

Google up a player for MKV files ( i use core player) and play AVI files in any other normal player. Also you can't play MKV files on an AVI player or vice versa.

TheFluff 2006-04-17 08:25

What? Any sane directshow player can play both MKV, MP4 and AVI...

Kurz 2006-04-17 09:08

Another for the WTF catagory sadly...

Common sense... why would there be specfic players out there for MKV? Why would they force you to use different players to view different media?

MKV is a container (Box) that just needs a splitter (Box opener) to let out the containts.
Then Codecs decode the pieces of media like the Video and the Audio.

Then the video player takes both of those decoded inputs and smashes them together for you to view. All players do this, some however have their own library of codecs.

Same is true if softsubs are included.

EDIT: I just realized I used the same Analogy as Fluff... even though I didnt read it.

SomeWhiteGuy 2006-04-17 09:10

Yeah, I was about to say the same thing. Most PLAYERS weather it be directshow or not can usually play both. MPlayer and VLC can do both, it's just that MPlayerClassic and WMP need additional things installed because they depend on crappy 3rd party binaries, and request them from the OS rather then using their own.

TheFluff 2006-04-17 18:09

Crappy? Haali's splitter is THE most complete MKV splitter around. I don't know what VLC uses, but it doesn't grok linked files, at least, and it seems pretty buggy. MPlayer's is OK, but it doesn't understand linked files either.

SomeWhiteGuy 2006-04-18 10:54

Meh, when I said "crappy 3rd party binaries", I was just referring to them all in general. I actually never even heard of "Haali's" splitter. I was just basing it on my own experiences. It just annoyed me because a while ago I didn’t know that these applications used binaries handed over from the OS, so when I would try WMP, and then try WMP-classic, and then WinAmp, I would get the same results from each. Took me a while before I realized that only VLC and MPlayer would respond differently.

I also consider it "crappy" (all in general) because of small conflicts (which usually don’t appear now of days), such as Lazy Mans MKV thing, I install it, it works great, but then I have problems with something else until I uninstall Lazy Man's thing (if I remember correctly, I think it made certain videos only show a frozen frame). It just annoyed me. Hence why I like players who use their own binaries more; because they have been packaged with that player by the programmer(s) knowing that those sets of codecs work well all togeather.

The only current day situation where I needed to use the system of 3rd party codes is for the new H26* codec. *shudder* ugh,,, why do they keep making new codecs ;_; *crys*

Farix 2006-04-18 18:00


Originally Posted by SomeWhiteGuy
*shudder* ugh,,, why do they keep making new codecs ;_; *crys*

I'm not sure if that is suppose to be a sarcastic remark or not, but new codecs are created because they improve upon the abilities of the old, either through adding more features, better quality, and/or smaller file size. And that is a "Good Thing®".

SomeWhiteGuy 2006-04-19 07:29


Originally Posted by Farix
And that is a good thing.

*SWG crushes Farix*
.... *sigh* well, maybe it would b a good thing, but it's such a pain in the ass every time they make new ones. You godda actually find a codec that *gasp* works. It gets easier as time goes by and newer versions of every player can handle them by default install, but in the time they don't I sit banging my head against the monitor in anger.

Yeah, your right, they do have better quality and what not, but every time I go through the trouble of getting codecs to work I always think to myself….. xvid works… why didn’t the encoders that? And when I finally get the new codec to work,,,, maybe it’s slightly better quality, but I have yet to see a major quality difference like the difference between DVD and VHS. Like, back when they were making DVDs I was like, ugh, what a pain, and then saw the difference between them. I immediately thought the DVD player was worth it. Codecs on the other hand don’t seem to have a wide difference in between them these days.

Kurz 2006-04-19 08:24

If you want to know the reason read it at another thread...

Oh... Stop complaining. With tools like CCCP, CoreAVC and FAQs everywhere, finding codecs are a sinch. I've seen what h.264 can do, personaly I rather look at cleaner pictures than blocky ones.

Farix 2006-04-19 09:48

If you use a DirectShow compliant player, then all you really need is update the codex. But then, your complaining is more to do with being outside of your comfort box. I, for one, appreciate the smaller file size that MPEG4-10 offers because I don't have the luxury of a broadband connection. So that ~90MB savings between Gakido's XviD and MPEG4-10 versions of KIBA is greatly appreciated.

ChristianHJW 2006-04-21 18:58


Originally Posted by SomeWhiteGuy
I also consider it "crappy" (all in general) because of small conflicts (which usually donít appear now of days), such as Lazy Mans MKV thing, I install it, it works great, but then I have problems with something else until I uninstall Lazy Man's thing (if I remember correctly, I think it made certain videos only show a frozen frame). It just annoyed me.

This complaint should definitely be directed towards Microsoft, and especially their inability to make DirectShow safer than it is is today. One crappy codec, and no video will play anymore. Great stuff, Bill .....

ChristianHJW 2006-04-21 19:01


Originally Posted by SomeWhiteGuy
NOOO!!~~~~Codecs on the other hand donít seem to have a wide difference in between them these days.

You are definitely an eye person, not an ears person. The biggest improvements in codecs in the last 3 years have been made in the audio world. HE-AAC today can hold the same quality as a MP3 with about half the bitrate, or achieve MUCH higher audio quality than the MP3 at the same bitrate.

A 5.1 Dolby surround HE-AAC can be packed, and in reasonable quality, into a 160 kbps stream today. What an achievement !!!
matroska container took off mainly for 3 reasons :
- better soft subtitles support
- VFR (Variable Framerate) support
- Vorbis and AAC audio support

No difference ? Jesus Christ .....

matroska project admin

ChristianHJW 2006-04-21 19:05

@ The Fluff : Great thread !!! Marvellous !! Can we link to it from our website ??


TheFluff 2006-04-21 20:13


Originally Posted by ChristianHJW
@ The Fluff : Great thread !!! Marvellous !! Can we link to it from our website ??

Of course you can! :)

Prince of Chronics 2006-05-17 01:44

Rather than make a new thread.. I think I'll ask my question here.

I am having difficulty playing a rmvb/mkv file... I am not a technical person, so I think that this video is using rmvb in a mkv container... anyways.. when I use VLC (as I normally do), I get audio but no video.. when I try using Media Player Classic, I get video but no audio.. can someone please explain to me how I would be able to get this to work?

I have no problem playing any kind of file for a few years now.. and this is boggling me. Thank you for the help.

NoSanninWa 2006-05-17 02:47

If you are getting video without audio, then there's a chance it is using an odd audio codec that you aren't supporting. GSpot should be able to tell you what the audio codecs is so we can find out if that is the problem.

Prince of Chronics 2006-05-17 05:59

I used that GSpot app and didn't come up with any useful information... the file is rmvb mkv file.. and that app doesn't seem to support it... I am getting a lot of "n/a" in many of the fields. :(

However, as I mentioned in my previous post.. I can get the audio stream when I run it using VLC and I can get the video to show with no audio when I use MPC.


aperson 2006-05-17 07:49

Try going to the Matroka Website and going to the downloads section and getting MatroskaDiag. Open your MKV in it and it should tell you what audio codec you need to play it.

Cyz 2006-09-26 18:57

So all I need is to install this CCCP and it will let me play any .mkv files? I just install it so...I can play .mkv fansubs now?

Edit: For some odd reasons, when I installed the CCCP, I couldn't play the saved .avi movies.

All times are GMT -5. The time now is 16:45.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.