x264, open source, as part of H264 standard, provides excellent quality at lower bitrates. It is slower compared to xvid but quality is far more superior.
This CLI version accepts AVS scripts as input and outputs h264 elementary stream. It is better to use it with some GUI, like MEGUI or Leiming's GUI, which I prefer.
P.S. Can be up to 2x-8x slower then xvid, which depends of settings.