From video-editing
Extract a single track (audio, subtitle, video) from a Matroska container to its own file using mkvextract. Use when the user says "pull out this audio track", "extract the subtitles", "save this audio as a separate file", "get the SRT from this MKV". No re-encode.
npx claudepluginhub danielrosehill/claude-code-plugins --plugin video-editingThis skill is limited to using the following tools:
Pull a single audio, subtitle, or video track out of a Matroska container and save it as a standalone file. Uses mkvextract for speed and fidelity; no re-encoding.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Pull a single audio, subtitle, or video track out of a Matroska container and save it as a standalone file. Uses mkvextract for speed and fidelity; no re-encoding.
mkv-track-list).srt, .mka, .aac, .wav, .ass, etc.)if ! command -v mkvextract >/dev/null; then
echo "mkvtoolnix not installed. Install: apt install mkvtoolnix"
exit 1
fi
Query the source file:
mkvmerge -i "$FILE" | grep "^Track ID $TRACK_INDEX:" | head -1
Output will indicate the type: video, audio, subtitles, attachments, etc.
mkvextract infers the codec from the source and writes appropriate format. Guide the user:
| Source Codec | Suggested Extension |
|---|---|
| UTF-8 text (subs) | .srt |
| ASS/SSA (subs) | .ass |
| AAC audio | .aac or .mka (Matroska audio) |
| FLAC audio | .flac |
| PCM / WAV | .wav |
| H.264 video | .h264 |
| H.265 video | .h265 or .hevc |
If the user provides a mismatched extension, warn but allow (mkvextract will write the correct format regardless).
mkvextract "tracks" "$FILE" "$TRACK_INDEX:$OUTPUT"
Example:
# Extract subtitle track 2 as SRT
mkvextract tracks in.mkv 2:out.srt
# Extract audio track 1 as AAC
mkvextract tracks in.mkv 1:out.aac
# Extract audio track 3 as Matroska audio container
mkvextract tracks in.mkv 3:out.mka
Source : path/to/in.mkv
Track : 1 (audio, AAC stereo)
Output : path/to/out.aac
Size : 12.4 MB
Status : ✓ OK
.ass.mkvextract attachments and mkvextract fonts — future enhancements.