Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra files #6

Open
Braciata opened this issue Jun 9, 2020 · 3 comments
Open

Extra files #6

Braciata opened this issue Jun 9, 2020 · 3 comments

Comments

@Braciata
Copy link

Braciata commented Jun 9, 2020

I love this script.
I have a question. Everything works if all variables are in the same file. If I had to add for example an audio or a subtitles from another file, what should I put?
Thank you.
Fabrizio

@seanmcnally98
Copy link

seanmcnally98 commented Jun 19, 2020

So I found this issue after googling around with the same problem. I didn't wind up using this script verbatim, but wrote my own from cobbling together different pieces of code. Here's what I came up with:

for %%A IN (*.m2v) do ( "C:\Program Files\MKVToolNix\mkvmerge.exe" -o "%%~nA.mkv" "%%~A" --language "0:eng" "%%~nA.ac3" --language "0:eng" )

This takes all the .m2v files and .ac3 files that have the same name and muxes them together, and assigns the language "english". If you need a different language, you can figure out the code by applying it within the GUI then going to Multiplexer > Show Command Line (for example, Italian is ita)

Quick breakdown of how it works:
for %%A IN (*.m2v) says that for every .m2v file, do the following thing.

It calls up the MKVmerge.exe file (be sure to replace that path with your own), and sets up an output file (by using -o) and names it"%%~nA.mkv" What that means is %%~nA will call up the file name from the current m2v file. So, if you're dealing with a video file called Episode 1.m2v, these lines will start creating Episode 1.mkv.

Now, that we've started our output file and given it a name, we need to add the source files. First the video - "%%~A", followed by the language we want, then we look for an audio file with the same name and the extension .ac3 - "%%~nA.ac3", and we give that a language as well.

And that's it! Hope that helped!

@Braciata
Copy link
Author

Braciata commented Jun 20, 2020 via email

@Serede Serede mentioned this issue Jan 16, 2021
@TheVainOrphan
Copy link

TheVainOrphan commented Jan 4, 2022

Will this work with .ass files as the subtitle files? Also. is this code entered into the bat? sorry a little new to this and confused. I've also set up @Serede 's code and it works, just wondering how to implement your workaround for external files (in my case, .mkv and .ass files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants