Skip to main content

Embedding A Video In Your Post

One fun and sometimes practical accessory to add to your blog is a video. When added properly, you get a picture, that your readers can click on, and watch a movie, right in front of their eyes. This is called "streaming video", where the video content is downloaded from the distant server while you watch.

Here's a demonstration video that I have used in another post.


This is one example of why I prefer to live in California.



»www.youtube.com/watch?v=YCoxOReXlHI


<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/YCoxOReXlHI?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/YCoxOReXlHI?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
This is one example of why I prefer to live in California.
<br clear=left />
»<a href="http://www.youtube.com/watch?v=YCoxOReXlHI" rel="nofollow" target="_blank">www.youtube.com/watch?v=YCoxOReXlHI
</a></span>

It's not difficult to get the code from YouTube. Just click on the link to YouTube.


And there's the video. Somewhere nearby, you'll find a button or link - in this example, a button below the video - labeled "Embed". Click there, and you get a window with the code.

<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/YCoxOReXlHI?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/YCoxOReXlHI?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>

Just paste the code into the blog post, and there it is. Easy, right?

Not all websites are as thoughtful as YouTube. Some websites may provide the code, but it's not quite as complete.

<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/YCoxOReXlHI?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/YCoxOReXlHI?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></object>

That code is acceptable, in some applications. It won't work for Blogger though - the Blogger Post Editor will give you an HTML error.

Your HTML cannot be accepted: Tag is not closed: EMBED

Here's a critical snippet of code, that you need to include, to use this in a Blogger blog.

</embed>

Giving you the correct code block.

<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/YCoxOReXlHI?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/YCoxOReXlHI?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>

See the omission? Such a snippet - one obscure difference between liberal and strict HTML - and so essential, in Blogger.

Comments

pcd2k said…
So far I don't seem to have encountered that problem with youtube video's, but it's quite likely why other embed codes I've attempted to embed like DailyMotion have failed ?

One small unrelated comment to this post I've been intending to ask; Is why does your blog behave so slowly in Firefox but not in other browsers ?
Zee Poodle said…
Thanks for this info. I've recently encountered the black screen when trying to play back videos from my blog.

I trawled the Blogger Help forum, but the things suggested there didn't work. That forum led me to you!

I hope you don't mind my asking but are you aware of ongoing probs with videos not playing?

All of my vids are less than 1minute, 30secs. Some were made by me into little animated cartoons.

All vids are WMV. Some were d/loaded from youtube, shortened by me, then uploaded to my blog (with accreditation).

But in the last fwe days, on clicking any vid, it says, "Video won't play, come back later" - PLUS a window sometimes pops up which says "play on youtube" - even for my own home made animations that are not on youtube.

I'm sorry to be a pain in the arts, but I'm trying everything to fix this.

I would be so grateful if you were aware of a fix or a link I oculd follow to correct this error??? Thank you so so so very much. Sorry this post is so long. Ungh.

Oh. My blog is:
poodlesonthemerrygoround.blogspot.com

Thank you again :)
Ms Charley
Australia

Popular posts from this blog

Custom Domain Migration - Managing The Traffic

Your blog depends upon traffic for its success.

Anything that affects the traffic to your blog, such as any change in the URL, affects the success of your blog. Publishing the blog to a custom domain, like renaming the blog, will affect traffic to your blog. The effects of the change will vary from blog to blog, because of the different traffic to every different blog.Followers. People who find your blog because of recommendations by other people.Search engines. Robotic processes which methodically surf your blog, and provide dynamic indexing to people who search for information.Subscribers. People who read your content from their newsfeed reader, such as the dashboard Reading List.Viewers. People who read your content from their browser.No two blogs are the same - and no two blogs will have the same combinations of traffic sources.

Stats Components Are Significant, In Their Own Context

One popular Stats related accessory, which displays pageview information to the public, is the "Popular Posts" gadget.

Popular Posts identifies from 1 to 10 of the most popular posts in the blog, by comparing Stats pageview counts. Optional parts of the display of each post are a snippet of text, and an ever popular thumbnail photo.

Like many Stats features, blog owners have found imaginative uses for "Popular Posts" - and overlook the limitations of the gadget. Both the dynamic nature of Stats, and the timing of the various pageview count recalculations, create confusion, when Popular Posts is examined.