[MEncoder-users] "requested bitrate is too low." in 2-pass x264 encoding
Grozdan
neutrino8 at gmail.com
Thu Apr 8 18:34:22 CEST 2010
On Thu, Apr 8, 2010 at 5:49 PM, 呂建林 <x4base at gmail.com> wrote:
> Hello, everyone.
> I tried to encode a file to the x264 codec
> These were what I typed:
> mencoder -nosound -ovc x264 -x264encopts pass=1:bitrate=2000 -o
> test.mp4 -endpos 10 shadow.flv
> mencoder -nosound -ovc x264 -x264encopts pass=2:bitrate=2000 -o
> test.mp4 -endpos 10 shadow.flv
You do know that this will create an AVI file, right? Regardless of
what extension you give it, it'll still be an AVI. This is not ffmpeg
so if you want an mp4, use -o lavf but beware that mencoder is broken
outputting to anything but AVI, MPEG PS and RAW. I guess with lavf and
mp4 encoding WITHOUT b-frames, it'll do just fine but the moment you
add b-frames to your encode (and you're adding them since by default
they are enabled) it'll create a broken mp4
>
> my mencoder and libx264 were compiled from the svn and git version ,respectively
>
> the 1st-pass finished successfully. but in the 2nd pass , it
> complained "x264 [error]: requested bitrate is too low. estimated
> minimum is 9 kbps".
> The same thing kept happening even if I set the bitrate=20000000
> This is quite strange.
>
>
> The following is what I tried:
>
> I did a little code tracing and I found that in the function
> init_pass2 in encoder/ratecontrol.c of the libx264 code,
> there was
> if( all_available_bits < all_const_bits)
> {
> x264_log( h, X264_LOG_ERROR, "requested bitrate is too low.
> estimated minimum is %d kbps\n",
> (int)(all_const_bits * rcc->fps / (rcc->num_entries *
> 1000.)) );
> return -1;
> }
>
> The value [all_available_bits] is calculated from
> h->param.rc.i_bitrate * 1000. * duration.
> Also , the value of [duration] is summed from
> rcc->entry[i].i_duration , which , in the log file divx2pass.log, seem
> to be 0 for each i.
> Is it common for i_duration to be always 0?
> So it seems that the expression all_available_bits < all_const_bits is
> always true, and therefore mencoder keeps complaining
>
> Did I misunderstand anything ?
> If
> Or I just gave some wrong options to mencoder?
Looks like an libx264 issue but I may be wrong - mencoder just parses
stuff from libx264 so if there's the problem, better ask on the
x264-devel list
>
> Thanks for your attention.
>
> my system info:
> 2.6.30.10-105.2.23.fc11.x86_64
> MEncoder SVN-r31027-4.4.1
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>
More information about the MEncoder-users
mailing list