http://mewiki.project357.com/wiki/X264_ ... -lookahead
rc-lookahead
Default: 40
Sets the number of frames to use for mb-tree ratecontrol and vbv-lookahead. The maximum allowed value is 250.
For the mb-tree portion of this, increasing the frame count generates better results but is also slower. The maximum buffer value used by mb-tree is the MIN( rc-lookahead, keyint )
For the vbv-lookahead portion of this, increasing the frame count generates better stability and accuracy when using vbv. The maximum value used by vbv-lookahead is:
MIN(rc-lookahead, MAX(keyint, MAX(vbv-maxrate, bitrate) / vbv-bufsize * fps))
On a sidenote, the higher the value of rc-lookahead the higher the use of RAM so be carefull especially with systems running 2 GB of RAM.