Comments (3)
Hi @kenichi512 !
The track multiplexing functionality that is coded in the JSON file belongs to the MKVToolNix project. The main limitation is that the exported options are not file-wise parameterizable, that's why here one must remove the --output
setting from the JSON and use -o "mkvmerge_out/%%f"
inside the FOR loop of the script (%%f
is each original filename). Otherwise, a single output file would be overwritten one time after another for each input file, and only that of the last multiplexed file would remain when the script finishes.
What you are proposing requires a similar workaround: Let %%f
be the name of each input MKV file, you could place the respective subtitles as subs/%%f.ass
files (for example) and tell mkvmerge
to include one each as a subtitle track via additional arguments in the BAT file. You can try manually adding the subtitle track in the GUI and exporting the options JSON file to get an idea of how the command should look like.
Feel free to experiment and submit a pull request when you get it done!
from mkvtoolnix-batch.
I clarify that my knowledge in DOS are very few, but someone helped me a long time ago with this CLI for the same purpose.
@echo off set "mkvmerge=drive\path\mkvmerge\mkvmerge.exe" FOR %%I in (drive\path\*.MP4) DO "%mkvmerge%" --output "drive\path\output\%%~nI.mkv" --language 0:jpn --track-name 1:"日本語" --language 1:jpn ( "%%I" ) --sub-charset 0:UTF-8 --language 0:spa --track-name 0:"Español (México)" ( "drive\path\input\%%~nI.esLA.ass" ) --sub-charset 0:UTF-8 --language 0:eng ( "drive\path\input\%%~nI.enUS.ass" ) --sub-charset 0:UTF-8 --language 0:por --track-name 0:"Português (Brasil)" ( "drive\path\input\%%~nI.ptBR.ass" ) --track-order 0:0,0:1,1:0,2:0,3:0 PAUSE
However, this has a disadvantage and is the interpretation of code page (the tags on "--track-name"). Although I save the batch file as UTF-8, the metadata of the multiplexed video appear with other symbols. I do not understand how in MKVToolnix these errors do not happen.
from mkvtoolnix-batch.
See possible workaround by @Rice14 in #6.
from mkvtoolnix-batch.
Related Issues (13)
- changing directory path without opening the selector windows
- can anybody post a video tuts on this ?
- Does this work with .ass files?
- Wrong Repo
- ... HOT 2
- Muxing same subs over and over HOT 1
- Adding 2 subtitles failed HOT 1
- Json error
- Extra files HOT 3
- Any way to make the batch merge similar name subs? HOT 1
- The file '2' could not be opened for reading: open file error. HOT 1
- Doubles the audio tracks and subtitles HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkvtoolnix-batch.