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
+ Reply to Thread
Results 1 to 7 of 7
-
-
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. -
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. -
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 -
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.
Similar Threads
-
Is there a CUDA encoder with command line?
By Huddler in forum Video ConversionReplies: 17Last Post: 25th Jun 2011, 18:26 -
Does xvid cli (command line version of xvid) actually exist ?
By vhelp in forum ProgrammingReplies: 10Last Post: 29th Oct 2009, 14:18 -
Command line xvid --> flash conversion...
By bla4free in forum Video ConversionReplies: 20Last Post: 13th Aug 2008, 17:12 -
Mencoder 2-pass Command Line to flv
By mrready in forum Video ConversionReplies: 1Last Post: 16th Dec 2007, 03:25 -
Mencoder 2-pass Command Line to flv
By mrready in forum ffmpegX general discussionReplies: 2Last Post: 15th Dec 2007, 11:49