Created
May 23, 2021 22:07
-
-
Save jbuchbinder/cf5e29c5cc2a3edb47321eb5ed6e27cd to your computer and use it in GitHub Desktop.
Convert MP4 + SRT to MKV
This file contains 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 | |
# mp42mkv | |
# @jbuchbinder | |
for v in *.mp4; do | |
s="${v//.mp4}.srt" | |
o="${v//.mp4}.mkv" | |
if [ -f "$s" ]; then | |
echo "Found $v and $s" | |
mkvmerge -o "$o" "$v" "$s" --chapter-language eng && rm "${v}" "${s}" -v | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment