VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. I'd greatly appreciate some help with using MKVpropedit scripts, or if anyone knows how to get the Java app JMKVpropedit working, that would be helpful too.

    What I need: I have a VERY large collection of MKV files. The only thing I want to do is change the "forced" tag for subtitle track 2 to "yes".

    How I've been doing it: Creating a job for each individual file in MKVToolNix, setting the flag, and running the remux to make a copy, then deleting the original. I've been queuing up multiple jobs, selecting the tag for each one. But making the individual selections plus running the queue to make the copies takes forever. Not to mention I have to work in small batches because I don't have a lot of space for copies.

    What I want different: To save time by simply performing a header edit for this single tag.

    My problem: I have NO idea how to even BEGIN using scripts with MKVpropedit. I understand that there is no technical GUI for this program, but I've become exhausted trying to find information on how to learn the program. Everywhere I look, people are talking about scripting as if we all already know how to even ACTIVATE or USE a script. But what do you even... DO?? Create a .bat file? Run something in CMD?

    I found JMKVpropedit, but this app doesn't even seem to work. I make my tag edits but clicking Process Files or Generate Command does nothing at all. I'm using the latest stable version, Java 8 u144 on Win 10 x64. Any help would be greatly appreciated, creating new forum logins to ask questions about this kinda stuff is always my last resort... thanks.
    Quote Quote  
  2. Originally Posted by AManOfCharacter View Post
    But what do you even... DO?? Create a .bat file? Run something in CMD?
    That's your choice. Basically, everything you can write in CMD you can also write into a .bat file. A .bat file is mostly just a way to store the commands if you want to re-use them later or if it's a long list of commands so that you can edit them in a decent text editor instead of the terminal window.

    I'm gonna give you some instructions. There are other ways but I think it helps if you can get it running without problems first.
    1. Add the mkvtoolnix folder to %PATH%. Usually, that's c:\program files (x86)\mkvtoolnix
    See: https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/
    2. In Windows explorer navigate into the folder with the mkv files you want to edit and in there hold shift key and right-click into an empty spot and click "Open command window here".
    3. In that command window type: for %a in (*.mkv) do mkvpropedit "%a" --edit track:s2 --set flag-forced=1



    Notes:
    - read: https://mkvtoolnix.download/doc/mkvpropedit.html
    - I used FOR ... IN (...) DO loop. That's the Windows way of executing a command again and again for many files. I hope you get the principle. Basically %a will be replaced each time for every file with the ending .mkv in that folder.
    - You can write the same command into a text file, rename it "whatever.bat" and execute it with a double-click. Only difference: you need to use double % instead of single %: for %%a in (*.mkv) do mkvpropedit "%%a" --edit track:s2 --set flag-forced=1
    Quote Quote  
  3. [QUOTE=sneaker;2495419]
    Originally Posted by AManOfCharacter View Post
    I'm gonna give you some instructions.
    YES! Thank you so much this is exactly what I needed. The configuring of the PATH shortcuts, the opening of a CMD right in a folder, plus the command line to actually run in mkvpropedit. All worked perfectly.

    I'm embarrassed to be a 29 year old geek who is still learning some of this simple CMD stuff, as I've been using Windows since I was 6, haha. Thanks for the help man. I really appreciate it. On that command line, I'm pretty sure I get the principle now, just need to keep reading and learning. Thanks!
    Quote Quote  
  4. Member
    Join Date
    Dec 2007
    Location
    Canada
    Search Comp PM
    I have tried the above under Win10. The instructions only open powershell in the folder of mkvs. It seems the structure of the for loop has changed and when executed spews errors. Sadly I don't have sufficient smarts to figure out how this loop should be written. Thirty five years ago I could mange DOS OK, I have fallen far far behind.
    Any help will be much appreciated.
    Quote Quote  
  5. Yeah, in Windows 10 the context-menu shows the Powershell instead of the cmd as in older versions. A simple way to open the cmd is to navigate to your folder in Windows explorer, then click into the address bar and simply enter "cmd".
    Image
    [Attachment 52693 - Click to enlarge]



    (There are also various ways to get the "open command prompt here" on Windows 10 back, google: "windows 10 restore open command prompt here ".)
    Quote Quote  
  6. Member
    Join Date
    Dec 2007
    Location
    Canada
    Search Comp PM
    Thank you sneaker. Simple when someone shows you how.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!