Hey guys – whilst many people will have been aware that Youtube has been “offering” a High Quality option on a number of it’s videos (starting roughly around the time divx.com shut up shop) it not been widely known you can actually embed the videos with the “high quality” file, and more recently in HD.
Now most youtubers will already be aware of the URL amendment ” & fmt=18 ” to pull up the high quality version, the same is also true for HD ( & fmt=22 ). However tweaking the URL like this in the embed code doesn’t work.
In a nutshell, to get it to stay simply append &ap=%2526fmt%3D18 code to the end of both URLs within the embed code for a higher quality 480*360 video clip, or use &ap=%2526fmt%3D22 for 720p HD mode.
(instead of &ap=%2526fmt%3D18 to display just higher quality 480×360 video clip) to the end of movie parameter value and embed source in the YouTube embed code.
For example, using a recent video I posted following my first foray into Left 4 Dead, I have highlighted the URL link in italics and the amendment to the URL in Bold Blue.
<object width=”480″ height=”385″ data=”http://www.youtube.com/v/k6NBOEqag3M&hl=en&fs=1” type=”application/x-shockwave-flash”><param name=”allowFullScreen” value=”true” /><param name=”allowscriptaccess” value=”always” /><param name=”src” value=”http://www.youtube.com/v/k6NBOEqag3M&hl=en&fs=1” /><param name=”allowfullscreen” value=”true” /></object>
<object width=”480″ height=”385″ data=”http://www.youtube.com/v/k6NBOEqag3M&hl=en&fs=1&ap=%2526fmt%3D18” type=”application/x-shockwave-flash”><param name=”allowFullScreen” value=”true” /><param name=”allowscriptaccess” value=”always” /><param name=”src” value=”http://www.youtube.com/v/k6NBOEqag3M&hl=en&fs=1&ap=%2526fmt%3D18” /><param name=”allowfullscreen” value=”true” /></object>
The only caveat emptor is that not all (actually is most) videos uploaded to YouTube is not available in such very high quality HD viewing quality. The uploaded source videos must be encoded in HD quality resolution in order for the YouTube HD trick to work. Good news is that, the HD YouTube appears to have even better picture quality than Vimeo, the first video sharing site to support consumer HD (High Definition) playback, using the 720p resolution at 24 fps (frame per second) Flash video. YouTube plays back 720p HD video using H.264/MPEG-4 AVC codec in 1280×720 resolution with high-quality AAC two audio channels stereo sound at 232 kbit/s 44100 Hz monaural (near CD quality).
Note that although YouTube currently has the option to allow users to set YouTube to always play higher quality video when available, it’s not currently support auto play the HD format. It will play video in high quality mode with maximum picture size of 480 x 360 pixels with audio encoded in bit rate of up to 120 kbit/s at 44100 Hz monaural (FM quality).
Take a look at the Matt Dancing video in different YouTube supported resolutions below. Watch and view the video in full screen and listen carefully to the sound effect to get a feel of what HD really means.
Embedded examples
Embedded as “Normal Quality”
Embedded as “High Quality”
Full props go two posts at My Digital life