Skip to content
Agentmart
Submit a tool

mkv-strip-tracks

Remove unwanted tracks (audio, subtitle, video) from a Matroska container and save a new, smaller file.

Skill by danielrosehill

IndexedMIT★ 6
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/danielrosehill-mkv-strip-tracks

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Remove unwanted tracks (audio, subtitle, video) from a Matroska container and save a new, smaller file. Use mkvmerge syntax (-a, -s, -d to keep tracks; -A, -S, -D to drop all of a type). Use when the user says "remove this audio track", "drop all subtitles except English", "keep only this video and audio", "make this file smaller". No re-encode.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/mkv-strip-tracks

Tools it pre-approves 11

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Bash(test
  • *),
  • Bash(which
  • Bash(mkvmerge
  • Bash(mkdir
  • Bash(ls
  • Bash(dirname
  • Bash(basename
  • Bash(stat
  • Read,
  • Write

What's inside

Skill name
mkv-strip-tracks
Description
Remove unwanted tracks (audio, subtitle, video) from a Matroska container and save a new, smaller file. Use mkvmerge syntax (-a, -s, -d to keep tracks; -A, -S, -D to drop all of a type). Use when the user says "remove this audio track", "drop all subtitles except English", "keep only this video and audio", "make this file smaller". No re-encode.
License
MIT
Allowed tools
Bash(test, *),, Bash(which, *),, Bash(mkvmerge, *),, Bash(mkdir, *),, Bash(ls, *),, Bash(dirname, *),, Bash(basename, *),, Bash(stat, *),, Read,, Write
Instructions
88 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves some shell commands

Files (1)

  • SKILL.md

SKILL.md (first lines)

# MKV Strip Tracks

Selectively keep or discard audio, subtitle, and video tracks in a Matroska container using mkvmerge. Produces a new MKV with only the requested tracks; original is preserved. No re-encoding.

## When to use

- User wants to drop unwanted audio or subtitle tracks from a multi-language file
- Reduce file size by removing all subtitles, or all but one audio track
- Clean up a master file before distribution (keep video + one audio + one subtitle)

## Inputs to gather

- **File** — path to source MKV (required)
- **Keep audio tracks** — comma-separated list of track indices (e.g., `1,2`) or language codes; OR `-A` to drop all audio (optional)
- **Keep subtitle tracks** — comma-separated list (e.g., `3,4`) or `-S` to drop all subs (optional)
- **Keep video tracks** — track index (usually `0`) or `-D` to drop all video (rare) (optional, default: keep track 0)
- **Output path** — where to write the new MKV (optional, default: `<original-name>.stripped.mkv` in same dir)

## Procedure

### 1. Check mkvtoolnix is installed

```bash
if ! command -v mkvmerge >/dev/null; then
  echo "mkvtoolnix not installed. Install: apt install mkvtoolnix"
  exit 1
fi
```

### 2. Build the mkvmerge command

mkvmerge uses track-selection flags:

| Flag | Effect |
|------|--------|
| `-d 0` | keep video track 0 |
| `-a 1,2` | keep audio tracks 1 and 2 |
| `-s 3` | keep subtitle track 3 |
| `-A` | drop all audio |
| `-S` | drop all subtitles |
| `-D` | drop all video |

Example: keep video 0, audio 1, subs 3–4:

```bash
mkvmerge \
  -d 0 -a 1 -s 3,4 \
  -o "$OUTPUT" "$FILE"
```

### 3. Validate tracks exist

Before running mkvmerge, query the source with `mkvmerge -i "$FILE"` to verify all requested track indices exist. Warn if a track is missing.

### 4. Show the user the command

Print the full mkvmerge invocation and ask for confirmation (especially if many tracks will be dropped).

### 5. Run and report

```bash
mkvmerge -d 0 -a "$AUDIO_TRACKS" -s "$SUB_TRACKS" -o "$OUTPUT" "$FILE"
```

After completion, show:
```
Source    : path/to/in.mkv (12.5 MB)
Output    : path/to/in.stripped.mkv (3.2 MB)
Removed   : audio track 2, all other subtitles
Reduction : 74%
```

## Output / side effects

- Creates a new MKV file at the specified output path.
- Original file is untouched.
- No re-encoding; mkvmerge copies streams as-is.
- The output file is **always a new file** — mkvmerge cannot edit in-place.

## Notes

- mkvmerge is fast and non-destructive compared to ffmpeg, which would require re-encoding if stream-copy alone fails.
- Track indices refer to the **physical track order in the file**, shown by `mkv-track-list`. Not all indices are sequential (e.g., if you dropped a track earlier, indices don't shift).
- Language-based selection (e.g., `-a eng`) is more portable than track indices if the MKV has proper language tags. mkvmerge supports ISO 639-2 codes.
- If the user wants to keep multiple tracks but doesn't know the indices, run `mkv-track-list` first.
- Chapters, attachments, and global metadata are preserved in the output by default; mkvmerge can also strip these with additional flags if needed (e.g., `--no-chapters`).

From danielrosehill/Claude-Video-Editor-Plugin, MIT.

More from danielrosehill/Claude-Video-Editor-Plugin

Signals

Stars
6
Forks
0
Open issues
0
Last commit (this folder)
May 3, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from danielrosehill

Cite this page

mkv-strip-tracks skill. Agent Mart. https://agentmart.dev/skills/danielrosehill-mkv-strip-tracks (last updated 2026-10-24)