Embed Selected Portion of a YouTube Video

Did you ever came across any YouTube video where you liked a very specific portion of it and wanted to post it on your site? I am pretty sure you did and so did I. Today I will discuss how to do just that. It’s fairly easy to understand and implement. So, let’s get started.

The default YouTube video sharing snippet looks like this.

<iframe src="https://www.youtube.com/embed/UDgLLF2e3uM?rel=0&amp;controls=0&amp;showinfo=0"></iframe>

Adding Your Selection

Now, in order to add your selection from this video, you have to specify the “start” and “end” point of your selection using the following parameter (bold section).

<iframe src="https://www.youtube.com/embed/UDgLLF2e3uM?rel=0&start=71&end=120&amp;showinfo=0"></iframe>

As you can see from this snippet, I added “&start=71” to mark the starting point of my selection. Similarly I added “&end=120” to specify the end point of my selection. You might be wondering where the hell did I get this 71 and 120 from. Well, in YouTube, selection points gets marked in seconds. So, 71 seconds is the starting point of my selection that has been counted from the very beginning of this video. In other words 71 second basically means 1 minute and 11 seconds. Same rule applies for marking the endpoint of this video which is 120 seconds or 2 minute. Here is the preview of my selection from one of my video tutorial in YouTube.

I hope you got the idea and from now on you should be able to select a portion of YouTube video and embed them on your site. If you have any additional question, feel free to drop me a line from the comment section below. Thanks.

Today In History



Leave a Reply

Note: Convet HTML, PHP, JavaScripts from HTMLify, before posting from comment section.
License: By submitting a comment here you grant this site a perpetual license to reproduce your words and name/Web site in attribution. Please use your real name or a pseudonym (i.e., pen name, alias, nom de plume) when commenting. If you add your site name, company name, or something completely random, I'll likely change it to whatever I want.