Try
Gordian knot. The resulting quality is related on how you configure the codec (divx or xvid), and this software allow to manually set all options (it's not exactly user-friendly but if you know what you are doing then it's a good choice for you).
See also
the guides (worth to read in my opinion)
Another alternative is
mencoder. See also
the software home page.