Saturday, January 31, 2009
Embedding YouTube HD Videos: Here's How
Posted by Jason Dunn in "Digital Home Talk" @ 10:24 AM
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 Reel SEO figured it out, but using his example code I wasn't able to get it to work (and neither was Vinny over at Apple Thoughts). So I thought I'd work backwards - first, I took a look at one of my videos on YouTube, 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.
In the code below, wherever I saw this:
http://www.youtube.com/v/PKr6sZ3zfLY
I added &fmt=22 onto the end of it, so in the code it looks like this when pasted in:
http://www.youtube.com/v/PKr6sZ3zfLY&fmt=22
Or, more accurately, it looks like this when strung together with the other code that YouTube puts in there:
http://www.youtube.com/v/PKr6sZ3zfLY&fmt=22&hl=en&fs=1&rel=0
The important thing is that &fmt=22 is included immediately after the last character of the YouTube video ID. The results look like this:
UPDATE: 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!