Listed below are the most common questions asked about Matroska.
Q: What is matroska? I dont understand
what a 'container format' is at all, is it a player, or a audio/video
compression format ?
A: Whenever you play a movie it includes at least one video stream and
one audio stream. Since its not practicle to have 2 files to play
Audio/Video, you pack both into a single file by using a so-called
container format file. This container and the software coming with it
take care of a lot of important functions, like the correct timing of
the audio and video playback when the file is played ( opened ). ZIP or
RAR could be a perfect container to pack one or more audio/video
streams together into one single file for distribution, but WinZIP
certainly wouldnt care about the correct timing of the these streams on
playback ... Known containers are the good old AVI, or the MPEG container ( .mpg , .mpeg ),
Quicktime ( .mov ), Realmedia ( .rm ), MP4 ( .mp4 ), etc.
Matroska is an opensource alternative to all of them, and is
able to offer a lot of features that others dont have have.
Q: What are the advantages of matroska compared to AVI ?
A: The AVI container was originally introduced by Microsoft in the
early 90s, and was designed as a very flexible A/V container format for
the video and audio compression formats of those days. It is necessary
to understand that AVI is only one ( but important ) part of a complete
multimedia framework called 'Video For Windows' ( VfW ), offering
programmers not only a container but also a complete set of API
commands to be able to program their own video and audio codecs, using
either the VfW or the ACM interface ( this was back from the days when
Microsoft was still dedicated to sell their operating systems to
people, instead of multimedia solutions as they are trying to do today
with WMV, so they had to make their OS attractive to other programmers
).
Unfortunately this VfW framework cannot support many of the more
advanced features that modern audio and video compression formats will
offer, such as Variable Bitrate audio encoding ( VBR ), or Variable
Framerate video encoding ( VFR ). Although AVI was extended with an
additional standard called 'Open DML AVI' in the mid/late 90s,
overcoming most of its very annoying limitations like the 2 GB file
size limit, there is still no proper and spec compliant way to support
modern compression formats like the excellent, opensource Ogg Vorbis
audio compression format.
Matroska has overcome all those limitations and can support all known
audio and video compression formats by design. To make sure it will
also be capable of coping with the future standards it is based on a
very flexible underlying framework called EBML, allowing to add more
functionalities to the container format without breaking backwards
compatibility with older softwares and files.
Q: What file extensions does Matroska
use?
A: We currently have 3 different extensions specified :
- .mkv : Used for Video files, as well those containing audio ( movies
) or video only
- .mka : Used for audio only files, can contain any supported audio
compresion format, such as MP2, MP3, Vorbis, AAC, AC3, DTS, or PCM
- .mks :Used for Subtitles that an 'elementary' matroska stream
Q: How can i create Matroska files ?
A: You can reencode an existing source with FFmpeg or the more user friendly Handbrake. You can also 'transmux' an existing AVI, MP4 or TS file.
This option is a lossless process, all the audio and video data in the source
file will be read from it, and packed into a matroska file in a spec
compliant way, but basically stay unaltered to avoid any degradation of
quality. There are currently 2 different tools to do this ( look here
for the announcement of their latest versions ), but the list keeps on growing.
Moritz Bunku's mkvmerger is a command line based matroska muxer that can be run
on Windows, Linux and OS X. It also does accept AVI and
OGM on its input, as well as AC3, AAC, Vorbis, DTS, MP3, MP2 and PCM
audio.
In VirtuldubMod ( starting from 1.5.1.1a
) all you have to do is to open your AVI or OGM file, set 'video' to
'direct stream copy', goto 'file' 'save as ...' and select '.mkv' from
the file type dropdown list and rename it. Of course, this doesnt make
much sense if you dont have any plans to add something to the file that
AVI or OGM cannot support, like adding another audio track in an
unsupported audio compression format.
From VirtualdubMod you can also directly encode into .mkv files from
any source that it can open, and using every available VfW and ACM
codecs, even in 2 pass mode.
Q: How can i play Matroska files on
my PC ?
A: On the download page you will always find the link to the very
latest DirectShow parser filter, that way you will be able to play your
.mkv files on a DirectShow based player such as Windows Mediaplayer.
For Linux PCs, as well as for MacOSX and the X-Box emulation you have
to get the newest version of VLC or mplayer. On OS X you can also install Perian which will add Matroska support in Quicktime.
Q: What is the advantage of using the
.mka file instead of the original audio formats, like mp2, mp3 etc?
A: In many cases there is not a reason to store audio only files in
MKA. If you have an audio file with a single track, or "song", that you
don't intend to edit.
Here are some reasons that placing
audio in MKA is useful:
1. The tags will be the same no matter what audio format you use. That
means that if you write a program to read back tags, it only has to
read them from one type of tagging system, no matter what type of audio
is being used.
2. All tracks to a CD can be in a single file. You have the option of
dividing the tracks into seperate Tracks, or seperate Chapters. You
could make your own compilation in a single file, even using different
audio formats, such as MP3 and Vorbis.
3. If you write a program to read audio of of MKA, then you don't need
to understand how the framing works in the different formats because it
is already done for you in Matroska.
4. It is easy to delete portions of the audio without reencoding
because you just throw away those blocks. You don't even have to be
able to play that format back, you could edit by just knowing timecodes.
5. Detecting differences between two audio streams would be easy
because you could store both in a single file, start playback, and then
just switch between tracks.
6. If you intend to combine the audio with video, then having is in MKA
means you can merge it with an MKV, even if the application doesn't
support the audio type.
7. In the case of MP3, MP2 AC3 and even some AAC, using "compressed headers" the MKA file may even be smaller than the original "raw" file, without losing any bit of information.
Q: Will my .mkv files be compatible
with future Matroska software if i will use current tools to mux my
files?
A: The files being created now are spec compliant.
Q: Will there be a perfomance hit for
storing audio/video in Matroska?
A: No, even though its more complex to read/write MKV than it is AVI
you can't tell a difference when reading back a file from AVI or MKV on
today's processors, even on smartphones ( see CorePlayer ).
Q: What makes Matroska better (worse?)
than an ogg media container (.ogm)?
A: It's less a matter of better/worse, and more a matter of different.
This is a little complex but we will try to explain.
First Ogg is not the same thing as Ogm. Ogg is an RFC spec now,
and is very useful for what it was designed for, streaming over lossy links, and
Ogm is an implementation of Ogg placing other 'things' inside.
So, we have:
Ogg
1. Designed for "lossy"streaming (over UDP).
2. Designed to hold Vorbis and other Xiph-supported audio & video codecs.
3. Well documented for above two purposes.
Ogm
1. Implementation of Ogg to hold video, other audio codecs, and a type
of subtitle.
2. Implements Chapter support.
Matroska
1. Designed to hold any type of codec. (Audio, Video, Subtitle, etc)
2. Designed for editability.
3. Purposely flexible design.
4. Well documented portions, others in process.
5. Initial design is to support presentation container features such as
Chapters, Tags, AudioGain, Menus, etc.
Will Matroska be streamable? Yes, but low bitrate streaming like
streaming Vorbis, will always be better in Ogg. This is because their
design is for different purposes.