I'm having trouble creating QT compatible video with mencoder and x264/faac. I think I'm very close, though - video plays perfectly, but audio plays for random split second durations throughout playback.

I am doing this COMPLETELY via commandline because I want total control over my filtering and encoding options. (ffmpegX is too limited for my taste.)

For my tests, I've been using the default x264 options (specifying only bitrate - so no bframes, 8x8dct, etc, that QT doesn't like). Commandline:
Code:
$ mencoder input.avi -o output.264 -of rawvideo -vf-add harddup -ovc x264 -x264encopts bitrate=1000 -oac copy -frames 3000
The closest I've gotten to QT compatibility for audio is:
Code:
$ mencoder input.avi -o output.aac -of rawaudio -vf-add harddup -ovc copy -oac faac -faacopts br=128:mpeg=4 -frames 3000
I then combined the two streams into a .mp4 using mp4creator:
Code:
$ mp4creator output.264 -r 29.970 final.mp4
$ mp4creator output.aac final.mp4
$ mp4creator -list final.mp4
Track   Type    Info
1       video   H264 Main@5.1, 100.133 secs, 990 kbps, 640x416 @ 29.970140 fps
2       audio   MPEG-4 AAC main, 99.882 secs, 125 kbps, 48000 Hz
QT opens this file, and plays the video flawlessly, but the audio skips in and out. mplayer, on the other hand, has absolutely no problems with this file.

Any tips?
Are my mencoder lines bad?
Is there an additional mp4creator step?
Can I get faac to do CBR? (Does it matter?)

I've read the guide over at doom9, so apparently the Windows folks can do this. <http://forum.doom9.org/showthread.php?t=102609>

If necessary, I can provide sample files of the results. The source, however, is raw yv12 - much too large to transfer.