How To Adjust The Size Of Embedded YouTube Videos

How To Adjust The Size Of Embedded YouTube Videos

For bloggers, the ability to embed videos is an extremely important factor. Not only does it add an element of staying power for your blog (as users tend to play the video within your blog), but it gives your blog that extra element of interactivity that makes users want to return to your site. As important as it is to know how to simply embed a video into your site, it is equally as important to know how to adjust the size of the player to fit your blog. There are countless examples of sites and blogs out there that have yet to grasp the importance of visually placing the player in the correct spot with the correct size so here’s a couple of tips on how to master this quite easily.

First, determine the actual width of your blog. Back when blogging first started, there were a few standard sizes, but nowadays with all of the customization available through software like WordPress and Movable Type, you can essentially make the width of your blog any size. Once you’ve figured out the width of your blog, shave off about 5 pixels from each side to make sure that you’re giving yourself a bit of wiggle room.

Next, find a video you would like to embed. More often than not, the video you are attempting to embed into your site will be taken from YouTube (although if you would like to use a site like Vimeo, you can check out how to customize the embedded payer here). When you find the YouTube video you would like to embed, simply click the button underneath the player on the right that says <Embed>. Unless this is a private video, a menu should appear right below. The top of the new menu contains the code you can copy and paste into your blog, but below this are some specific sizes you can embed directly.

In the case of your blog not having the exact same width as one of the templates being offered from YouTube, simply copy the code of the size that closely resembles the width you are looking for.

Back on your blog post, paste the code you copied from YouTube into the HTML editor.

There are two sets of numbers that need to be changed in order for you to get your ideal size. They are called the Object and the True. If you measured your ideal width properly in the first step then determine what percentage that is according to the original code you copied from YouTube. An example is that if the width I’m trying to get is about 620 pixels, and the original YouTube clip is 640 pixels, then the percentage I need to find for the height is 96%. So in the case of trying to embed a video from YouTube that is originally 640X385, my new measurements for both the Object and True would be 620X369.

Now that the size ratios are complete, run a quick preview to make sure everything fits perfectly.

This technique can be used for any video that allows you to embed.