[Ffmpeg-devel] [BUG] Error: 2pass curve failed to converge

Corey Hickey bugfood-ml
Wed Jul 19 00:10:19 CEST 2006


Loren Merritt wrote:
> On Mon, 17 Jul 2006, Corey Hickey wrote:
> 
>> This bug is a bit elusive; it only happens with some source videos with
>> some parameters, and is not always the same between amd64 and i386. In
>> each case, the second pass fails immediately with the error:
>>
>> [mpeg4 @ 0xc840d0]Error: 2pass curve failed to converge
> 
> The bug turns out to be unrelated to my earlier suggestion.
> Uncomment the printf at ratecontrol.c:908 to see what's going on:
> 
> predicted_size target_size rate_factor
> 23365008.042328 24398207 65536.000000
> 23365008.042328 24398207 98304.000000
> 23365008.042328 24398207 114688.000000
> ...
> 
> So the error message is triggering as intended. It's telling you that it 
> can't spend that many bits subject to lmin=2.
> 
> But pass1 ended up being vqscale=2 at 828 kbit/s, while you're only 
> asking for 817 kbit/s on pass2, and the predicted size for pass2 at 
> vqscale=2 is 782 kbit/s. So the bug is that even if the 2nd pass's 
> quantizer is the same as the 1st pass, it does not predict the size to 
> be exactly what was observed in the 1st pass.

Huh. That makes sense. I understand what you're saying, but fixing 
something like that is out of my league. So, this bug is probably at the 
mercy of you or Michael to fix. :) Thanks for the investigation you've 
done; I appreciate it.

-Corey




More information about the ffmpeg-devel mailing list