Last week I mentioned that adding &fmt=18 to a Youtube URL, or &ap=%2526fmt%3D18 to the embed code URLs allows you to view and embed Youtube clips in nice looking 480×360 resolution, encoded with the H.264 codec. The result is a much better playback experience than the standard 320×240 sorenson encoded clips, but a post today on webmonkey gives us another tweak that can produce even better results for some videos.
Above is an example of Collin Cunningham’s brilliant LED investigation in high def.
By changing that fmt variable to &fmt=22 or tacking on &ap=%2526fmt%3D22 to the embed URLs—that’s right, turn it up twice past 11—Youtube will kick out compatible videos at a whopping 720p resolution.
Here’s some example embed code:
<object width=”600″ height=”362″><param name=”movie” value=”http://www.youtube.com/v/P3PDLsJQcGI&hl=en&fs=1&rel=0&ap=%2526fmt%3D22″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/P3PDLsJQcGI&hl=en&fs=1&rel=0&ap=%2526fmt%3D22″ type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”600″ height=”362″></embed></object>
The only downside to embedding videos this way is that it really raises the bandwidth requirement for viewers. On my home connection, it can take several seconds before the video begins playback, and depending on how well my wireless is behaving, it’s not uncommon that the download rate will be slower thank playback, requiring quite a bit of pre-buffering. On the other hand, some videos are just worth the wait.