To export videos for YouTube, I recommend these settings:
Quicktime, H.264 video codec with AAC audio
Use the highest resolution and bitrate you can while still keeping the file under 1 gigabyte
If you use quicktime pro, you can use the setting "Movie to Apple TV" (or "Movie to iPhone" for very long movies) in the export dialog.
Note: YouTube keeps the original files you upload, so in the future, when they offer higher quality videos, your video will be "upgraded" automatically if you uploaded a video at higher quality than YouTube currently supports.
YouTube now offers "standard quality" and "high quality" settings. The details of the standard quality format are available below in the standard column. The hi-quality format is: .MP4, ~600 kbits/sec, stereo AAC audio @ 44.100 kHz (125 kbits/sec), H.264 MPEG4 video @ 480 x 360 (500 kbits/sec). (480 x 270 for widescreen 16:9 videos).
* Bonus Bookmarklet: YouTube HQ — view the hi-quality version of any YouTube video. To use a bookmarklet, drag it to your toolbar. Click it when you're on any YouTube page to load the hi-quality version.
When you upload a video to YouTube, a few things happen. First, the contrast of the video is increased and video noise is suppressed. Next, it's resized to 320 x 240 (widescreen videos are "letterboxed" with black bars on the top and bottom). Finally, it's compressed as a flash video file (.FLV), using the settings in the "standard" column.
standard
high
very high
file extension :
.flv (flash video)
total bitrate :
~320 kbits/sec
804.7 kbits/sec
2147.2 kbits/sec
audio codec :
MPEG layer 3 (MP3)
audio format :
Mono, 22.050 kHz
Stereo, 44.100 kHz
Stereo, 44.100 kHz
audio bitrate :
~67 kpbs/sec
128 kpbs/sec
128 kpbs/sec
video codec :
Sorenson Spark (H.263)
video format :
320 x 240, 15-30* fps
320 x 240, 29.97 fps
640 x 480, 29.97 fps
video bitrate :
~250 kbps/sec
677.7 kbps/sec
2019.2 kbps/sec
*YouTube respects the framerate of the uploaded file.
To achieve higher quality, you can save your own .FLV files and upload them to YouTube. You can encode video with higher bitrates and resolution than YouTube's standard. The only limitations on FLV's: the file must be under 1 GB and you must use the Sorenson Spark video codec and MP3 audio codec. I've successfully uploaded a file with the specs in the possible column. With these settings the file takes forever to download and plays sluggishly on my computer (G4 Dual 1.0 GHz PowerMac).
I recommend the settings in the high column for a file that has noticeably higher quality than the standard YouTube compression and takes a reasonable amount of time to download. If your video doesn't have fast motion, I'd recommend uploading the file as a QuickTime or AVI file and letting YouTube handle the FLV compression; it does a great job, better than I have been able to achieve encoding FLV's with the same bitrate.
YouTube may have some kind of mechanism that can vary the bitrate of the clip once it is uploaded. I say this because I've downloaded the same clip at two different times and each one had a different video bitrate. I don't know if it was an error, or if YouTube can adjust bitrate on the fly during peak usage, for example. The clips that I uploaded as FLV's have not shown any variation in bitrate upon download.
Update February 7, 2007: Here's an example of the quality difference between the YouTube standard compression and a video compressed using Sorenson Squeeze with the settings in the recommended column. Thanks to Goose for sending this in.