Here is a guide with three different methods, starting with the first and most common and ending with two that match up output video 1 for 1 with YouTube Advanced Encoding guidelines.
http://youtu.be/BDPRokNN0Uc
Here are the guidelines: https://support.google.com/youtube/answer/1722171?hl=en