Making H264 videos that will play on Quicktime 7 and X

It took me a while to work out how to encode H264/AAC files that will play in Quicktime 7 and X from a set of still images (and WAV files).

I’ve no idea whether this is the best approach, but it seems to work, after a fashion:

x264 --pass 1 --fps 24 --bitrate 1000 --level 4.1 --profile main -o picture.264 tiffs/%08d.tiff
x264 --pass 1 --fps 24 --bitrate 1000 --level 4.1 --profile main -o picture.264 tiffs/%08d.tiff
faac -q 100 -c 48000 -b 192 sound.wav
MP4Box -mpeg4 -fps 24 -add picture.264 -add sound.aac output.mp4

The -mpeg4 option seems to be crucial for Quicktime 7 and X to set up the type field for the sound correctly.