YouTube uses 16:9 aspect ratio players. If you are uploading a non-16:9 file, it will be processed and displayed correctly as well, with pillar boxes (black bars on the left and right) or letter boxes (black bars at the top and bottom) provided by the player. If you want to fit the player perfectly, encode at these resolutions:
More info visit: https://support.google.com/youtube/
The YouTube player automatically adds black bars so that videos are displayed correctly without cropping or stretching, no matter the size of the video or the player.
For example, the player will automatically add pillarboxing to 4:3 videos in the new 16:9 widescreen player size. If the player is re-sized (i.e. when embedded on another website), the same process takes place so that 16:9 videos are letterboxed when the player is sized to 4:3. Similarly, anamorphic videos will be automatically letterboxed when shown in either 16:9 or 4:3 sized players. The player can only do this if the native aspect ratio of the video is maintained.