Thursday, January 1, 2009

Pieces of Things: How to Embed YouTube Videos

Here's the code you should be copying into your post, in order to embed videos that play when clicked. Find this on the right-hand column of the YouTube video page. [note that after you copy the embeding link, you should click on the "Edit Html" tab at the upper right corner of the editing window before pasting].

To make your video fit better, change all of the widths in the embed code to 475 530 525, which is the width of the posts in this blog. There will probably be at least two instances of the "width" variable in the code. Change them all. NOTE: This works with nearly all embedable video players! Try it, you slobs!

Update: To get the movie to fit as best as possible, you'll need to change the height, too. Try a proportion calculator. Enter the embed tag's current dimensions for the original size, and enter 525 for the target (reproduction) width. Press "Calculate" and replace the current dimensions with the target dimensions in the embed tag (in both places).


Mr. Pony said...

oh so that is how to embed YouTube videos

Mr. Pony said...

I have widened the blong! The optimum width of embedded videos and graphics is now 530 pixels, for those of you that keep track of this sort of thing.

Mr. Pony said...

You'll have to mess around to get the height right. HINT: Try a Proportion Calculator!!

Or don't. Really, It's okay. I'll totally fix it if anything's wrong.

Fugu said...

That proportion calculator is great! But if you're a real mac nerd, there's also this: You know that magnifying glass icon in the top right? Click on it. See where you type? You can type any old equation there (besides searching for anything else on your harddrive), and get the proportions right.

Say, if the video is 600x450 and you want 530xN, then type:


and you have the new height (398).

Or, in steps, do:


and it'll pop back with 0.88333333 (the percent the new width is of the old width)

then just type:


and you get 397, which, if you change the video width to 530, 397 is the new height (note that typing 450*0.88333333333333 would get you 398, but who cares).

Heeero said...

Who cares? Indeed.

Mr. Pony said...

REALLY IT'S OKAY--do your best, and Fugu and I will fix anything that needs fixing.

Fugu said...

The key here, is the "do your best" bit.

Heeero said...

Well, I actually have this page bookmarked so if it should come up again...