Friday, 19 April 2013

Embed Just a Portion of a YouTube Video

Posted by Abhishek
youtube-video-embedHello Friends all of you might be aware of that how to embed youtube videos on to your posts either in blogger or wordpress you just need to copy the html code and paste it in the the html section of the post editor of blogger or Wordpress.But you might not be aware of the fact that you can also embed just a little portion of the youtube video.Yes i am saying true you can embed a little portion of the video in your posts in blogger or Wordpress.This way has been founded by Mr. Amit Agarwal From India.For embeding just a little portion of the video the thing you must know is the video id and the starttime from where your little portion starts and the endtime at which the video ends.

Embed YouTube Video with Start Time


In this you just need to specify the starting time where the video will start and let it play till the end.So to do this go to the video which you want to embed and then go to the time from where you want to insert it and then right click on it and select Copy Video Url At Current Time and the replace it below.
<iframe width="500" height="300" frameborder="0" allowfullscreen
src="Paste the Copied Url Here"></iframe>

In the above Code replace Paste the Copied Url Here with the url you copied from the video.

Embed YouTube Video with Start & End Time


Now if you want to embed just a little part of the video then follow the steps below.
<div videoID="t2MOwQ089eQ" startTime="1330" endTime="1466" height="400" width="400" id="youtube-player"></div>

<script src="http://dl.dropboxusercontent.com/u/78817228/youtube-embed.js"></script>

Now Replace t2MOwQ089eQ with the video id you want to embed and replce the start time with the time from where your video will be started and the end time where you want it to end.For Example if you want to embed a 2 minute segment from a hours long video (22:10 – 24:26).Remember that the time is in seconds so you need to make the minutes into seconds using this formula (22*3 + 10) and use can use (24*3 + 26) .Replace the time and second with your own time period.

Thats it friends if you have any confusions then do tell us in the comments below i will try my best to solve that for you.

4 comments: