Skip to content

Instantly share code, notes, and snippets.

@rhoit
Created March 7, 2015 11:07
Show Gist options
  • Save rhoit/627213bfa9d5c9901dd9 to your computer and use it in GitHub Desktop.
Save rhoit/627213bfa9d5c9901dd9 to your computer and use it in GitHub Desktop.
#!/bin/bash
for i in 05/*mp4; do
srt="${i/.mp4/.en.srt}"
[ -e "$srt" ] || continue
mkvmerge -o "out/${i/.mp4/.mkv}" "--forced-track" "0:no" "-s" "0" "-D" "-A" "-T" "--no-global-tags" "--no-chapters" "(" "$srt" ")" "--forced-track" "0:no" "--forced-track" "1:no" "-a" "1" "-d" "0" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "$i" ")" "--track-order" "0:0,1:0,1:1"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment