-
Notifications
You must be signed in to change notification settings - Fork 14
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
Comments
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:
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: 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! |
Thank you very much,
it is helpfull
Fabrizio
…________________________________
From: Rice14 <[email protected]>
Sent: Friday, June 19, 2020 10:51 PM
To: Serede/mkvtoolnix-batch <[email protected]>
Cc: Braciata <[email protected]>; Author <[email protected]>
Subject: Re: [Serede/mkvtoolnix-batch] Extra files (#6)
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 -0) and names it"%%~nA.mkv"
What %%~nA does is it calls 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!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSerede%2Fmkvtoolnix-batch%2Fissues%2F6%23issuecomment-646855897&data=02%7C01%7C%7C099c3990d5304120821708d8149282d0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637281966768798262&sdata=lia2kQOGp6GrcWrYy%2BbIyXUGZrNG0caawZarncXDxnI%3D&reserved=0>, or unsubscribe<https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP4YXQSLCY2HREUFLPDNQTTRXPFUHANCNFSM4NZPL7HQ&data=02%7C01%7C%7C099c3990d5304120821708d8149282d0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637281966768808256&sdata=zyiOYIkOpogN6rvP10DoU4iPTPAlfFnLJsla0mmgWm8%3D&reserved=0>.
|
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) |
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
The text was updated successfully, but these errors were encountered: