PDA

View Full Version : Any way to batch mux into mkv?


Morien
13th August 2005, 07:48
Hi,
I have a series of avi files and corresponding ssa files named 00x.avi and 00x.ssa (eg. 001.avi-001.ssa). I want to mux them all into matroska files (maybe even with languages set) however they go into the hundreds and so will take a very very long time.
I'm wondering, is there anyway to batch mux them? So that I can just set the process to go and come back later with the avi and subs muxed into mkv's ?

Thanks
Morien

celtic_druid
13th August 2005, 08:42
a for %%f in (*.avi) type statement and mkvmerge should do the trick since the avi and the ssa have the same name.

Morien
13th August 2005, 12:55
Thanks for your reply.
I'm new to using mkvmerge without the GUI, and even then I do nothing fancy, so I apologise for having no clue. I've never added code into the commandline either.
How should my command line look with that added code?

Thanks a lot
Morien

celtic_druid
13th August 2005, 13:43
Just load one into mmg, copy the commandline then change it to:
%%f in (*.avi) DO ("p:ath\to\mkvmerge.exe" rest of commandline....)
with "%%f" where the avi was and "%%~nf.ssa" where the ssa was and "%%~nf.mkv" where the mkv was.

Save as a batch file and run in the directory with the avi/ssa's. In theory it should process all of the files and output mkv's same as the way you originally set it up in mmg.

Morien
13th August 2005, 14:33
Hey,

thanks for your quick reply. Sorry for being thick as all get up tho.

I've made a batch file with the following code:
%%f in (*.avi) DO ("C:\Program Files\MKVtoolnix\mkvmerge.exe" -o "D:\Video\DragonBall Z\mkv\%%~nf.mkv" --language 0:jpn --track-name "0:DragonBall Z" --default-track 0 --aspect-ratio 0:4/3 --language 1:jpn --track-name 1:Japanese --default-track 1 -a 1 -d 0 -S "D:\Video\DragonBall Z\mkv\%%f" --language 0:eng --track-name 0:English --default-track 0 -s 0 -D -A "D:\Video\DragonBall Z\mkv\%%~nf.ssa" --track-order 0:0,0:1,1:0)

When I double click it however it says '%f' is an unrecognised command... etc.
Once again sorry for being so ignorant, I'm kinda wandering in the dark when by myself :(

Thanks
Morien

Morien
13th August 2005, 14:44
Never mind, got it working. I forgot the FOR syntax. So now it looks like:

for %%f in (*.avi) DO ("mkvmerge" -o "%%~nf.mkv" --language 0:jpn --track-name "0:DragonBall Z"

--default-track 0 --aspect-ratio 0:4/3 --language 1:jpn --track-name 1:Japanese --default-track 1 -a

1 -d 0 -S "%%f" --language 0:eng --track-name 0:English --default-track 0 -s 0 -D -A "%%~nf.ssa"

--track-order 0:0,0:1,1:0)

Thanks a lot for your help. It's working now :)

Morien