How to edit MKV headers using MKVToolNix

MKV is a popular container format used for video files. Sometimes, I need to change the headers of a file. For example, to set a different audio channel as default or to disable it and so on. All such header operations are easy to perform using the GUI tool of MKVToolNix.

To install the GUI tool:

$ sudo apt install mktoolnix-gui
  • Open mkvtoolnix-gui and click the Edit Headers section.
  • Open the MKV video file whose headers you want to edit. This section will be populated with all the video, audio, subtitle and other such header information. It can be expanded by clicking on the plus symbols.
  • To edit a particular header field, drill down to it and click on it. The right side of the GUI will show its current value. You can add, remove or edit the default values.
  • After you are done, we need to make sure that the resulting header is valid. To check this choose from above Header editor ā†’ Validate values.
  • If validation passes, choose from above Header editor ā†’ Save.

Tried with: MKVToolNix 8.8.0 and Ubuntu 16.04


2 thoughts on “How to edit MKV headers using MKVToolNix

  1. Is there a Python library for this? I discovered that hundreds my MKV’s have “Disc x” as the title instead of the the name of the show. I writing a bash script using mkvpropedit to change the title to match the filename ( which is the correct title + mkv extension), but I’d rather use a Python library for it.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.