YouTube can accept almost any video format for upload, but for most users we have found the following settings give the best results.
Video Format: H.264, MPEG-2 or MPEG-4 preferred
Aspect Ratio: Native aspect ratio without letterboxing (examples: 4:3, 16:9)
Resolution: 640×360 (16:9) or 480×360 (4:3) recommended
Audio Format: MP3 or AAC preferred
Frames per second: 30
Maximum length: 10 minutes (we recommend 2-3 minutes)
Maximum file size: 1 GB

(from Youtube's handbook)