Here’s an example of a normal embedded Youtube video, borrowed from Patti Schiendelman’s Gakken Mechamo Inchworm post.
Back in march, it was discovered that when you view a video directly on Youtube, you could add a “&fmt=18” to the URL to enable a higher quality, higher resolution stream which is encoded with the H.264 codec.
To make this work in an embedded video, however, you need a slightly different hack. After pasting the embed code into a blog post, adjust the two video URLs (one in a param tag and one as the src parameter in the embed tag) by adding “&ap=%2526fmt%3D18″ to the end.
For example, the above video embed becomes:
<object width=”600″ height=”475″><param name=”movie” value=”http://www.youtube.com/v/iMQBKkDJY2c&hl=en&fs=1&rel=0&ap=%2526fmt%3D18″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/iMQBKkDJY2c&hl=en&fs=1&rel=0&ap=%2526fmt%3D18″ type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”600″ height=”475″></embed></object>
And here’s the result:
The still frame before the video is played is the exact same over-compressed image, but when a user clicks play, they will get a nice surprise. Instead of 320×240 video encoded with the Sorenson codec, the video will come in at a resolution of 480×360, encoded with the superior H.264 codec.