User:Warnercarter/How to resize youtube video

I will explain how to resize a YouTube video embed code to make it the size you want with this example.

Getting youtube videos to fit on your blog now that the minimum width of Videos on Youtube is 640 pixels needs to be done since they just didn't fit into my blog right.

On my blog the post column width is 555 pixels and changing it to 640 pixels wide is one option but not good for my blog.

It is important to keep the proportions correct and this simply takes a little math. Chopping off the width pixels then changing the height pixels so the video looks correct takes a little math.

Shooting for 550 pixel width I divided 640 into 550 and got .859375 then I took the result and multiplied existing the height by .859 (note: for simplicity I used only 3 digits) and got 330.715 so I changed the pixels in the embed code from YouTube to 550 x 330 witch works just fine.

NOTE: there are 2 places in the embed code where the size of the video is stated, you must change both. I also unclick the show related videos checkbox when I grab the videos, I think it looks better on my blog that way.

so to review for the pop quiz that will happen when you try this that is 640/550=.859*385=330

Again, another way to say this is: original width divided by width I want to get percentage of difference then multiply that result times the original height to get the height it needs to be to keep the same proportions as the original.