I have a folder containing different video and subtitle types, with each set of videos and subtitles having the same file name, and some videos with no subtitles. For example,
video01.mp4
video01.srt
video02.mkv
video02.srt
video03.mp4
video03.sub and .idx
video04.mkv
video05.mkv
video05.sub and .idx
video06.mp4
video06.srt
video06.sub and .idx
and so on. The example above uses only two types of videos (mp4 and mkv) and subtitles (srt and sub/idx). Notice that video06 has two types of subtitles (srt and sub/idx) while video04 has no subtitles.
Is it possible to make a batch file that will go over the folder and mkvmerge any video type (mkv or mp4 in this case) with any available subtitles (in this case, srt, sub/idx, or both), and output to an mkv that will be written in another folder? Given the example above,
video01.mp4 and video01.srt will be merged using mkvmerge and the output, video01.mkv, will be written to a new folder
Hopefully, I can add other video types (like avi) to the code if needed.