In this comprehensive guide, we delve into the specifics of installing MKVToolNix, a crucial toolset for working with Matroska (.mkv) files, on Debian 12. This popular format is widely used for storing multimedia content such as movies and TV shows. MKVToolNix provides a robust solution for a wide range of operations, including the creation, editing, splitting, joining, and inspection of MKV files.

Whether you’re a professional video editor or a casual user looking to manipulate video files, this article will guide you through the process step by step.

Prerequisites

Before we start, it’s essential to ensure you have the following:

  1. A server running Debian 12 (Bookworm ).
  2. A fresh OS install to prevent any potential issues.
  3. SSH access to the server (or just open Terminal if you’re on a desktop).
  4. An active internet connection to download the necessary packages and dependencies for MKVToolNix.
  5. A user account with sudo privileges to execute administrative commands.

Installing MKVToolNix on Debian 12 Bookworm

Step 1: Update Your System

Firstly, ensure you have sudo privileges or root access to your Debian system. Also, ensure your system’s package list is up to date. You can do this by running the following commands:

sudo apt update
sudo apt upgrade

Step 2: Import the MKVToolNix GPG Key

The MKVToolNix packages are signed with a GPG key to ensure their authenticity. Import the key using the following command:

sudo wget -O /usr/share/keyrings/gpg-pub-moritzbunkus.gpg https://mkvtoolnix.download/gpg-pub-moritzbunkus.gpg

Step 3: Add the MKVToolNix Repository

With the key imported, add the MKVToolNix repository to your system’s sources list:

echo "deb [signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/debian/ bookworm main" | sudo tee /etc/apt/sources.list.d/mkvtoolnix.list

Refresh your package lists to include the newly added repository:

sudo apt update

Step 4: Install MKVToolNix

Now, install MKVToolNix using the following command:

sudo apt install mkvtoolnix

After installation, verify that MKVToolNix is installed correctly by checking its version:

mkvmerge --version

Step 5: Install MKVToolNix GUI (Optional)

For a graphical interface, install MKVToolNix GUI:

sudo apt install mkvtoolnix-gui

Usage Examples

MKVToolNix provides various tools for manipulating MKV files. Here are some examples:

  1. To merge video and audio tracks into an MKV file:
mkvmerge -o output.mkv video.mp4 audio.ac3
  1. To extract subtitles from an MKV file:
mkvextract tracks input.mkv3:subtitles.srt
  1. To edit video metadata:
mkvpropedit input.mkv --edit info --set "title=New Title"

Congratulations! You have successfully installed MKVToolNix on Debian 12Bookworm. For additional help or useful information, we recommend you check the official MKVToolNix website.

If you don’t have time to do all of this stuff, or if this is not your area of expertise, Shape.host offers a service to do “Managed VPS Service”, starting from $4. They provide efficient, scalable, and secure cloud hosting solutions, empowering businesses with high-performing Cloud VPS.