[MEncoder-users] Cannot pass bitrate via command line when using mencoder's profiles

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Dec 6 20:39:17 CET 2010


On Mon, Dec 06, 2010 at 07:17:42PM +0100, Markus Bonet wrote:
> Currently these versions are installed:
> 
> x264.x86_64                                                 0.0.0-0.28.20100706gitd058f37.fc14                                            @rpmfusion-free
> x264-libs.x86_64                                            0.0.0-0.28.20100706gitd058f37.fc14                                            @rpmfusion-free
> 
> mencoder.x86_64                                                1.0-0.119.20100703svn.fc14                                                 @rpmfusion-free
> 
> 
> My goal is a 2-pass encoding with a target filesize. My script
> calculates the target bitrate after the first pass and calls
> mencoder like this:
> 
> mencoder input -profile pass2 -x264encopts bitrate=1234 -o output
> 
> 
> When doing so, x264 fails:
> 
> x264 [error]: constant rate-factor is incompatible with 2pass.
> 
> So the bitrate isn't set.
> 
> 
> If I add bitrate to my profile or call all in the command line
> without the usage of a profile, everything is ok.
> 
> Was is broken here and how do I fix it? As mentioned, in my previous
> setup (on Fedora 12) it was always ok.

No idea why it worked before (though maybe it was such an ancient version
that it did not yet use x264's own option parser), but the issue is
probably that if the profile does not specify a bitrate, crf mode is implied.
Since the profile is parsed independently you end up with a incorrect
intermediate state that is 2-pass and CRF.
I suspect that just specifying a bitrate in the profile (should not matter
what at all, best choose something extreme so you notice immediatly if the
one on the command-line is ignored) should make it work.


More information about the MEncoder-users mailing list