I use x264 with an Matroska container and aac audio.
matroska supports chapters and you can add/remove subtitles if you wish.
For muxing my MKV files, I use MKVtoolnix.
For making my aac/264 files, I use MainConcept Reference.
Only problem with that program is it seems to not like ocnverting DivX files. It’ll convert almost anything else. But DivX it’ll only convert between the DivX versions.
I spend a few hours on finding out which might be the best codec for ripping dvds.
The best codec seems to be x264 (http://compression.ru/video/codec_comparison/subjective_codecs_comparison_en.html)
I’m not sure about the best conatiner: mp4 or matroska. What do you think, especially I’m looking for a codec that still works in 5 years ;)
Avi doesnt support x264, no chapters, no subtitles thus it’s out.