I am a big fan of the open source multimedia container format ‘Matroska’ (MKV), simply because it is extremely rich in features and highly durable (less prone to data corruptions etc).
‘Matroska’ also comes with a set of tools known as ‘MKVToolNix’ that let you open any ‘Matroska’ extensions (.mkv, .mka, .mks and .mk3d) and view the content, extract multimedia content without re-encoding (video, audio, subtitles), add streams and attachments, edit chapters, split the content, change various codec based settings etc.
‘MKVToolNix’ is also a cross-platform utility that supports Windows, Mac OS X and GNU/Linux. If you use Ubuntu or any distribution based on it, then you can install it using a single command as it is located in the Ubuntu repositories.
However, those packages are not up-to-date. So if you use Ubuntu 12.10 or Linux Mint 14 and wanted to install the latest versions of ‘MKVToolNix’, then please follow the below procedure.
Open your Terminal window and enter the below command.
wget -O -- http://www.bunkus.org/gpg-pub-moritzbunkus.txt | sudo apt-key add --
After that, we have to manually add the package location (repository) into the ‘apt-get’. For that, we are going to edit a configuration file called ‘sources.list’ and enter the new software sources.
To do that, put the below command in your Terminal window.
gksudo gedit /etc/apt/sources.list
This should open the configuration file in your text editor as shown below. Then scroll down and create a new text line at the bottom by pressing the ‘Enter’ key.
Then copy the below two codes and simply paste them in that new line (as shown in the above screenshot).
deb http://www.bunkus.org/ubuntu/quantal/ ./
deb-src http://www.bunkus.org/ubuntu/quantal/ ./
Now save your changes (by clicking on the ‘Save’ button) and close the text editor.
Finally, enter the below two commands to install the ‘MKVToolNix’ package.
sudo apt-get update
sudo apt-get install mkvtoolnix mkvtoolnix-gui
Now search for ‘mkvmerge’ in Unity’s Dash or in Linux Mint start menu to open the utility.
‘MKVToolNix’ package also comes with another tool called ‘mkvinfo’ that shows (including saving it into a text file) advanced information of a ‘Matroska’ file (codec information, encoder, attachments etc). You can also open it by searching using its name as well.
That’s it, good luck.