Perfecting h264 encoding for High Definition content destined for the AppleTV

So I've finally taken to the task of converting all of my HD DVDs to h264 files and replacing the HD DVD player on the living room television with the AppleTV. I've found that even with the AppleTV running XBMC that it is a finicky beast when it comes to playing back high definition content encoded in h264 smoothly. Thus far I have tried two different encoding combinations (using Ripbot264 to encoding the HD DVDs, ripped with AnyDVD HD, to h264 files), 1080p Profile 4 @ ~7200kbps, which plays back at roughly ~5 fps on the AppleTV, and 720p Profile 4 @ 4750kbps, which while much better than the previous, still doesn't play back smoothly. The next attempt will be at 720p Profile 3.0 BASE @ 5000kbps (I've heard that the AppleTV likes Profile 3.0 sans CABAC encoded content the best), should that work and it look okay, I'll be ripping and queuing up 60 HD DVDs, which should take quite awhile at 4-5 Hours per. Audio is being encoded at 320kbps in 5.1 channel AAC format, which the AppleTV seems to like (as does the Playstation 3). Fun Fun.

If you happen to have an optimal h264 encoding setting that'll give the best quality 720p24 content and still play back smoothly using XBMC on the AppleTV (serving off a large NAS, drive space isn't a concern), please feel free to share it with me.

Update: Finally found the optimal setting for HD Content to the AppleTV to play smoothly it seems. 720p24 h264 Profile 3.0 BASE 2-Pass @ 5000kbps for the video, AAC 5.1 Channel 320kbps for the audio. For 480p content, I'm using the same settings, except for 2048kbps for the video bitrate. Now for the long process of ripping and converting them all. An average HD DVD takes 3 Hours on my primary machine for the transcoding and approximately an additional 1 hour (some less) for the rip itself using AnyDVD HD.