I have got quite a number of .mkv-files of the same format. Like this:
So it's obvious I don't need re-encoding, 'just' re-muxing, to DiVX w/ Subs. Is there a simple way?Code:Format : Matroska File size : 343 MiB Duration : 49mn 9s Overall bit rate : 975 Kbps Writing application : mkvmerge v2.0.0 ('After The Rain Has Fallen') built on Feb 7 2007 18:53:57 Writing library : libebml v0.7.7 + libmatroska v0.8.0 Video Format : MPEG-4 Visual Format profile : Streaming Video@L1 Format settings, BVOP : Yes Format settings, QPel : No Format settings, GMC : No warppoints Format settings, Matrix : Default Codec ID : XVID Codec ID/Hint : XviD Duration : 49mn 6s Bit rate : 798 Kbps Width : 704 pixels Height : 480 pixels Display aspect ratio : 4/3 Frame rate : 23.976 fps Resolution : 24 bits Colorimetry : 4:2:0 Scan type : Progressive Writing library : XviD 1.1.2 (UTC 2006-11-01) Audio Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Codec ID : A_MPEG/L3 Codec ID/Hint : MP3 Duration : 49mn 9s Bit rate mode : Constant Bit rate : 128 Kbps Minimum bit rate : 128 Kbps Channel(s) : 2 channels Sampling rate : 48.0 KHz Resolution : 16 bits Writing library : LAME3.96r Encoding settings : CBR Language : English Text Format : VobSub Codec ID : S_VOBSUB Codec ID/Info : The same subtitle format used on DVDs Language : English
If not, would someone advise me on how to create a batch file using avidemux/VirtualDubMod/mkvextract (one of these is sufficient, whatever is easier to do... ) and AVIAddXSubs?
I'm a newbie on those .bat-files, know the basics though.
Would be great, thanks!
+ Reply to Thread
Results 1 to 7 of 7
Thread: Batch re-mux .mkv to DiVX w subs
If cameras add ten pounds, why would people want to eat them?
The downside is that I cannot access the subs included in the .mkv-files with avidemux. So I would have to de-mux those (or all streams) first and then re-mux. That's the question: how to do it with a batch file, if simple remuxing with one app in one step is not possible.
Other apps for muxing into .divx with subs are there, like avisub, divxmux.exe (and the GUI of course) and Txt2VobSub. But - I need help on a possible batch file.
Especially the opening and loading of apps and files by .bat-file, when to use the Windows commands in the .bat-file, when to use the apps' own commmands and how to differentiate between them on the respective lines of the .bat.
Perhabs someone already did something similar and could post a sample .bat-file? Would possibly be all I need! Not necessarily this routine (mkv2divx...), just something with two or more applications used and those with their respective parameters, etc.
Thanks in advance!
I solved my own problem partly this way. For batch demuxing .mkv-files - assuming they're in the same directory! - put the following into any txt_editor (Windows Editor will do as well as any other) and be careful to replace the path to mkvextract.exe with the correct one on your system (keep quotation-marks!), then: save as a .bat-file.
for %%F in (*.mkv) do "C:\path to...\mkvextract.exe" tracks "%%F" "1:%%F_Track1.mp3" "2:%%F_Track2.idx" "3:%%F_Track3.avi" pause
You may use mkvinfo this way (from mkvextract's helpfile), just open Windows' commandline editor in mkvmerge's directory, then enter the following:Code:
mkvmerge -i "path\to\one\of\the\movie.mkv"
So of course for e.g. an ac3-stream you would change the extension in the batch from this "1:%%F_Track1.mp3" to this: "X:%%F_Track1.ac3" where "X" represents the track-ID you found out before.
When you have prepared and saved the .bat-file, you put in into the same directory as the .mkv-files, then double-click the .bat-file - and perhabs have a cup of coffee...
Well, here I am back.
Believe it or not, but I still have not solved the problem of batch-muxing the extracted streams. For now I have given up to try muxing the .divx /w vobsub. Although possible in theory of course, in practice mkvextract (or mkvmerge?) damages the vobsub-files and they cannot be used in any divx-muxing app. Neither does OCR work, 'cause they're damaged...
But I would like at least to batch re-mux the extraxted video-only avi's and the mp3's into working avi-files. And I have found a number of instructions, but not how to do a working batch-file!
I would gladly use mencoder, ffmpeg or AviMux GUI, but cannot for the life of me figure out how to do the batch properly.
My mencoder batch for example looked something like this,
for %%F in (*.avi,*.mp3) do "path\to\mencoder" -oac copy -ovc copy -o "%%F_New.avi" -audiofile "%%F" "%%F"
for %%F in (*.avi,*.mp3) do "path\to\mencoder" -oac copy -ovc copy -o "%%F_New.avi" -audiofile "%%F.mp3" "%%F.avi"
So basically I need to know, what variables I would have to use... Is it possible at all?
With ffmpeg I haven't succeeded so far in creating an .avi that my DVD-standalone will seek through properly (apart from the batch problem).
Thank you, I solved the problem using mencoder and a working batch.
The problem was that I didn't use the variables correctly indeed; I got help somewhere else (exception: I don't usually post same question in different forums) so here is a working example of an .avi-muxing-batch for mencoder:
for %%F in (*.avi) do "x:\path\to\mencoder" "%%~F" -ovc copy -oac copy -mc 0 -noskip -noodml -audiofile "%%~nF.mp3" -o "%%~nF_new.avi"
By the way: I really didn't like to use MeGUI here, because I would have to add every mux-job manually (AFAIK) and for umpteen files with the same task I like to have these nice little ".bat's"...