MKVToolNix—Matroska tools for Linux/Unix

I use Linux Mint/Ubuntu (Debian), always an LTS version, so this is always done from that point of view.

Table of Contents

Installing/Updating MKVToolNix
Step 1: Downloads

MKVToolNix is a set of tools to create, alter and inspect Matroska files under Linux, other Unices and Windows. The MKV part of the title refers to Matroska.

These are companions to MakeMKV. Please see my notes on that page.

Installing/Updating MakeMKV

Step 1: Downloads

There is nothing to download per se.

Step 2: Aptitude update and add essential packages

  1. Get the public GPG key:
    [email protected] ~ $ wget -q -O - https://mkvtoolnix.download/gpg-pub-moritzbunkus.txt | sudo apt-key add -
    
  2. Determine which Debian version (because there are 3 supported as I write this):
    [email protected] ~ $ cat /etc/debian_version
    stretch/sid
    
  3. Create /etc/apt/sources.list.d/mkvtoolnix.list and the correct Debian lines to it:
    deb https://mkvtoolnix.download/debian/ stretch main
    deb-src https://mkvtoolnix.download/debian/ stretch main
  4. Do update, which will include using the Aptitude contents you just added in /etc/sources.list.d, then do the install:
    [email protected] ~ $ sudo apt update
    [email protected] ~ $ sudo apt install mkvtoolnix mkvtoolnix-gui
    
  5. If the command above fails, ensure that you have installed the Aptitude HTTPs transport:
    [email protected] ~ $ sudo apt-get install apt-transport-https
    
  6. You may get unmet dependencies; check the versions you do have:
    [email protected] ~ $ sudo apt install mkvtoolnix mkvtoolnix-gui
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have requested an impossible situation
    or if you are using the unstable distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     mkvtoolnix : Depends: libboost-filesystem1.62.0 but it is not installable
                  Depends: libboost-regex1.62.0 but it is not installable
                  Depends: libboost-system1.62.0 but it is not installable
     mkvtoolnix-gui : Depends: libboost-filesystem1.62.0 but it is not installable
                      Depends: libboost-regex1.62.0 but it is not installable
                      Depends: libboost-system1.62.0 but it is not installable
                      Depends: libqt5core5a (>= 5.7.0) but 5.5.1+dfsg-16ubuntu7.5 is to be installed
                      Depends: libqt5multimedia5 (>= 5.6.0~beta) but 5.5.1-4ubuntu2 is to be installed
    E: Unable to correct problems, you have held broken packages.
    [email protected] ~ $ dpkg --list | grep [b]oost
    ii  libboost-date-time1.58.0:amd64   1.58.0+dfsg-5ubuntu3.1   amd64    set of date-time libraries based on generic programming concepts
    
    Basically, this means that you cannot use Linux Mint because it's behind on boost. You'll have to wait until this situation changes. In my experience, you'll wait until the cows come home and still not get them. You can undertake to solve this, but you risk destabilizing your system. I would suggest another computer, one you don't care about or running a different distro of Linux. From this system, you can run these tools.

I posted Issue 2329 to Moritz Bunkus' GitLab issue-reporting site:

My friend, for years I've wanted to use mkvtoolnix on my host (I am a paid and registered user of MakeMKV on Linux), but Linux Mint/Ubuntu is just always several releases (58 against 62) behind for this C++ library. What are the options? Could you make a statically linked version available for building (I don't mind building stuff by hand if I have to)? Thanks for your consideration.

In response to my question (and to a request I did not make), he said,

I don't support Mint. I won't offer anything for it. You basically have three options:

  1. Compile an older MKVToolNix that doesn't require that new a version (you can check NEWS.md for notes when newer Boost versions were required),
  2. Compile and install your own current version of Boost,
  3. Upgrade to a newer version of Mint or, if not available, switch to a different distribution, e.g. a current Ubuntu.