I have a bunch of anime series in mkv format on my computer where I want to condense the audio and subtitle tracks from multiple videos together and make them have multiple audio and subtitle tracks instead of more separate videos. For example 2 videos, one with English audio and 2 subtitles (one is for titles, signs etc.) and another video with Japanese audio with subtitles that were translated English. Instead of that I want one video with both audio and all subtitle tracks.

The audio, video and subtitles are all compatible with one another, I guess meaning they can be muxed together no problems since I tried one with mkvmerge and it worked. The English versions have the same filenames with the exception of the episode number. The Japanese version has a different filename than the English version but all the Japanese versions have the same filenames with one another. With each anime series they are usually all the same format. It's not like I'll have an anime series with different video qualities such as aspect ratios, video format, etc. They are usually the same.

I already found a program that can batch rip everything from the mkv file such as video, audio and subtitles. If anyone's interested in that program it's called mkvcleaver I think. It was pretty handy. I was looking for program that is similar to that but ADDS extra audio and subtitle tracks in bulk. I don't want to re-encode anything. I couldn't find anything however.

I was using mkvmerger but as I'm sure other people have the same problem, it can only do each video one at a time. In which this program is now very time consuming when you have over 300 videos plus. Not to mention I read that the program creator doesn't ever intend on adding a batch feature due to time constraints.

I googled on how to make a batch script for this program and came across all kinds of things but most of the time it was for a different process and wouldn't work for me. I found one where some said to just copy the command line from mkvmerge and paste it onto a text document then paste it for as many as there are videos or episodes then change them. As I mentioned, not a good solution for the large volume of videos I have.

I know absolutely nothing of coding or anything about the details of mkv files and what not. I only got as far as I did from doing extensive googling. So I'll just post a few things I found and some info from mkvmerge

I came across this a lot

FOR %%A IN (*.mkv) DO mkvmerge -o "remux-%%~nA.mkv" "%%~A"

I guess that's what you use to include in a .bat file but I have no idea what it means, what else goes with it or how to use it.

Also I came across this video


It's not what I want to do but I saw something in there about not having to worry about renaming so I wanted that to be included in the .bat file.


"C:\Program Files (x86)\MKVToolNix\mkvmerge.exe" -o "C:\\Users\\Guy\\Videos\\Anim\\Anime Newly Combined Audio Video and Subtitles\\[Yousei-raws] Phantom Requiem for the Phantom 01 [BDrip 1920x1080 x264 FLAC] (1).mkv" "--track-name" "0:BDrip by moodperson" "--default-track" "0:yes" "--forced-track" "0:no" "--display-dimensions" "0:1920x1080" "--language" "1:jpn" "--track-name" "1:LPCM -> FLAC" "--default-track" "1:yes" "--forced-track" "1:no" "--language" "2:eng" "--default-track" "2:no" "--forced-track" "2:no" "-a" "1" "-d" "0" "-s" "2" "-T" "--no-global-tags" "--no-chapters" "(" "C:\\Users\\Guy\\Videos\\Anim\\ALREADY WATCHED\\Phantom\\[Yousei-raws] Phantom Requiem for the Phantom [BDrip 1920x1080 x264 FLAC]\\[Yousei-raws] Phantom Requiem for the Phantom 01 [BDrip 1920x1080 x264 FLAC].mkv" ")" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "C:\\Users\\Guy\\Videos\\Anim\\Anime Subtitles and Audio Extracts\\[Cman21] Phantom ~Requiem for the Phantom~ Ep 01 'Awakening' [Blu-Ray 1080p][DBAFDE5F]_Track01.flac" ")" "--forced-track" "0:no" "-s" "0" "-D" "-A" "-T" "--no-global-tags" "--no-chapters" "(" "C:\\Users\\Guy\\Videos\\Anim\\Anime Subtitles and Audio Extracts\\[Cman21] Phantom ~Requiem for the Phantom~ Ep 01 'Awakening' [Blu-Ray 1080p][DBAFDE5F]_Track03.ass" ")" "--forced-track" "0:no" "-s" "0" "-D" "-A" "-T" "--no-global-tags" "--no-chapters" "(" "C:\\Users\\Guy\\Videos\\Anim\\Anime Subtitles and Audio Extracts\\[Cman21] Phantom ~Requiem for the Phantom~ Ep 01 'Awakening' [Blu-Ray 1080p][DBAFDE5F]_Track04.ass" ")" "--track-order" "0:0,0:1,0:2,1:0,2:0,3:0"

I'm sorry that this is so long and drawn out but I wasn't sure what else to put or to do. I think this might be too much to ask but can someone help me making a script for all of this? Is it difficult?