mkvmerge batch script help

October 27, 2010 at 17:44:05
Specs: Windows 7

I have been using megui to encode files my pc records.

I'm trying to create a batch script to save on clicks, I've gotten everything working other than mkvmerge so far.

from looking around i cant seem to find what im looking for, im a bit new to scripting so maybe im missing something.

what i would like to do is mux a .264 file and .ac3 file to .mkv using the for command or something that can allow me to use variables for the drive/path/filename/

this is what i tried doing

for /R %%A in () do mkvmerge.exe -o %%~dpnA-muxed.mkv --engage keep_bitstream_ar_info --default-duration 0:24000/1001fps -d 0 -A -S %%~dpnA.264 -a 0 -D -S %%~dpnA_new.ac3

i know the script i posted above will not work. but is what i was pretty much aming at. with all my other for scripts i only needed to put one extention into the () ex: (*.vob). im stumped because this needs two files, which both are named different. plus i have multiple files that id like to mux together

any info is appreciated


See More: mkvmerge batch script help

Report •

October 27, 2010 at 22:21:14
figured it out...

this is what i came up with

:: muxes the encoded ac3 file to a mkv file called audio.mkv
for /R %%A in ("*_new.ac3") do mkvmerge -o "Audio.mkv" -a 0 -D -S "%%~dpnA.ac3"

:: muxes the encoded .264 file to the mkv i just made ^ audio.mkv
for /R %%A in ("*.264") do mkvmerge.exe -o "%%~dpnA-muxed.mkv" "Audio.mkv" --engage keep_bitstream_ar_info --default-duration 0:24000/1001fps -d 0 -A -S "%%~dpnA.264"

:: deletes the unwanted audio.mkv file
del "Audio.mkv"

Report •
Related Solutions

Ask Question