How To Customize YouTube Player Embeds - Tips and Tricks

Last month, I spoke on several panels at the PubCon conference about online video.  In one session, titled, "Best Practices for Video Creation, Integration & Marketing," I focused my presentation on how to best integrate online video in a website.  There was a lot of information covered in my presentation, but one of the slides that I noticed people furiously jotting notes about, was my slide with tips for customizing the embed code for YouTube Videos.

Now, I won't spend time in this post debating whether you should or should not use YouTube to host videos for your website.  Clearly there are some advantages as well as disadvantages for posting video vs. hosting video.  If you ask me, I always recommend distributing your videos to YouTube as they have a tremendous audience to draw upon.  However, I much prefer using an online video platform or self-hosting my own videos.

All that being said, if you are going to use YouTube to host videos for your site, at the least, you should know some ways in which you can customize YouTube's embedded player to your liking.

How to Customize YouTube Embeddable Player Features

How To Customize YouTube Player Embeds   Tips and Tricks youtube embed 300x340

  • Turn off Title & Ratings
    • &showinfo=0
  • Turn off Search
    • &showsearch=0
  • Turn on Related Videos
    • &rel=1
  • Turn off Annotations
    • &iv_load_policy=3
  • Force Closed Captions
    • &cc_load_policy=1
  • Turn on AutoPlay (not recommended)
    • &autoplay=1
  • Loop Playback
    • &loop=1
  • Remove Full Screen Option (not sure why you'd want to)
    • &fs=0

What if you need a custom size for your player?

Well, this seems like an obvious one, and it is.  Keep in mind that YouTube's player is in 16x9 wide-screen format.  If you want to change the dimensions, do so using a 16:9 aspect ratio and add 25px in height for the player controls.  For example, lets say that you needed the video to be 320px wide:

ALSO ►  YouTube Advertising: Partner Revenue Terms & How Advertisers are Charged

--> 320(9)=Height(16) and then add 25px

--> Height=180 + 25 = 205px

How to Customize YouTube Video Quality

Youtube already allows you to customize the embed code and allows the videos to play in HD, but in case you were wondering what the codes were for this and/or how to force play back of high-quality files (not HD);

  • Show in High-Definition 720p
    • &hd=1
  • Show in High-Quality
    • &ap=%2526fmt%3D18

Here is an example embed code using the high-quality "hack"

<object width= "425" height="344"><param name="movie" value="" /><param name="allowFullScreen" value="true" /><embed src="" type="application/x-shockwave-flash" allowfullscreen="false" width="425" height="344"></embed></object>

Example of Customized YouTube Player

So here is an example video at 600px wide, in HD, with no title, no ratings, no search, no full-screen option, forced closed captions and looped play-back.

How to Embed YouTube Videos with your Own Player

Want to have a completely custom player of your own to stream YouTube videos?  You can do that as well using YouTube's chromeless player API.  One of my favorite video players out there is the JW Player from LongtailVideo.  You can use the JW Flash Player to showcase YouTube videos and still maintain your custom JW skins, functionality, etc....

Wow - ok, that was a long post but I hope that it helps. If it does, perhaps you can help by bookmarking, sharing, digging, stumbling, etc... Other people could probably benefit from this info and I certainly wouldnt mind the traffic ;-)

  • Luis Noronha

    Try this tool at

  • Susan Brandoli

    How can I turn OFF related videos once they are embedded?

  • Farid Uddin Zaglu

    How Can I edit the buffer system on youtube.

  • Baron McDowell

    How can I disable or remove slider (for forward/ backword) using Embaded code.

  • Baron McDowell

    How can I disable or remove slider (for forward/ backword).

  • Abdelkader Soudani

    &ap=%2526fmt%3D18 doesn't work anymore, any other hacks?

  • Thomas Ho

    Any idea on how to check back the original links after we embeded it to our Own Player?

  • Jet Jagger

    Cool beans.

  • Kidd Lennie

    very nice

  • Mvs Player

    Is possible remove the ads inside the video embed????

  • Sri Bharath

    Thanks , That was really helpfull.

  • Cas Beenker

    great article, but I have a question. The flashplayer is allways on the foreground of a website, so my dropdown menu goes behind it all the time. Is there a way to show the dropdown menu over the player?

    • Nick Abate

      I am having that same ever figure that out?

    • David Birley

      It could be something to do with iframing on your site. Some sites allow iframe embed codes easily, others don't. WordPress is one that can be a bit funny like that, in which case use the old embed (or new) embed code - try the two embed codes. One will work the other won't...

    • Jay Jayza

      you need to change the z-index of the menu (in the css) to be higher than the flash.

  • Pira Ti

    need help here. I want to play youtube on custom video but either without the logo or logo is not clickable. modestbranding doesn't seem to work. thanks

  • Joost Schrickx

    But I have an additional question. Recently my company realised a Dutch video which scores very high in youtube on the keywords "scheiding, fiscaal, mediator". However, the page in which we embedded the video doesnot score at all on these keywords. Is there a way of inheriting the youtube score to the embed-page?

    • Pira Ti

      why not place a link back to your site from the video.

  • David Monk

    It looks like Youtube have taken away that facility. Instead Youtube have opened up the way to add intergrate your own applications. This link will explain:

  • Fred Russell

    Ok When I log into my youtube account I don't get the more option in the drop down under my accout so how can a I create a vidoe player if it won't give me the option.

    • robert wallis

      That option was removed ages ago. So it's gone.

  • Usman Ali

    Very niceeeee!
    Keep it up bro.

  • Pat Mansfield

    Thanks Mark! That was helpful. It was cool that yours was the first article to come up when googling "custom embedding of youtube".


    Hmm, the heading says "how to embed youtube videos with your own player" but then you don't say how but just show an example. How is it done? (Or is it so idiotically simple that I shouldn't have to ask??) Thx, btw I don't mean to knock your post in any way 'cause I subscribe and get a lot of useful info here.

  • Rohnie

    I want replay my videos again and again in a loop.without showing the controls.

  • Mix TV

    any idea how to modify the full screen WHITE background on embedded videos? that is really annoying..

    • Mark Robertson

      Im not sure what white-screen you mean. I dont see that in full screen...

  • Todd Thompson

    Have you tried playing your youtube embedded video in longtail on this page lately? Longtail is AS2 and no longer works.

  • tracyselena

    so is there anyway to remove the annoying ads...especially when I'm embedding it on my own site and this huge hostgator ad appears right overtop my video? I mean i love hostgator...but c'mon..

  • Mark

    The JW Player doesn't have the CC option like the youtube player does. any idea how to get the JW Player to show captions?

    • Mark Robertson

      You can definitely do CC with JWPlayer. I had an example somewhere but for the life of me cant find it - but - check this out - and

  • Mark R Robertson

    That is a good question. I dont know. Im sure you could add a title to the flash vars but I wouldnt know how to automate that.

  • JimPatrick Munupe

    Fantastick post Mark, every online marketer should read

  • rahilsid

    Your SEO skills must be at work. i was google-ing how to change the size of an embedded youtube player. This came up. VERY helpful. Thank you!

    • Mark Robertson

      Yipee - thanks

  • Nico Black

    Any idea on how to make the screen blacken out and the video larger when playing?

    • Mark Robertson

      Hey Nicholas - I'm not sure I understand the question

  • Jeremy J. Dodd

    @markrobertson Excellent post! I especially appreciate the YouTube hacks!

    Only issue I'm having is I don't know where to insert the additional code. Can you provide an example of what your embed code would look like for a YouTube video with the following hacks added:

    -Turn Off Search
    -Play in High Quality

    Much appreciated. And thanks again for the article.


  • SmashingShare

    very informative article. thanks for sharing this.

  • Michael Locke

    NICE!....great useful post. Thanks.


    thanks for the 'embedding youtube in a separate player' info!

    • Mark Robertson


  • JeroenW

    Yeah indeed. The chromeless player from YT - which the JW Player uses - only displays the lower quality videos. There's been a lot of requests for also getting access to the HQ videos, but to date that's not been granted.

    I think the guys from Youtube will first introduce ads in their chromeless players and then th HQ video...

    • AdamV

      From the man himself, thank you for the answer!
      ps. the new release is slick!

      (and Thank you Mark for going to the source for us!!)

      • Mark Robertson

        more than happy 2 ;-)

  • Mike

    Great post Mark as usual. have bookmarked this one. Thanks again.

    • Mark Robertson

      Thanks Mike ;-)

  • AdamV

    That is super handy!! Thank you :)

    It looks like the JW player references the non high quality version, is there a way to force the HQ version?

    • Mark Robertson

      Yeah, Ill have to ask JW... I think that it may be that it is not "allowed" by YouTube in the chromeless player. I was looking into that a few months ago and I think that was the conclusion but Ill try and get an answer for you.

      • AdamV

        That makes sense, at that point everyone could get free unbranded hd hosting.

        Thank you for the reply Mark!

  • Dugdale

    Mark, I like how you are using the captions in the video. I think that adds engagement. I am still trying to figure it out with SUBply.

    Hey are you going to Affiliate Summit next month?

    • Mark Robertson

      wish I was - $$ - probably a good reason why I should go ;-) Oh well

      • Dugdale

        Bummer, I was hoping to at least buy you a beer for giving me that tip about Subply.