How To Embed High Quality YouTube Videos

So now that YouTube has higher quality versions of the newer videos, you may think it would be easy to embed them on your site/ blog/ MySpace page, but it isn’t. If you embed the code they give, you will only be able to see the poor standard quality videos.

Lets try to link to the higher quality videos.
Here’s the link to our Gas - Vapourware video
youtube.com/watch?v=yhZb_TTXSJI

So even if you switch to the high quality version it will still give you the same link. But if you now add ‘&fmt=6‘ to the end of the link it will magically show the high quality version…
youtube.com/watch?v=yhZb_TTXSJI&fmt=6

Or add ‘&fmt=18‘ (fmt stands for format btw), which will link to the higher quality version in stereo…
youtube.com/watch?v=yhZb_TTXSJI&fmt=18

So what happens if we add ‘&fmt=18‘ to the embed code of the standard link…?
Well, nothing, we still get the standard quality video. Google don’t make this easy.


Gas - Vapourware - Standard Quality (mono)

We need to add the code ‘&ap=%2526fmt%3D18‘, so here is the higher quality version with the added code…


Gas - Vapourware - High Quality (stereo)

This is the embed code. Copy and paste, and replace the ‘http://www.youtube.com/v/yhZb_TTXSJI’ text with your YouTube video link to use on your own site…

<object width=”425″ height=”344″><param name=”movie” value=”http://www.youtube.com/v/yhZb_TTXSJI&ap=%2526fmt%3D18&hl=en&fs=1&rel=0″></param><param name=”allowFullScreen” value=”true”></param><embed src=”http://www.youtube.com/v/yhZb_TTXSJI&ap=%2526fmt%3D18&hl=en&fs=1&rel=0″ type=”application/x-shockwave-flash” allowfullscreen=”true” width=”425″ height=”344″></embed></object>

Geek out…
Standard Quality - 320×240, Sorensen H.263 codec, bitrate ~300kb/s, mono
Higher Quality    - 480×360, Sorensen H.264 codec, bitrate ~900kb/s, stereo

You can also watch videos in 720p (True HD) by adding ‘&fmt=22‘ to the link on YouTube and clicking the fullscreen button. This will only work if the video has been uploaded in HD of course.

More…

Downloads…
Gas - Vapourware (mpeg hi-res 60mb)
Gas - Vapourware (ipod video 11mb)

Related posts:

 

 

 

Comments (3)

Comments RSS - Trackback - Write Comment

  1. Carl . August 14, 2008 9:32 pm

    Generous tutorial. Appreciate it! Thanks mate more power!!!

  2. Youtube High Quality Embeds, My Cichlid Tank | InfoHole . August 22, 2008 1:17 am

    [...] Whilst Youtube offers a "view this video in high quality" below most videos on their site now, when you embed the videos they are still low quality. I have found a way to embed the high quality videos, detailed here: http://www.microscopics.co.uk/blog/2008/how-to-embed-high-quality-youtube-videos/ [...]

  3. Gordon . August 22, 2008 1:29 am

    Thanks very much for this, I blogged about it here ( http://www.infohole.com/blog/computing/youtube-high-quality-embeds-my-cichlid-tank ) but with the fm6 usage.

Write Comment