Created
May 5, 2017 07:58
-
-
Save par6n/cd60e08738eedc914f57ce4633ca1963 to your computer and use it in GitHub Desktop.
Subtitles merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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