I have a very serious doubt. I have a .avi file that i need to convert to .flv format. what are my best options?

My main priorities are:

1. lesser file size
2. conversion to .flv format
3. and the main requirement is that the clarity must be as the .avi video file.

Please advice as to how i can go about the conversion and what is the best conversion tool i could use.

I am in urgent need of a solution. Thanks in advance