Skip to content

Instantly share code, notes, and snippets.

@jbuchbinder
Created May 23, 2021 22:07
Show Gist options
  • Save jbuchbinder/cf5e29c5cc2a3edb47321eb5ed6e27cd to your computer and use it in GitHub Desktop.
Save jbuchbinder/cf5e29c5cc2a3edb47321eb5ed6e27cd to your computer and use it in GitHub Desktop.
Convert MP4 + SRT to MKV
#!/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