VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. Member
    Join Date
    Sep 2002
    Location
    South Africa
    Search Comp PM
    Hello Everyone, I have been looking (unsuccessfully) for a command line tool which can be used to encode an avi file to divx or xvid (I don't really mind which).

    But, I want it to do two-pass encoding, and I want to be able to specify the bitrate from the command line, and not require any other user input.

    I don't mind if the tool launches virtualdub or something like that.

    Has anyone encountered a tool which does this? I have found thing which can do 1-pass encoding, but they tend to not let you specify the bitrate either, which I really want to be able to do

    Any help would be appreciated.
    Thanks
    Quote Quote  
  2. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    I'm certain that I read that virtualdub can now do CLI - I dunno how "comprehensive" the options you can use are but it's probably worth investigating.
    If in doubt, Google it.
    Quote Quote  
  3. Member
    Join Date
    Sep 2002
    Location
    South Africa
    Search Comp PM
    I've had a bit of a look at using VirtualDub's Sylia scripts, but it is not easy to specify the different passes to do, or the bitrate. It appears to me as though they are locked up in this line (which I think contains all of the DivX settings):

    VirtualDub.video.SetCompData(512,"zAEAAAAAAAACAAAA4OYLAAAAgE A .... jLnR4dAA=");

    But it's not obvious which bits refer to bitrate, which pass is being done, etc)

    I was hoping maybe someone had a program which could generate this line of code, based on a few parameters, such as bitrate, pass number, etc.
    Quote Quote  
  4. Member
    Join Date
    Sep 2002
    Location
    South Africa
    Search Comp PM
    Thanks Abond,

    mencoder seems to do the trick, for anyone interested in how to run it, you need to use the following commands (one for each pass). Note, there are lots more parameters you could use...

    mencoder -ovc xvid -xvidencopts pass=1:bitrate=900 -oac lavc -lavcopts acodec=mp3:abitrate=128 input_file.avi -o output_file.avi

    mencoder -ovc xvid -xvidencopts pass=2:bitrate=900 -oac lavc -lavcopts acodec=mp3:abitrate=128 input_file.avi -o output_file.avi

    (The only difference is the pass number)

    If you want some additional Mencoder documentation, I found this useful:
    http://gentoo-wiki.com/HOWTO_Mencoder_Introduction_Guide
    Quote Quote  
  5. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    Why not -oac mp3lame? Anyone interested in mencoder might also want to check out doom9's meGUI.
    Quote Quote  
  6. Member
    Join Date
    Sep 2002
    Location
    South Africa
    Search Comp PM
    Agreed, -oac mp3lame is probably better, I hadn't found it at that stage in my search, as I was more interested in getting the video part to work, rather than optimising audio.
    Quote Quote  



Similar Threads

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