[x264-devel] H264 2nd pass error occurs. It seems to be after the revision "Blu-ray support: NAL-HRD, VFR ratecontrol, filler, "

x4base x4base at gmail.com
Mon Apr 12 10:33:44 CEST 2010


Hi,everyone
I'm a mplayer/mencoder user.
I want to make a h264 clip using mencoder.
However, an error occurs ,saying that the bitrate is too low, even
when I set the bitrate to 20000000.

The error disappears after I switch to older git version of libx264.
The last working git version seems to be "Timecode input/output" ,2010-03-27.
And it seems that the error start to occur after "Blu-ray support:
NAL-HRD, VFR ratecontrol, filler,pulldown "
 (commit c6de86497cdd7b7f3cce7d8a95d723c7d0c9f505)

I hope I didn't misunderstand anything.
Or it is mencoder that has to be renewed so that I have to inform them
in the mailing list?


Below 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 first pass log file , 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 it keeps complaining

I may be wrong but it's all I can try.

Thanks for your attention.

my system info:
2.6.30.10-105.2.23.fc11.x86_64
MEncoder SVN-r31028-4.4.1


More information about the x264-devel mailing list