Skip to content

Instantly share code, notes, and snippets.

@nshtg
Last active October 9, 2017 14:37
Show Gist options
  • Save nshtg/4ccd89da229585ea69a08e37323b4787 to your computer and use it in GitHub Desktop.
Save nshtg/4ccd89da229585ea69a08e37323b4787 to your computer and use it in GitHub Desktop.
mkvmerge subtitles with different fps rate (srt: 23.976fps, mkv: 25fps)
#!/usr/bin/zsh
mkdir -p old
for var in $(ls *.srt | awk -F ".srt" '{print $1}')
do
mkvmerge --priority higher \
-o "$(print $var)1.mkv" \
"$(print $var).mkv" \
--language 0:eng \
--default-track 0:true \
--language 0:eng \
--sync 0:0,23.976/25 \
--sub-charset 0:UTF8 \
"$(print $var).srt"
mv "$(print $var).mkv" "old/$(print $var).mkv"
mv "$(print $var).srt" "old/$(print $var).srt"
mv "$(print $var)1.mkv" "$(print $var).mkv"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment