VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member nbarzgar's Avatar
    Join Date
    Sep 2004
    Location
    Austria
    Search Comp PM
    Hello,

    I have got quite a number of .mkv-files of the same format. Like this:
    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
    So it's obvious I don't need re-encoding, 'just' re-muxing, to DiVX w/ Subs. Is there a simple way?
    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!
    Quote Quote  
  2. VH Wanderer Ai Haibara's Avatar
    Join Date
    Jan 2006
    Location
    Somewhere on VideoHelp...
    Search Comp PM
    I believe you can use the job list in AVIdemux to simply remux the videos into .avi (using 'copy' for both video and audio). I don't think it'll handle the subs that way, though.

    I'm not sure AVIAddXSubs can be used in a batchfile, but I could be wrong.
    If cameras add ten pounds, why would people want to eat them?
    Quote Quote  
  3. Member nbarzgar's Avatar
    Join Date
    Sep 2004
    Location
    Austria
    Search Comp PM
    That's right.

    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!
    Quote Quote  
  4. Member nbarzgar's Avatar
    Join Date
    Sep 2004
    Location
    Austria
    Search Comp PM
    Well,

    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.
    Code:
    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
    Note: the track ID's are crucial, you have to find out what they are first, they differ for any given .mkv. Then replace the corresponding numbers in this example with your own.
    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"
    I presume (as in my case) that the files all contain the same streams in a respectively given order for the batch to work properly.
    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...
    Quote Quote  
  5. Member nbarzgar's Avatar
    Join Date
    Sep 2004
    Location
    Austria
    Search Comp PM
    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,
    Code:
     for %%F in (*.avi,*.mp3) do "path\to\mencoder" -oac copy -ovc copy  -o "%%F_New.avi" -audiofile "%%F" "%%F"
    I also tried this:
    Code:
     for %%F in (*.avi,*.mp3) do "path\to\mencoder" -oac copy -ovc copy  -o "%%F_New.avi" -audiofile "%%F.mp3" "%%F.avi"
    but both ways mencoder didn't find the correct streams, although with single files and their respective names instead of variables it works like a charm...!
    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).

    Help, PLEASE!
    Quote Quote  
  6. Member Wolfen's Avatar
    Join Date
    Jun 2009
    Location
    Canada
    Search Comp PM
    You already know Mencoder, so why not use Its front end "MeGUI" (it's all I use for converting/encoding) and use the batch form for that. Hope it helps.
    Quote Quote  
  7. Member nbarzgar's Avatar
    Join Date
    Sep 2004
    Location
    Austria
    Search Comp PM
    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:
    Code:
    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"
    Of course the file-extension should be changed respectively, depending on the file-type....
    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"...
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!