How to force 480p video quality for iframed Youtube videos?
Sample code:
<iframe width="560" height="315" src="http://www.youtube.com/embed/FqRgAs0SOpU" frameborder="0" allowfullscreen></iframe>
How to force 480p video quality for iframed Youtube videos?
Sample code:
<iframe width="560" height="315" src="http://www.youtube.com/embed/FqRgAs0SOpU" frameborder="0" allowfullscreen></iframe>
Append the following parameter to the Youtube-URL:
144p: &vq=tiny
240p: &vq=small
360p: &vq=medium
480p: &vq=large
720p: &vq=hd720
For instance:
becomes:
You can use the YouTube JavaScript player API, which has a feature on its own to set playback quality.
You can also use for 1080 hd values:
240p: &vq=small , 360p: &vq=medium , 480p: &vq=large , 720p: &vq=hd720 , &vq=hd1080
You can use the
fmt=
parameter and fill the value based on the following table :http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs
Ex : your URL would become :
I found that as of May, 2012, if you set the frame size so that the minimum pixel area (width • height) is above a certain threshold, it bumps the quality up from 360p to 480p, if you're video is at least 640 x 360.
I've discovered that setting a frame size to 780 x 480 for the embed frame triggers the 480p quality, without distorting the video (scaling up). 640 x 585 also works in this manner. I also used the
&hd=1
parameter, but I doubt this has much control if your video is not uploaded in HD (720p or higher).For instance:
Of course, the drawback is that by setting these static frame dimensions, you will most likely get black bars on the sides or above and below, depending on what you prefer.
If you didn't care about the controls being cut-off, you could go on to use CSS and
overflow: hidden
to crop the black bars out of the frame, providing you know the exact dimensions of the video.Hope this helps, and hope the Embed method soon gets discrete quality parameters again one day!