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.
+ Reply to Thread
Results 1 to 6 of 6
-
-
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=sneaker;2495419] 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! -
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. -
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".
[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 ".)
Similar Threads
-
MKV Batch Metadata Removal Tool - JMkvPropedit??
By BJ12 in forum Newbie / General discussionsReplies: 18Last Post: 13th Apr 2021, 19:18 -
Help VHS Plugins and scripts using AvsPmod
By Miro72 in forum Newbie / General discussionsReplies: 23Last Post: 16th Nov 2017, 15:56 -
mkvpropedit to set language
By WakaFlakaFlakes in forum Newbie / General discussionsReplies: 2Last Post: 12th May 2017, 14:38 -
JMkvpropedit 1.3.3.1 Extra parameters
By euphonic in forum Newbie / General discussionsReplies: 13Last Post: 25th Sep 2016, 14:21 -
Scrtipt to use mkvpropedit to change title
By mkr10001 in forum Newbie / General discussionsReplies: 7Last Post: 22nd Sep 2014, 05:00