How to Install MkvToolnix (Mkv Container Handler) in Ubuntu?

The container format is the heart of any multimedia file because it’s what holds all the audio/video/subtitle and other codecs related data. Now there are a lot of multimedia container formats around but in my experience although they may not be as popular as some of the proprietary ones such as .Avi or .WMV …

… open-source ones such as MKV and OGM are extremely durable and they also come with built in support for a lot of features (storing lots of different types of codecs, adding chapters etc) when comparing some of those proprietary/close-source formats.

MKV (also known as Matroska) is an extremely powerful and durable (excellent corruption handling) container format that I’m quite fond of. By default Moritz Bunkus (the developer) gives as a complete software suite that makes dealing with Mkv files a breeze. It’s called “MkvToolnix” and it mainly consists of two programs.

One is called the “Mkv-Merge” which lets us easily put the contents of another multimedia file into the Mkv format and the other is called Mkvinfo (a meta data reader, more later).

Main features…

*. The original utility is actually a command-line based one but there’s also a GUI version as in the above screenshot.

*. Extracts audio/video and subtitle files and merge into the MKV format.

*. Add chapters.

*. Edit advanced individual codec related settings such as: Change codec recognition values (Fourcc), change aspect ratio values, change video resolution, delay/stretch (say that you have a video file and the audio plays before the video … then using this you can fix it permanently, most of the time), header compression etc.

*. Add multiple audio/video/subtitles.

*. Add attachments (audio cover backgrounds, simple text descriptions etc).

*. Splitting (if you have a larger source file then using this you can easily split it -- by using both size or time-frame values).

*. Change process priority.

*. Also comes with a separate tool called “MkvInfo” that shows advanced meta-data (author/album/encoder etc) info of Mkv format and lets you import them into a text file.

These are just a few of its main features to mention. It supports a lot of popular formats but WMV/ASF format is not supported at the moment. Anyhow, you can install mkvtoolnix in Ubuntu 11.04 Natty Narwhal, 11.10 Oneiric Ocelot, 10.10 and 10.04 by simply using the below command in your terminal window.

sudo apt-get install mkvtoolnix-gui

But remember some Ubuntu repositories (even the 11.04 one holds a bit older version) don’t hold the latest versions thus you can get the latest builds by following the instructions laid out in this official installation guide page.

For instance, in Ubuntu 11.04, if I wanted to get the latest version (5.01 currently). Then I’d simply issue the below commands to add its official repositories.

wget -O -- http://www.bunkus.org/gpg-pub-moritzbunkus.txt | sudo apt-key add --

sudo add-apt-repository “deb http://www.bunkus.org/ubuntu/natty/ ./

sudo add-apt-repository “deb-src http://www.bunkus.org/ubuntu/natty/ ./

sudo apt-get update

sudo apt-get install mkvtoolnix-gui

Just follow the same commands with other Ubuntu versions and only change the text in Bold with your appropriate repository name as laid out in the above mentioned page.

This is actually a cross-platform tool so you can also install it in MS Windows, Mac OSX and many other GNU/Linux distributions too.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>