I have a folder of mp4 files with a video and audio track, with subtitles in srt format in the same location. Is there a way to use a batch file to merge them together in so that the tracks are in this order afterwards
track1:video
track2:audio
track3: subtitles
When I use this batch file:
When it's clicked, all it does is close instantly. When I run the batch file from command prompt, it does nothing except clear the input and wait for my next commandfor %%A IN (*.mkv) do (
"C:\Program Files\MKVToolNix\mkvmerge.exe" -o "remux-%%~nxA" "%%~A" "%%~nA.srt"
)
+ Reply to Thread
Results 1 to 5 of 5
-
-
Add a new line at the end called "pause" (without quotes). Then the window will not close and you will have time to read error messages. Do you actually have any .mkv files in the directory the .bat file is running in? If the for...do command doesn't find any .mkv files it will skip the actual "loop".
Last edited by sneaker; 12th May 2017 at 16:20.
-
ugh i might be an idiot today lol, forgot to change the mkv in the batch to mp4. It didnt give any errors when i tried. will report back with what i find
edit:I found the way to get it to go from mp4 to mkv successfully, but it includes the original file extension just before mkv "filename.mp4.mkv". Is there any way to stop it from including the mp4 part? -
%%~nA.mkv (Without the "x" which is for file extension. You already did that for the .srt ...)
http://stackoverflow.com/questions/8749637/dos-command-to-sperate-file-name-and-extens...into-variables
Similar Threads
-
How to join files with MKVToolnix
By yaston in forum Video ConversionReplies: 2Last Post: 5th Feb 2016, 08:22 -
Q: MKVToolNix - Chapters and appended files
By markanini in forum Newbie / General discussionsReplies: 1Last Post: 17th Oct 2015, 10:40 -
Why mkvmerge (mkvtoolnix) shortens files when muxing ?
By Marus Nebunu in forum Video ConversionReplies: 3Last Post: 25th Jun 2014, 07:27 -
CLI to mux/merge MP4 video and AAC audio?
By RogerTango in forum Video ConversionReplies: 8Last Post: 13th May 2013, 16:43 -
I need CLI software to remove tags on AVI,ASF,FLV,MKV,MPG,MP4,WMV files!
By pitoloko in forum Video ConversionReplies: 4Last Post: 16th Oct 2012, 17:59