How to embed YouTube in widescreen.

at
How to embed YouTube in widescreen.

Ok, since a lot of people gets in our blog by searching these keywords, I will explain to you how easy is to embed a widescreen youtube video. Fact is that all you have to do is changing the dimensions of the player manually by changing the number of pixels of the width. You can make it tall, large or small at your wish actually, it’s arbitrary.
In this case, let’s make it 16:9, and high quality too, if you care.


here it is, in the old square. The code I used is:

<object width=”425” height=”344″><param name=”movie” value=”http://www.youtube.com/v/uILu8XEDvbA&hl=en&fs=1*here*“></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/uILu8XEDvbA&hl=en&fs=1*here*” type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”425” height=”344″></embed></object>

To make it 16:9, let’s just work on the width, that is the numbers I highlighted in red. Put a 566 in it.

<object width=”566” height=”344″ data=”http://www.youtube.com/v/uILu8XEDvbA&amp;hl=en&amp;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/uILu8XEDvbA&amp;hl=en&amp;fs=1″ /><param name=”allowfullscreen” value=”true” width=”566” height=”344″ /></object>

Now, this is a nice widescreen. But damnit, this quality sucks. But here comes the trick to get also a higher quality.

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

Where before I wrote *here* I’ve added this code (“&ap=%2526fmt%3D18″)that lets you embed any youtube video in high quality. I believe there’s some other method, this is the one I use and that works pretty well.

Now, you can make your youtube videos of any size, just change the width and height of the box in the two places where I told you, and find the size you like. It can be very small, as well as very big.

Now, just a note, I noticed how WordPress (the blog engine) deletes some parts of the embed code when you save the post. In case you’re using WordPress too, change the code straight away before the editor deletes the width and height. Weird things.

7 Responses to “How to embed YouTube in widescreen.”

  1. LonerGoth says:

    What about adding the border as well? actually, you can define your own two colors that the border will use, after the &color1=0x or &color2=0x in this code we can insert our own hex value for the color.

    &hl=en&fs=1&ap=%2526fmt%3D18&rel=0&color1=0x5d1719&color2=0xcd311b&border=1

Leave an Opinion

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>