YouTube higher quality video and stereo sound

As you might be aware, videos uploaded to YouTube are usually of a higher original quality than what the site shows you in the video window. Video and audio are transcoded to a low quality Flash format, resulting in a fairly low quality video and low quality mono audio. I expect YouTube made this trade-off in order to lower the server load at their end (and as such reducing cost), but one might even argue that a lower bit rate results in a better user experience for the user when he or she is using a slow connection (faster loading times, less hickups, altough this is becoming an increasingly smaller problem).

However, it seems that YouTube does in fact store the original uploaded video material and not only the low quality Flash video that is presents to its users by default. This became clear when Apple introduced its iPhone in June of 2007, and with the Apple TV firmware update of that same month. Both devices cannot play Flash, however they both allow viewers to watch YouTube content. For this to work, YouTube offers the video in AVC or H.264 format. And since older videos were also made available to users of these Apple products, one can assume that YouTube saved the original videos in order to do the transcoding.

As a nice side effect, videos played back on these devices looked better than the ones on the web site accessed from a computer, as H.264 is a fairly powerfull, efficient and high quality codec.

There seems to be a way however to also access this high quality video, together with stereo sound (if the original video contained it, of course) on the web site. Simply add &fmt=18 to the end of the URL. You will then see the H.264 version at 360×240 resolution, which is the native resolution of the iPhone’s display.

The improvement in picture and audio quality becomes instantly clear when you compare, for example, these two URLs pointing to the same Nightwish video:

I have noted some things when using this “hidden” option:

  • There seems to be a “video quality” preference in the “My Account” settings on YouTube. However, setting this to “always use high bandwith quality” did not result in the same image improvement.
  • The H.264 video looks better when switched to full screen (although still fairly pixelated of course, due to its relatively low resolution), but aspect ratio will be lost with some wide screen videos, where they are kept correct using the default quality. This can be seen for instance in the above examples. Try switching the H.264 version to full screen on a wide screen display, and notice that the image will be stretched.
  • I tried to embed both examples in this blog post, however the &fmt=18 setting seems to get lost, resulting in the default video. I am not sure whether this is a limitation of WordPress, or a measurement built in by YouTube.