How To Embed Youtube Videos with Specific Start and End Times

Oct 5 • Featured, Video Marketing13 Comments on How To Embed Youtube Videos with Specific Start and End Times

How To Embed Youtube Videos with Specific Start and End Times

Ever wanted to share just a short part of a long video on your blog? Sometimes we come across a quite long video on Youtube and pick up something from it that we want to share. It can be a problem if we want to share only a certain part of it and not the rest of the video.

That’s the trouble I was facing when I wanted to embed a Youtube video on this post.

Fortunately, if it’s on Youtube, you don’t really have to download the video, edit it yourself and re-upload the part you want to share. That will take too much time. Here’s how to quickly embed a Youtube video with specified start time and end time.

  1. First thing you have to do is of course get the specific time you want your embedded video to start and the specific time you want it to end at. Then convert them into seconds. Let’s say you want to embed only the part of the video starting from 02:16 up to 02:58.
    In seconds, your start time would be ( 2 * 60 ) + 16 = 136 and your end time would be ( 2 * 60 ) + 58 = 178.
  2. Next, grab the embed code from the Youtube video, and append the following parameters to the video URL in the embed code:
    Replace [your_start_time] and [your_end_time] with your actual start and end times in seconds so that your embed code would look like this:

    <iframe width="560" height="315"
    frameborder="0" allowfullscreen>

The version parameter there specifies the Youtube player version that should be used for your embedded video. Version 3 is the only version that supports the end parameter so if you want to specify an end time for your embedded video, make sure to specify version 3 as the player to be used in your embedded video.

If you only want to specify a starting time and no end time, you can just omit the end parameter entirely.

And that’s it, your embedded video should only play the part that you have specified. Just like in the following example:

Article Name
How To Embed Youtube Videos with Specific Start and End Times
Ever wanted to share just a short part of a long video on your blog? Here's how to quickly embed a Youtube video with specified start time and end time.

Related Posts

  • Aarij Siddiqui


    I just checked, and it seems to work exactly as expected! I also tried it with another video. It started and stopped at specified times.

    I was wondering if you know how can I play different videos for specified times back-to-back in an embedded player?

    • Nimrod Flores

      Hi @aarijsiddiqui:disqus,

      I’m not sure if what you want to do is already possible right now. As far as I know, you can only play one video at a time in one embed code.

      • Guest

        Hi @jimlefleur:disqus Thanks for the quick reply!
        In this case I keep digging :)

  • Anwar Bashir

    The above code and embed code works fine from your site (even on iPhone), but when I embed on my own site the video will play from the start to the end, but then starts from the beginning not the start if repeat is required. The other example on the uses the AS3 player with the This works on browsers but the embed code will not work on iPhone. I think there is a bug in the IFrame embed or some problem. However you appear to have been able to overcome this somehow as your code works!!! Could you try the embed code above in a vanilla page and confirm my findings. Then if possible could you advise how to code so that it will work as above? Many Thanks.

  • Paolo Antonucci

    It works! Thank you very much!

  • Max Greenflame

    Is there any way to get rid of the option to view the full video? What if I don’t want my blog visitors to watch my long video till the end. Thanks.

    • Nimrod Flores

      Youtube will always put a link to the full version of the video on their site. Even when you disable the video info, the youtube watermark at the bottom right of the vid links to the page for that video on youtube.

      To accomplish what you described, you’ll have to rip the video from youtube and edit it to lift only the part you want. Then upload that back to youtube.

  • HerrinSchadenfreude

    Why doesn’t this work anymore? It just keeps playing after the end time as if none was specified, even with the end parameter in there. It starts at the right time, but when you look at the location bar it has dropped the start and end parameters and reloaded the video without them.

    • Nimrod Flores

      Hey Herrin, thanks for pointing that out. Yeah, it is kinda weird… from my computer here, it still starts and ends at the right times I specified, but upon page load, I see that the progress bar doesn’t display anymore the part I specified to be played.

      I just checked Youtube’s developer documentation, but there doesn’t seem to be any change on these parameters.. So I’m also not sure what’s really happening with their player.

      Guess we’ll just have to find out a little later…

  • Jelila jelila

    Nimrod you’re a hero! thank you sooo much! this enables me to embed video on my wordpress site and start where I want! fabulous! so very helpful! thanks a mill! :D

    • Nimrod Flores

      No problem. Glad you find it useful! :)

  • Nica, Virtual Assistant

    This is a great tip, Nimrod! I didn’t know about this before. It’s a great idea if you want to give a sneak peak to premium video content and not have to do a separate video just for the teaser. Awesome!

    • Nimrod Flores

      Thanks Nica. Yep you can use this hack for that. But remember, users will still be able to access the rest of the video if they click through to Youtube and watch the video from there.

      So if what you mean by premium is “paid” content, this might not be a good idea. But if it’s just premium because it’s special and you’re not charging people to access it, then this trick should do.

« »

You can enter your token in