Skip to content

Instantly share code, notes, and snippets.

@pasdam
Created January 5, 2020 01:12
Show Gist options
  • Save pasdam/4ca1611e45c591de83a30ce5f3f4115a to your computer and use it in GitHub Desktop.
Save pasdam/4ca1611e45c591de83a30ce5f3f4115a to your computer and use it in GitHub Desktop.
Bash script to remove all non-english audio/subtitle tracks from a group of MKV files
#! /bin/sh
MKVMERGE="<mkvmerge_path>"
INPUT_FOLDER="<input_folder>"
OUPUT_FOLDER="<output_folder>"
for entry in "$INPUT_FOLDER"/*.mkv; do
NAME=$(basename "$entry")
# remove all non-english autio/subtitles tracks
"${MKVMERGE}" -o "${OUPUT_FOLDER}/${NAME}" -a eng -s eng "${entry}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment