Wednesday, 6 June 2012

Embedding a Youtube video which starts from certain moment

Since a cup of month, YouTube has removed the restriction to upload the video with more than 10 minutes, for certain users. This is a good news for the users, because they don't have to cut the long video in different parts and hope the viewers can find all the parts. But it introduces a problem:

When the video is very long but we just want to refer a certain moment of the video, we must indicate it.

1. Specific Link
There is several web pages which allows you to create a specific link for it. For example:

What it do is add a parameter to the link called t, which tells to the player the minute and the second that should starts the video. For example, if I want some video starts from the minute 1 and second 5, the parameter to add is


Note that the symbol "&" is utilized to separate the parameters.
The follow link opens a video which starts on minute 1 and second 5

2. Embedded videos
2.1 Change the address format
To start from a specific point, the default format of Youtube url doesn't work. You must change it to /v/ format.

For example, the follow link won't work:

It must be changed to the follow one:

2.2 Add time to the url
For embedded videos, the time should be translated to seconds before add it to the video.


The follow code shows the same video above, with it embedded to this post:

<object height="385" width="640"> <param name="movie" value="">
<param name="allowFullScreen" value="true">
<param name="allowscriptaccess" value="always">
<embed src="" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed>

No comments:

Post a Comment