Skip to content

Instantly share code, notes, and snippets.

@par6n
Created May 5, 2017
Embed
What would you like to do?
Subtitles merge
#!/bin/bash
mkdir -p Output
for f in *.mkv
do
filename="${f%.*}"
echo "Proccessing ${filename}.mkv"
if [ ! -f "${filename}.srt" ]; then
echo "No subtitle found for ${filename}, skipping..."
continue
fi
mkvmerge -o "Output/${filename}.mkv" "${filename}.mkv" --language "0:eng" --track-name "0:ehsaan" "${filename}.srt"
done
echo "Done!"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment