Jason Dunn
01-31-2009, 06:24 PM
<p>YouTube has been getting in on the HD bandwagon lately, and the results are definitely an improvement over the high-quality option - as long as the original video looks good enough. But what if you want to embed your HD video on your own Web site? Mark Robertson over at <a href="http://www.reelseo.com/youtube-hd-update/" target="_blank">Reel SEO figured it out</a>, but using his example code I wasn't able to get it to work (and neither was Vinny over at <a href="http://www.applethoughts.com" target="_blank">Apple Thoughts</a>). So I thought I'd work backwards - first, I took a look at <a href="http://ca.youtube.com/watch?v=PKr6sZ3zfLY" target="_blank">one of my videos on YouTube</a>, and copied the embed code that YouTube provided. They don't provide a 600 pixel-wide option, so I manually changed that part of the code to be 600px by 365px. The important part is the YouTube video URL in the code.</p><p>In the code below, wherever I saw this:</p><p><strong>http://www.youtube.com/v/PKr6sZ3zfLY</strong></p><p>I added <strong>&fmt=22</strong> onto the end of it, so in the code it looks like this when pasted in:</p><p><strong>http://www.youtube.com/v/PKr6sZ3zfLY&fmt=22</strong></p><p>Or, more accurately, it looks like this when strung together with the other code that YouTube puts in there:</p><p><strong>http://www.youtube.com/v/PKr6sZ3zfLY&fmt=22&hl=en&fs=1&rel=0</strong></p><p>The important thing is that <strong>&fmt=22 </strong>is included immediately after the last character of the YouTube video ID. The results look like this:</p><p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="365" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/PKr6sZ3zfLY&fmt=22&hl=en&fs=1&rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="600" height="365" src="http://www.youtube.com/v/PKr6sZ3zfLY&fmt=22&hl=en&fs=1&rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p><p><strong>UPDATE:</strong> Upon further testing, I'm not convinced that Reel SEO has this figured out after all (or me for that matter). When the video plays, I see an "HQ" option in the lower right corner...so I think this is only streaming the HQ version, which looks good, but isn't the same as HD. I see the same HQ over on the Reel SEO sample video, so I think neither of us is actually embedding the HD stream from YouTube. Back to the drawing board!</p>