Youtube URL Modifiers

youtube_logoYoutube is an essential tool for most teachers these days.  Over the years I’ve received several questions regarding integrating youtube videos into presentations. For example:

  • Can I play just a portion of a video?
  • Can I remove the related videos from being shown at the end?
  • Can I make the video full screen automatically?

All of these things are simple to do when using the embedded player.  The embedded player is designed to be used when embedding content into a website or blog post.  It can also be used to access just the video portion of a youtube page in a browser window.

For the following examples, I will be using the ever-popular keyboard cat video.

http://www.youtube.com/watch?v=J—aiyznGQ

When you click the link above, you’ll be directed to the video in the standard youtube interface.  It is important to understand the anatomy of this link so that you can apply this concept to other videos.  There are three distinct parts:

  1. The root site URL:  “http://www.youtube.com/”.  This tells your browser that you are looking to load a page hosted at youtube.com
  2. The player: “watch?v=”.  This tells youtube you are looking to use the standard player (the “watch” part) and that it can expect to find which video I’m trying to load after the equal sign.
  3. The video ID: “J—aiyznGQ”.  This is the part of the URL that identifies the video.  Each youtube video has a unique video ID.

Now to load our video in the embedded player, all you need to do is change “watch?v=” to “embed/”.  You can do it yourself, or click the link below.

http://www.youtube.com/embed/J—aiyznGQ

You should find the player loaded in full screen mode and in a stopped state.  I prefer linking to the embedded player in my presentations; I’m almost always needing to play the video full screen anyway.

The real power in the embedded player comes from the modifiers one can add to the end of the embedded video URL.  A few examples:

  • “&rel=0” will not display “related videos” when your video is over
  • “&autoplay=1” will automatically start playing the video upon load
  • “&loop=1” will play the video in a loop
  • “&start=33” will start the video at the 33 second mark
  • “&stop=37” will stop the video at the 37 second mark

One or more of these can be added at the end of the URL.  They need to be seperated from the video ID by a “?”.  In a basic example, if we wanted to open our video and play it immediately, the URL we would use would be:

http://www.youtube.com/embed/J—aiyznGQ?&autoplay=1

And for a more advanced example, let’s create a URL that automatically plays, starting at the 33 second mark and stopping at the 37 second mark, that does not show any related videos after it is complete.

http://www.youtube.com/embed/J—aiyznGQ?&autoplay=1&rel=0&start=33&end=37

A list of available parameters for the embedded player can be found here.

If you have any questions, please leave a comment below.

4 thoughts on “Youtube URL Modifiers

  1. Thanks for the work around! When I put in the end time an error message appears saying the video no longer exist, the owner may have deleted it. Do you know why that is?

  2. Wow, that youtube coding is amazing! If only it would work for my google docs presentation for school. I just want to start the following video https://www.youtube.com/watch?v=GZfU9olGiiE at 2:15 and end at 2:23, but as soon as I try to change the code at all it says the URL can’t be loaded and wants to know if its from a supported site. I used Tubechop which was so fast and easy, but google docs won’t allow the resulting URL to be uploaded. Thanks so much in advance for any thoughts on how to take a snip out of old Dr Who to make my talk less boring.

  3. I stumbled upon your post in looking for a way to embed a video to start at a certain number of seconds into the video. I still want to do this. Did you know that Kahoot does let you do this, but that is only if you want multiple choice questions between? I’m still looking for a presentation solution.

Leave a Reply