December 16, 2011  Web and Internet


You should always link to and embed the HD version of YouTube videos when video or audio quality is important. Here's how:

Link to HD YouTube Videos

Linking directly to a high definition (HD) version of a YouTube video used to be done by adding "&fmt=" and 35, 22, or 37 at the end of the link. This no longer works, but you can still use "&hd=1", which will link to the 720p version of a video, if available. Here is an example of a link with "&hd=1" added to the end of it:

The following will also work:

Thanks to commentor KarDave for pointing out that you can link directly to the popout version of a 1080p video. It won't be in the normal YouTube layout and will be just the video at full browser dimensions. The link is:

Replace VIDEO_ID with the ID of the video. If you leave the &vq=hd1080 out, or the video does not support 1080, it will default to 720 (if available). You can also use 3rd party embedded players to have more control over the playback, but that won't be covered here.

Embed HD YouTube Videos

By default, YouTube's embed code will not allow you to make an embedded video default to a higher quality than its size. For example, even if Play in HD is selected, a 640 x 360 video will default to 360p quality. Here are the example 16 x 9 aspect ratio videos and their respective default qualities when embedded:

ResolutionDefault quality
560 x 315360p
640 x 360360p
853 x 480480p
1280 x 720720p

YouTube's logic for not letting you default to higher quality resolutions is simply that you shouldn't need to. If the embedded player size is 640 x 360, you shouldn't need a 1280x 720 quality video. Of course that ignores the compression quality and other issues, not the least of which being that audio bitrate is dependent on the video quality you choose.

Old embed code to the rescue

Thankfully, you can still get smaller resolution videos to play in HD (720p if available) by default by using the old embed code and modifying it a little. First, open up the embed dialog on a YouTube video page by clicking on Share, then Embed. Once there, follow the instructions in the image below:

In case the image doesn't work, click Play in HD, then click Use old embed code, then change the resolution to the size you want, then remove the two occurrences of version=3. Or, you can just use this code (change the two occurrences of VIDEO_ID and width/height to your desired values):

<object width="640" height="360">
<param name="movie" value="http://www.youtube.com/v/VIDEO_ID?hl=en_US&rel=0&hd=1"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/VIDEO_ID?hl=en_US&rel=0&hd=1" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed>

I hope this will allow you to at least embed your videos to playback at 720p by default (if available). For further reading on how the new embed code works, as well as some interesting information on YouTube players, see my post on embedding YouTube videos.

Related articles:
Post Author  Nick Vogt
Post Tags  web and internet, youtube, how to


© Nick VogtApril 18, 2014Disclosure PolicyPrivacy PolicyFacebookTwitter