EDIT: https://github.com/gwen-lg/subtile-ocr is better than https://github.com/ruediger/VobSub2SRT Subtitle-ocr had no issue with recognising "I" as "I" while vobsub2srt constantly sees "I" as "|" and blacklisting "|" causes "I" to be recognised as "]" and blacklisting "|" "[" and "]" just leaves a blank space so thanks for the recommendation! I'll be using that to convert VOBSUB to srt instead
for f in ./*.idx; do
subtile-ocr -l ger -o "${f%.*}.srt" "$f"; done
And then https://mkvtoolnix.download/ to remove any unwanted subtitles from the mkv files
for f in ./*.mkv; do
outdir="nosubs"
mkvmerge -o "${outdir}/$f" --no-subtitles "$f"; done
Finally, I merge the srt files with the mkv files
for f in ./nosubs/*.mkv; do
outdir=addedsubs
g="${f##*/}"
mkvmerge -o "${outdir}/$g" "$f" --language 0:ger --track-name 0:German "${g%.*}".srt; done
Once the files in the addedsubs directory look good, I delete all of the other files. You can add it all to a bash file or make an alias or both and run it wherever