I'm using H264 encoding to encode video capture from a webcam. How do I turn of rc lookahead?
If you're using x264 directly, it's --rc-lookahead 20 for 20 frames. If it's via ffmpeg, it's -x264-params rc_lookahead=10.

Although I would suggest to use faster presets. Default is medum.