YouTube Video Too Big?
I am going to show you something that you find very useful if you are a web developer or blogger, or just someone wanting to embed a YouTube Video on a web page. This method will allow you to display a YouTube Video in any number of sizes on web page.
The First Part - Understanding the Code
I put this part first, because you need to understand what code needs to be modified in order to make these changes. When you embed a YouTube video on a blog or website, it looks like so:
Code could not be supplied due to HTML rules on Qassia. Please click the external link to extract the code.
If you notice toward the beginning of the code there are width and height options. You will use these values to change the size of the video. You will also need to change the code at the bottom that mentions width and height. In order to maintain the aspect ratio of the video, you need to change these values in terms of percentages. You can't just change these numbers to whatever you want, because the video won't display properly and will look distorted. Also, not all percentages will look good for displaying the video. So you will just have to choose which one suits your personal style.
The Second Part - Figuring Out the Percentages
In order to determine what number will decrease or increase the video size you will need a calculator. Unless, of course you are really good at math. But even if you are, it is still easier to figure with a calculator. I will show some of the calculations below:
100% is of course 425 x 344.
Side Note: Percentages can be entered easily on a calculator by multiplying the number by the decimal equivalent. Ex: 80% = .8
Now to figure out how to make the video 20% smaller, just take 20% from 100%, which is 80%.
Ex:
100%
-20%
====
80%
Now that we have that value, that is what we will multiply both dimensions, width and height by. This will create a video that is 20% smaller than the normal YouTube video size.
Ex:
Width Height
425 344
x80% x80%
===== =====
340 275.2
Side Note: Only use whole numbers for the dimensions. So just round it off to the nearest whole number.
Now that we have our values, all we need to do is replace the old values in the code. You can paste the code into notepad to make the modifications before pasting it into wordpress or whatever software you are using make a web page. Once you have done this, you can save your work and re-load the page, and you will see that the video is smaller than before, yet still displays correctly. Again, not all percentages will work well. It is best to stick to even numbers. However, you can play around with the percentages if you like.
Final Part - List of Percentages and Values for Your Convenience
Width Values
Height Values
425 x 0.9 = 382.5
344 x 0.9 = 309.6
425 x 0.8 = 340
344 x 0.8 = 275.2
425 x 0.7 = 297.5
344 x 0.7 = 240.8
425 x 0.6 = 255
344 x 0.6 = 206.4
425 x 0.5 = 212.5
344 x 0.5 = 172
425 x 0.4 = 170
344 x 0.4 = 137.6
425 x 0.3 = 127.5
344 x 0.3 = 103.2
425 x 0.2 = 85
344 x 0.2 = 68.8
425 x 0.1 = 42.5
344 x 0.1 = 34.4
425 x 1.1 = 467.5
344 x 1.1 = 378.4
425 x 1.2 = 510
344 x 1.2 = 412.8
425 x 1.3 = 552.5
344 x 1.3 = 447.2
Now naturally, some of those calculations will make the video too small to be usable, and others may appear to big for use on sites like blogs with limited screen space. You could even use this sizing method to implement some larger sizes for the visually impaired. That is why you see the 1.1, 1.2, and 1.3. Those values correspond to 110%, 120% and 130% respectively.
|
|
|
|
Contributor's Note
If you run into trouble with this, just use the contact form on my blog to reach me. Thanks. -- JJPMarketing Blog Address: jjpmarketing.com
|
|
|
|
|