Skip to content

Instantly share code, notes, and snippets.

@Diegus83
Last active November 5, 2020 16:20
Show Gist options
  • Save Diegus83/7f091223797cfd3aadcc895f5835f65e to your computer and use it in GitHub Desktop.
Save Diegus83/7f091223797cfd3aadcc895f5835f65e to your computer and use it in GitHub Desktop.
macOS folder action to extract ssa subtitles from MKV files recursively as srt
# add a Run shell script module in automator, pass input as arguments. Set as a folder action on the appropiate folders.
for f in "$@"
do
if [ ${f: -4} == ".mkv" ]
then
/usr/local/bin/ffmpeg -hide_banner -y -loglevel quiet -i "$f" -map 0:s? "${f%.*}".en.srt
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment