Welcome to the forum
The easiest way is to use AutoGK (free software) with AnyDVD (not free too bad :() running in the background. AnyDVD will take care of the protection removing part, and AutoGK will take care of the AVI encoding.
Bear in mind, however, that if you encode directly from the DVD, the disc (and the drive) will be stressed for all the encoding time. With a dualcore CPU you can encode an entire movie in say half hour, but this is a useless stress for the drive in my opinion.
I suggest to rip first the original disc into the HDD, and then use AutoGK to convert it into AVI. If you choose this method, there is a free alternative to AnyDVD: DVDFab HD Decrypter. With this you can rip the DVD first, and then use AutoGK to create the AVI.
About the audio quality, with AutoGK is it possible to use the original audio as AC3, ensuring the best quality for audio (instead of converting it into mp3 format).
About the video quality, instead of setting a file size (and autoGK allow this), you can select a percentage quality. To obtain an excellent quality you can select 80% quality, and autoGK will run all needed steps to convert the movie with the better quality possible independently by the final file size. The higher is the quality selected, of course, the higher will be the resulting file.
The final quality, however, is also related to the original movie quality, to the screen size, and to the personal perception of the encoded movie. So, each movie requires different settings. You can encode initially a short segment (for example 10 min of the movie), then watch it in your television, and decide if result is good enough. If result is not good, you can increase the output quality until you get the result you think is better.
AutoGK is a one-step software, so once you set the parameters (video quality, audio track to be used [you can also create movies with two or more audio tracks]) and destination folder where to save the avi, simply run press the start button and that’s all (there is no need to remain in front of the PC).