Friday, October 10, 2008

Embed a Part of a YouTube Video

If you want to embed a YouTube video that starts to become interesting somewhere in the middle, there's a simple way to skip the boring part. YouTube's embedded player has a parameter that lets you specify the number of seconds that should be skipped before starting to play the video. Here's how you should edit the code: append &start=[number of seconds from the start of the video] to both URLs.

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/abcdefghijk&hl=en&fs=1&start=15"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/abcdefghijk&hl=en&fs=1&start=15" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object>

For example, the video below includes some excerpts from Google Chrome's launch, but I skipped to the last part, when Sergey Brin answers some interesting questions.


Unfortunately, YouTube doesn't provide an option to link to a part of the video, but you can still use the embedded player:
http://www.youtube.com/v/w8oPEJiCqi4&start=249&autoplay=1,
where the autoplay parameter is necessary to automatically start the video.

Since there's no end parameter, you can try Splicd, a site that uses YouTube's API to isolate a part of a video.

Related:
YouTube embedded player parameters

Labels:

  18 comments ( Post a comment )
Once again great tips.
Great tip, but there are also many ways to do this...for example Splicd can help one split a YouTube video too -

http://kidtechguru.blogspot.com/2008/10/splicd-lets-you-split-and-share-any.html
Great trick, very useful.
Finally! I've been wanting to do this forever on YT since you can do it on Google Video, e.g. http://www.makeyougohmm.com/20060721/3605/ tells how to do it with Google Video.
Another great way to irritate surfers.
Wonderful Job thx
wow, great tip buddy i loved it.
Is it possible to add a stop time after the start? I would like to play only a small part of the video.
This was exactly what I was looking for! Well explained and referenced. Kudos
I think you've covered this in a later post but in any case maybe you could update this post, too.

That is, to note that YouTube actually _does_ enable people to "deep link" directly to a specific spot in a video. Just add #t=XmYs where X is the number of minutes and Y the number of seconds you want to jump to. See http://www.youtube.com/watch?v=sPQViNNOAkw#t=12m40s for an example (Clay Shirky explaining the beauty of The Long Tail).
Just make height= something smaller. I'm not sure the exact height for YouTube's controller. Experiment. It's probably around 30.
You can actually link to a specific moment of the video by adding this to the end of the URL
#t=0m56s
It works on me,..
Thanks!
i found somemagic tool if embeding disable on http://blogger-templates.blogspot.com/2009/02/youtube-embed-magic-tool.html, is thath true?
can anyone tell if i want to embed a youtube video directy by its url..... it is something like "http://www.youtube.com/watch?v=BNGlf3hUyMY&feature=channel"............ now if i replace the src with this url, it dosnt work........ any one has idea?? plz help!!!
@Anonymous:

Use http://www.youtube.com/v/BNGlf3hUyMY
http://www.youtube.com/watch?v=w8oPEJiCqi4#t=4m09s

Here's the link construction to take you to the same start point you've set using the embed code.