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

Rich Felker dalias
Wed Jul 19 08:09:25 CEST 2006


On Tue, Jul 18, 2006 at 02:18:31PM -0700, 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.

moreover this bad prediction could explain many users' complaints that
lavc will not utilize all the bitrate they give it..

rich





More information about the ffmpeg-devel mailing list