Skip to content

Instantly share code, notes, and snippets.

@kampfgnu
kampfgnu / mkvextractTracks.sh
Last active March 13, 2024 05:19
batch extract subtitles from mkv files
#!/bin/bash -e
# a script that extracts the subtitle file of every mkv movie file and saves it with the same name
# copy to the folder where the mkv files live and run "./mkvextractTracks.sh" in terminal
# options: [trackID]
# example: ./mkvextractTracks.sh 1
#
# info:
# mkvextract is used to extract the subtitles, so mkvtoolnix app (which contains the mkvextract binary) is used:
# https://mkvtoolnix.download/downloads.html