Specify a start and stop time when embedding YouTube videos

YouTube videos have changed the way we watch things on the Internet, but what if YOU wanted to change YouTube videos?

Specifically what if you didn’t want the ENTIRE YouTube video to play… just a portion of it?

This super-short tutorial will walk you through doing just that.


The Default YouTube Embed Code

To walk you through this, let’s use the video below… which is a Segway ride through Clearwater Beach, Florida (one of my fav places to go on the weekend, the traffic is terrible but it’s gorgeous and totally worth it).

That video was embedded using the default YouTube video embed code which looks like this:

<iframe width=”640″ height=”360″ src=”https://www.youtube.com/embed/ePzAqhEqRiE?rel=0″ frameborder=”0″ allowfullscreen></iframe>

That (by default) will play the entire video from the beginning to the end… but what if we just want the video to play from the 3:00 minute mark to 4:15? That’s what we’re gonna talk about!

To make that happen we need to add two variables to that embed code one to tell it when to start, one to tell it when to end.

Those variables are simply: start and end.


Start & End YouTube Videos

With those variables we also need to tell it the times at which to perform those actions… which is done in seconds. So if you wanted the video to start 1:00, that would be 60 (seconds), if you wanted it to stop at 2:00 that would be 120 (seconds), etc…

So taking the original embed code:

<iframe width=”640″ height=”360″ src=”https://www.youtube.com/embed/ePzAqhEqRiE?rel=0″ frameborder=”0″ allowfullscreen></iframe>

Adding in the start and stop variables with the seconds that we want those actions to happen (between the 3:00 and 4:15), we get this:

<iframewidth=”640″ height=”360″ src=”https://www.youtube.com/embed/ePzAqhEqRiE?&start=180&end=255&rel=0″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>

The updated parts are in RED.

Does that make sense?

When that embed code is added to a page, the video now starts at 3:00 and plays until 4:15! Click the play button below to see it in action.

So copy this: &start=180&end=255 and append that to the end of YouTube embed URLs, tweak the seconds to what you want and BOOM you did it!

Your friend,
Amy “Rockin’ YouTube” Anderson