They need to be in m4v format, and they need to be in 64 bit mode if you plan on them being over 4GB per file. In handbrake this is called "Large File Size".
Unfortunately it does require quite a bit of manual labor to get everything displaying perfectly. The ripping is actually the easy part, if your a stickler for all the metadata being filled out, that's the time waster. Also be aware that there are a couple metadata fields that iTunes will not give access to. In particular the "HD" icon as well as the parental ratings. But 3rd party programs will, such as the ones listed below.
I use MetaX on Windows. Subler is popular on OSX.
Also, the way AppleTV works in regards to audio is that you will want to have a stereo AAC channel for Track 1 and then a Dolby Digital 5.1 for Track 2. If you have Dolby Digital enabled on ATV, it will automatically select Track 2, else it will fall back to stereo on track 1. Doing this gives you most compatibility with all devices. I also add a 3rd track with DTS-HD if available, even though ATV does not support DTS, nor any "HD" audio.