MKVToolNix
$ mkvmerge Community Low Riskmkvmerge (part of MKVToolNix) inspects Matroska and MP4/WebM containers via JSON (-J) and remuxes or splits video, audio, and subtitle streams into .mkv files without re-encoding. Deterministic exit codes (0/1/2) and --ui-language en suit headless automation.
brew install mkvtoolnix Local stream inspection (mkvmerge -J) and lossless container muxing operate directly on multi-gigabyte media files without MCP serialization.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Provides -J (--identification-format json) structured track inspection, --ui-language en, and clear exit codes (0 success, 1 warnings, 2 error).
mkvmerge -Joutputs clean JSON track/container metadata- Predictable exit codes and headless CLI execution
-J inspection is read-only and -o writes a new container rather than mutating inputs, though an existing -o path is overwritten and companion mkvpropedit edits in-place.
-oseparates output from input files- Overwrites target
-ofile if it already exists
First-class packages across brew install mkvtoolnix, Linux repositories, Flatpak/AppImage, and Windows binaries.
- Cross-platform C++ binaries for macOS, Linux, and Windows
Canonical lossless Matroska muxer/inspector with richer track flag and attachment metadata than generic tools.
- Handles track selection, splitting, chapters, and subtitle muxing losslessly
Actively maintained by Moritz Bunkus for over two decades with regular releases.
- Consistent upstream releases under GPL-2.0-or-later
Thorough official HTML documentation and JSON identification schema reference.
- Complete command reference at mkvtoolnix.download/doc/mkvmerge.html
Security, Auth & Guardrails
None required; operates purely on local media files.
100% free, offline, and open-source (GPL-2.0-or-later).
# MKVToolNix (mkvmerge) Agent Rules - Inspect tracks first with `mkvmerge -J <file>` to confirm numeric track IDs before muxing or filtering (`-a`, `-d`, `-s`). - Always write to a distinct `-o <new>.mkv` path; avoid `mkvpropedit` in-place edits without a backup.
Agent-Ready Command Recipes
Safe Read-Only Queries
mkvmerge -J --ui-language en movie.mkv
Emits JSON listing all track IDs, codecs, language tags, default/forced flags, chapters, and attachments without modifying movie.mkv.
Controlled Writes & Previews
mkvmerge -o out.mkv --language 0:eng video.mp4 --language 0:eng sub.srt
Losslessly combines streams into out.mkv with explicit track language tags while keeping source inputs untouched.
Strengths for Agents
- +
mkvmerge -Joutputs complete, machine-parseable JSON track and attachment metadata. - + Lossless muxing (
-o) never degrades video/audio quality or mutates input files. - + Distinguishes warnings (exit
1) from fatal errors (exit2).
Caveats & Pitfalls
- ! Exit code
1indicates warnings (not necessarily failure), so scripts must handle0vs1vs2carefully. - ! Overwrites
-ooutput paths silently if the destination already exists.