Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

MKVToolNix

$ mkvmerge Community Low Risk
Moritz Bunkus · AI & Media · GPL-2.0-or-later · macos / linux / windows

mkvmerge (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.

FCRS-1.0 Score
88 /100
Good
Medium Confidence
Zero-Friction Install
brew install mkvtoolnix
CLI vs MCP Decision CLI Only

Local stream inspection (mkvmerge -J) and lossless container muxing operate directly on multi-gigabyte media files without MCP serialization.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Provides -J (--identification-format json) structured track inspection, --ui-language en, and clear exit codes (0 success, 1 warnings, 2 error).

  • mkvmerge -J outputs clean JSON track/container metadata
  • Predictable exit codes and headless CLI execution
Trust & Safety 21 / 25

-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.

  • -o separates output from input files
  • Overwrites target -o file if it already exists
Setup & Portability 14 / 15

First-class packages across brew install mkvtoolnix, Linux repositories, Flatpak/AppImage, and Windows binaries.

  • Cross-platform C++ binaries for macOS, Linux, and Windows
Utility & Efficiency 13 / 15

Canonical lossless Matroska muxer/inspector with richer track flag and attachment metadata than generic tools.

  • Handles track selection, splitting, chapters, and subtitle muxing losslessly
Maintenance & Lineage 9 / 10

Actively maintained by Moritz Bunkus for over two decades with regular releases.

  • Consistent upstream releases under GPL-2.0-or-later
Docs & Verifiability 9 / 10

Thorough official HTML documentation and JSON identification schema reference.

  • Complete command reference at mkvtoolnix.download/doc/mkvmerge.html

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; operates purely on local media files.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free, offline, and open-source (GPL-2.0-or-later).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Identify container tracks and flags as JSON
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

Mux video and subtitle tracks into a new MKV
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 -J outputs 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 (exit 2).

Caveats & Pitfalls

  • ! Exit code 1 indicates warnings (not necessarily failure), so scripts must handle 0 vs 1 vs 2 carefully.
  • ! Overwrites -o output paths silently if the destination already exists.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI