Saturday, March 27, 2010

A Useful Tip for Embedding Videos

I've noticed lately that Blogger has changed the way it embeds videos from YouTube: it no longer allows videos to extend past the posting area into the sidebar. This is a good thing aesthetically, except Blogger does it in its usual sloppy way: it just cuts off the right side of the video if the video width is greater than 425. A good example is a video Map posted a few days ago. Half of the video is missing (except in feeds, where vids are shown in full width).

To illustrate, I downloaded The Muppets doing their spoof of the movie Pulp Fiction by using the YouTube embed code as shown:


This is the result because the embed code width says 480:



Fortunately, the fix is easy. Note the little blue thingy (technical name: thingy), next to the embed code. Click on that and a whole new world opens to you:


1) The 480 box is highlighted in blue, so just click on the 425 box. The embed code will change.

2) If you don't want all the "related video" crap to muck up your video's ending, uncheck the checked box.

3) This is also the place where you can play around with border colors if you so desire colored borders.

Here is The Muppets video after I adjusted the width:



Since different blog templates have different posting widths, width can be adjusted in the HTML embed code. My template can handle about 440, but I leave it at 425 because, as we used to say in the government, "It's close enough for government work."

Any questions will happily be answered by someone other than myself.

16 comments:

Jimmy Bastard said...

Now I know I'm really getting old. I read it twice before I could only grasp the basics.

Ponita in Real Life said...

Been doing that for a long time... but then I'm a bit of a technogeek (by choice, not by trade).

Thanks for letting everyone else know!

Kim Ayres said...

This was on of the reasons I designed my blog to be wider - this is a simpler solution though :)

TechnoBabe said...

Nice of you to help out others who may not know this. Hope you are doing well.

Pat said...

I'm sure that makes sense to everybody but idiots but this is one of the few things I can do and I don't want to tax my little brain just at the moment:)

Robert the Skeptic said...

I just recently discovered that trick myself... previously I was tinkering with the height and width numbers to make the frame fit. It just keeps getting easier, doesn't it.

Wandering Coyote said...

Well, this is cool...I used to go and change the width in the code manually if it was too wide. WordPress adjusts it automatically for you when you post a YouTube video...neener neener neener! :P

Kevin Musgrove said...

Good man for letting folk in on the trick. The borders can be useful for setting a tone to the video (or just mucking about with stuff, as we call it technically).

Once you've embedded the video you can tweak the HTML in your post. You're looking for the bit that starts "embed src="http://www.youtube.com/" - if you look further along you can change the settings for height and width. If you want to keep the proportions, delete the height setting and then change the width (Blogger will automatically sey a height when you publish). Sometimes you may want to change the proprtions because the original's distorted (a combination of dead reckoning, trial and error and dumb luck usually gets it pretty close).

Charlie said...

Since all of you people knew this stuff then why the hell did I spend last evening mucking with it?

JImMY: Since you don't post videos, you don't have to take the test.

WC: Don't you neener neener neener me, young woman!

Peter S. said...

Thanks for the tip, Charlie! One of these days, I will post a video on my blog.

You're becoming very tech-savvy!

mapstew said...

So, this was all for ME?

:¬)

Charlie said...

MAP: You were the poster boy, but there were a couple of others having the same problem.

Mary Witzl said...

Jimmy's ahead of me. I read it twice and I still don't get it. I'll have to consult an expert. That is, someone under 30.

Charlie said...

MARY: Someone under 10 is more like it.

And like Jimmy, you don't post videos anyway.

Barbara Bruederlin said...

Oh.

Well, this could come in handy. Lately the videos I've been posting have been all over the place.

Now, what did you say to do again?

Charlie said...

BARB: **sigh**