Giter Club home page Giter Club logo

Comments (3)

Serede avatar Serede commented on May 28, 2024 1

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.

kenichi512 avatar kenichi512 commented on May 28, 2024 1

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.

Serede avatar Serede commented on May 28, 2024

See possible workaround by @Rice14 in #6.

from mkvtoolnix-batch.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.