{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/tools/utilities/mkvtoolnix",
  "collection": "docs",
  "title": "MKVToolNix",
  "description": "MKVToolNix is the standard toolkit for creating, editing, splitting and extracting Matroska files, with a GUI and the mkvmerge, mkvextract, mkvpropedit and mkvinfo command-line tools.",
  "canonicalUrl": "https://encode.wiki/tools/utilities/mkvtoolnix/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/tools/utilities/mkvtoolnix.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/tools/utilities/mkvtoolnix.md",
  "status": "current",
  "tags": [
    "migrated",
    "matroska",
    "muxing",
    "demuxing"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "MKVToolNix release notes (NEWS.md)",
      "url": "https://mkvtoolnix.download/doc/NEWS.md",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "MKVToolNix downloads",
      "url": "https://mkvtoolnix.download/downloads.html",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "MKVToolNix repository",
      "url": "https://codeberg.org/mbunkus/mkvtoolnix",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "mkvmerge documentation",
      "url": "https://mkvtoolnix.download/doc/mkvmerge.html",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "mkvextract documentation",
      "url": "https://mkvtoolnix.download/doc/mkvextract.html",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "mkvpropedit documentation",
      "url": "https://mkvtoolnix.download/doc/mkvpropedit.html",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "provenance": {
    "originUrl": "https://github.com/av1-community-contributors/codec-wiki/blob/37c3317fd058b23c71a87679bed5619a98f77752/docs/utilities/MKVToolNix.mdx",
    "originCommit": "37c3317fd058b23c71a87679bed5619a98f77752",
    "migratedAt": "2026-08-21T00:00:00.000Z",
    "modified": true,
    "originPath": "docs/utilities/MKVToolNix.mdx"
  },
  "headings": [
    {
      "depth": 2,
      "text": "Install it",
      "anchor": "install-it"
    },
    {
      "depth": 2,
      "text": "Using the GUI",
      "anchor": "using-the-gui"
    },
    {
      "depth": 2,
      "text": "mkvmerge",
      "anchor": "mkvmerge"
    },
    {
      "depth": 3,
      "text": "Split and join",
      "anchor": "split-and-join"
    },
    {
      "depth": 2,
      "text": "mkvextract",
      "anchor": "mkvextract"
    },
    {
      "depth": 2,
      "text": "mkvpropedit",
      "anchor": "mkvpropedit"
    },
    {
      "depth": 2,
      "text": "Related pages",
      "anchor": "related-pages"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/tools/utilities/mkvtoolnix/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/_preamble.md",
      "checksum": "f7caa14c3291678a8dce7b5e5b2451d506a238fa580f1e55a1f94bb67ab7fc26",
      "bytes": 1404
    },
    {
      "id": "install-it",
      "title": "Install it",
      "depth": 2,
      "anchor": "install-it",
      "canonicalUrl": "https://encode.wiki/tools/utilities/mkvtoolnix/#install-it",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/install-it.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/install-it.md",
      "checksum": "9d35dca4bff02dafeed219b3fc8ca459f6bbd5c111061a3b6c8c9b93a7d1da0d",
      "bytes": 416
    },
    {
      "id": "using-the-gui",
      "title": "Using the GUI",
      "depth": 2,
      "anchor": "using-the-gui",
      "canonicalUrl": "https://encode.wiki/tools/utilities/mkvtoolnix/#using-the-gui",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/using-the-gui.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/using-the-gui.md",
      "checksum": "4c767c508e94f6b6844ff4dd9c8d87bca712fc9fa6f294719954b73d46a5d782",
      "bytes": 1003
    },
    {
      "id": "mkvmerge",
      "title": "mkvmerge",
      "depth": 2,
      "anchor": "mkvmerge",
      "canonicalUrl": "https://encode.wiki/tools/utilities/mkvtoolnix/#mkvmerge",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/mkvmerge.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/mkvmerge.md",
      "checksum": "3ba5fe3dda596547f39b1a814a129d720a076f1164b5758f85a402fb493708f7",
      "bytes": 3163
    },
    {
      "id": "split-and-join",
      "title": "Split and join",
      "depth": 3,
      "anchor": "split-and-join",
      "canonicalUrl": "https://encode.wiki/tools/utilities/mkvtoolnix/#split-and-join",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/split-and-join.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/split-and-join.md",
      "checksum": "ba6e9686ccf84a9f23d62ad2e45423dea66e68188382d4f7497176fb2a85c258",
      "bytes": 587
    },
    {
      "id": "mkvextract",
      "title": "mkvextract",
      "depth": 2,
      "anchor": "mkvextract",
      "canonicalUrl": "https://encode.wiki/tools/utilities/mkvtoolnix/#mkvextract",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/mkvextract.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/mkvextract.md",
      "checksum": "9c36ae4b0c10309a62abb822fff444f5551d62585fcc36d47d2b97f0bcffd8dc",
      "bytes": 384
    },
    {
      "id": "mkvpropedit",
      "title": "mkvpropedit",
      "depth": 2,
      "anchor": "mkvpropedit",
      "canonicalUrl": "https://encode.wiki/tools/utilities/mkvtoolnix/#mkvpropedit",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/mkvpropedit.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/mkvpropedit.md",
      "checksum": "d362e3ea3defc08505b2446ea00dda5d64e50d98cf364e6e07cac4eb04ba4af1",
      "bytes": 581
    },
    {
      "id": "related-pages",
      "title": "Related pages",
      "depth": 2,
      "anchor": "related-pages",
      "canonicalUrl": "https://encode.wiki/tools/utilities/mkvtoolnix/#related-pages",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/related-pages.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/mkvtoolnix/related-pages.md",
      "checksum": "2c4c7fdd883c8cda77fc2f9620694dd59157165b5f3d04f34fb9f5dfac02b458",
      "bytes": 226
    }
  ],
  "outboundReferences": [
    "/containers/matroska/",
    "/containers/webm/",
    "/guides/audio-and-subtitles/",
    "/media/content/fc87a1b6aec352e5-mkvtoolnix-gui-workload.webp",
    "/tools/utilities/ffmpeg/",
    "/tools/utilities/mp4box/",
    "https://codeberg.org/mbunkus/mkvtoolnix",
    "https://codeberg.org/mbunkus/mkvtoolnix/src/tag/release-102.0",
    "https://flathub.org/apps/org.bunkus.mkvtoolnix-gui",
    "https://mkvtoolnix.download/downloads.html"
  ],
  "checksum": "0176ed798b2042580225909a3324110b8c53d3775a82415ff09a92403b1b47f9",
  "contentFormat": "markdown",
  "markdown": "> **Repository:** [mbunkus/mkvtoolnix](https://codeberg.org/mbunkus/mkvtoolnix). Creating and working with Matroska files. Latest tag: [release-102.0](https://codeberg.org/mbunkus/mkvtoolnix/src/tag/release-102.0), Sep 14, 2026. Last commit: Sep 28, 2026. Stars: 98.\n\nMKVToolNix, by Moritz Bunkus, is the reference toolkit for [Matroska](/containers/matroska/) and [WebM](/containers/webm/). It is what most encoders use for the last step of a job: putting the encoded video, audio, subtitles, fonts and chapters together into one `.mkv`. It never re-encodes anything, so every operation is lossless and fast.\n\n| Tool             | Does                                                                                    |\n| ---------------- | --------------------------------------------------------------------------------------- |\n| MKVToolNix GUI   | Front end for all of the below; most people use its multiplexer and header editor tabs. |\n| `mkvmerge`       | Muxes, remuxes, splits and appends files. Reads MKV, MP4, raw streams, IVF, Blu-ray playlists and more. |\n| `mkvextract`     | Extracts tracks, attachments, chapters, tags and timestamps.                            |\n| `mkvpropedit`    | Edits titles, track languages, names and flags in place, without remuxing.              |\n| `mkvinfo`        | Shows the element structure of a file.                                                  |\n\n## Install it\n\nThe [downloads page](https://mkvtoolnix.download/downloads.html) has a Windows installer and portable archive, macOS disk images, an AppImage, and repositories for Debian, Ubuntu, Fedora and other distributions. It is also on [Flathub](https://flathub.org/apps/org.bunkus.mkvtoolnix-gui) and in most distribution repositories. Releases are frequent; distribution packages may trail by a few versions.\n\n## Using the GUI\n\n<picture>\n  <source srcset=\"/media/content/3a320323bf70be8b-mkvtoolnix-gui-workload.avif\" type=\"image/avif\" />\n  <img src=\"/media/content/fc87a1b6aec352e5-mkvtoolnix-gui-workload.webp\" alt=\"MKVToolNix GUI multiplexer tab\" />\n</picture>\n\nDrag files into the **Multiplexer** tab, untick the tracks you do not want, set language, name and the default/forced flags for each track, choose the output file and click **Start multiplexing**. Useful features:\n\n- Open a Blu-ray playlist (`.mpls`) or `index.bdmv` from an unencrypted disc folder to import a title with all its segments.\n- **Output → Splitting** cuts by duration, size, timestamps, chapters or frame ranges without re-encoding.\n- The **Output** tab's \"Create WebM compliant file\" option restricts the output to WebM.\n- The **Header editor** tab changes titles, languages and flags in an existing file instantly, without remuxing.\n- The **Multiplexer** menu can show the equivalent `mkvmerge` command line, handy for scripting.\n\n## mkvmerge\n\nList the tracks and their IDs first. mkvmerge numbers tracks from 0 within each file; these IDs are not FFmpeg's stream indexes.\n\n```sh\nmkvmerge -i input.mkv\nmkvmerge -J input.mkv\n```\n\n`-J` prints full details as JSON.\n\nOptions before a file name apply to that file only. This muxes an encoded video, an Opus track and ASS subtitles with a font:\n\n```sh\nmkvmerge -o output.mkv video.ivf --language 0:ja audio.opus --language 0:en --track-name 0:\"English\" subs.ass --attach-file font.ttf\n```\n\nKeep or drop tracks from a source with `-d`/`-a`/`-s` (video/audio/subtitle IDs to keep) or `-D`/`-A`/`-S` (drop all of that type). For example, to keep the video, only audio track 2 and no subtitles:\n\n```sh\nmkvmerge -o output.mkv -a 2 -S input.mkv\n```\n\nThe most-used options:\n\n| Option                                    | Use                                                                                       |\n| ----------------------------------------- | ----------------------------------------------------------------------------------------- |\n| `--language ID:LANG`                      | Track language as a BCP 47 tag (`en`, `ja`, `pt-BR`).                                     |\n| `--track-name ID:NAME`                    | Track title shown by players.                                                             |\n| `--default-track-flag ID:0` / `:1`        | Whether players pick this track by default.                                               |\n| `--forced-display-flag ID:1`              | Marks a subtitle track as forced (for example, signs and foreign-language dialogue only). |\n| `--sync ID:MS`                            | Delays (positive) or advances (negative) a track by milliseconds.                        |\n| `--default-duration ID:24000/1001fps`     | Overrides the frame rate of a raw video stream with no timing of its own.                 |\n| `--attach-file FILE`                      | Attaches a file, typically a font used by ASS subtitles.                                  |\n| `--chapters FILE`                         | Adds chapters from an XML or simple `CHAPTER01=` text file.                               |\n| `--split ...`                             | Splits the output (see below).                                                            |\n| `--webm`                                  | Produces a WebM file and rejects codecs WebM does not allow.                              |\n| `--title TEXT`                            | Sets the file's title.                                                                    |\n\n### Split and join\n\n```sh\nmkvmerge -o part.mkv --split duration:00:20:00 input.mkv\nmkvmerge -o clip.mkv --split parts:00:01:00-00:02:30 input.mkv\nmkvmerge -o episode.mkv --split chapters:all input.mkv\nmkvmerge -o joined.mkv part1.mkv + part2.mkv\n```\n\nA split can only happen right before a keyframe, so each cut moves to the first keyframe at or after the point you asked for: clean, but not frame-exact; numbered files (`part-001.mkv`, …) are created when there is more than one part. A `+` before a file appends it to the previous one, which requires matching codecs and parameters.\n\n## mkvextract\n\n```sh\nmkvextract input.mkv tracks 0:video.ivf 1:audio.opus 2:subs.ass\nmkvextract input.mkv attachments 1:font.ttf\nmkvextract input.mkv chapters chapters.xml\nmkvextract input.mkv timestamps_v2 0:timestamps.txt\n```\n\nTracks come out as their raw bitstream; pick an extension that matches the codec. Add `--simple` to the `chapters` mode for the plain `CHAPTER01=` format.\n\n## mkvpropedit\n\nEdits are written into the file in place and take seconds even on large files:\n\n```sh\nmkvpropedit input.mkv --edit info --set \"title=My encode\"\nmkvpropedit input.mkv --edit track:a1 --set language=ja --set flag-default=1 --edit track:s1 --set flag-forced=1\n```\n\n`track:a1` is the first audio track, `track:s1` the first subtitle track and `track:v1` the first video track; these selectors count from 1 per type, unlike mkvmerge's IDs. mkvpropedit can also add, replace and delete attachments and chapters. The GUI's header editor does the same thing interactively.\n\n## Related pages\n\n- [Matroska](/containers/matroska/) and [WebM](/containers/webm/)\n- [FFmpeg](/tools/utilities/ffmpeg/), [MP4Box](/tools/utilities/mp4box/) for MP4\n- [Handle audio and subtitles](/guides/audio-and-subtitles/)\n"
}
