How YouTube Tries to Keep Videos Playing Smoothly No Matter What
In an effort to get videos to stream more reliably regardless of your connection speed, the YouTube team at Google continues to innovate and utilize different distribution methods to get videos buffering as little as possible and in the highest quality possible. Here's a great video from Computerphile that explains just how complicated their delivery system actually is, and how they get high-traffic videos to actually load faster (and the video itself is on YouTube, of course):
Just like how Netflix encodes each video many, many times, YouTube has a few dozen different encodes of each video that is uploaded, from your average cat video all the way to full-length feature films. These different encodes include multiple resolution options for each video, as well as the different file formats which you can actually see for yourself when you try to download videos from YouTube. The way that YouTube actually tries to work with the speed of your connection is one of the reasons videos tend to play smoothly on the service. For sites like Vimeo to compete better, I think at the very least they need options for users to select different resolutions rather than having the uploaded default to 720p or 1080p (as only one of these versions will be displayed when HD is on).
Computerphile has a number of fascinating videos on YouTube, so head over to watch some of the others.