Disable related videos on a embedded Youtube player
Youtube recently added a new feature to the video player used to embed Youtube videos on other website.
The new default player, once the video completes playing, will display a list of related videos.
While this feature could be useful for some users it is probably not wanted on Youtube video aggregation websites.
Fortunately it's possible to disable related videos.
Let's see how.
The default player
Let's take a cool video (I'm a windsurfing addicted).
The default embed code Youtube suggest us is
<object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/Yc_J_kXaFSw"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/Yc_J_kXaFSw" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed> </object>
Which will generate this:
As you can see, at the end of the video the player will display something like this:
Youtube related videos
Disabling related videos
The trick is to attach to the player URL (http://www.youtube.com/v/Yc_J_kXaFSw) the rel=0 parameter.
The player URL will became http://www.youtube.com/v/Yc_J_kXaFSw&rel=0
Just update the embed code with the new URL:
<object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/Yc_J_kXaFSw&rel=0"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/Yc_J_kXaFSw&rel=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed> </object>
The player now looks like:
We don't have more related videos!
Let's use valid XHTML code
Unfortunately the embed code provided by Youtube isn't valid XHTML code and does not pass the W3C's XHTML validation.
This is really bad as creating valid XHTML web pages is valuable and professional. In some countries it is even required by law for public administration websites.
So we can use something like
<!--[if !IE]> <--> <object type="application/x-shockwave-flash" width="425" height="350" data="http://www.youtube.com/v/Yc_J_kXaFSw&rel=0"> <!--> <![endif]--> <!--[if IE]> <object type="application/x-shockwave-flash" width="425" height="350" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"> <![endif]--> <param name="movie" value="http://www.youtube.com/v/Yc_J_kXaFSw&rel=0" /> <p>Your browser is not able to display this multimedia content.</p> </object>
The above code, which come from my Drupal video module, is valid XHTML code and works with the most used web browsers.
The above code generate:
Conclusions
You are now able to control the behavior of Youtube player related video and post on your website Youtube videos following XHTML standards.



thnks....
thanku for this article....
Thank you very much for your
Thank you very much for your post.
great
this is great, thanks
disabling related videos
Excellent. Many thanks for that, extremely irritating YouTube feature disabled on my blog.
Banja Vrujci Video
Thank you for this very useful tip, i dont like these "related videos" at all. Also i have some clips from youtube on my site http://www.banjavrujci.info/smestaj/video and i am going to put your code to disable related videos. Thank you once again
Great blog - Awesome!
Hey thanks for making that quick and easy tutorial blog. I really rely on things like this for my learning curve. I did just made the changes to my video at http://www.brentlane.com it's right no the front page. We used green screen actually ($.50 poster board scotch taped together) and then did some pretty neat stuff in the video. Check it out if your interested.
Once Again thanks for the blog post. It was clean, concise, and most importantly was the first one I found. I am going to link to this blog post from mine on the site. Cheers.
apartmani
Great tips. Thanx. Very useful
Thank you for the tips!
Thank you for the tips!
Remove embedded youtube video
Can someone tell me how to remove my embedded youtube video from my wordpress front page.
Thanks for the tip
Thank you for the excellent tip.
Disable Youtube click through
is it possible to disable a CLICK through to the YOUTUBE site when an embedded video is playing.
i.e. prevent a user such as a child going direct to Youtube?
I'm looking for the
I'm looking for the same!
Anybidy knows how t do this?
I just want to say....
THANK YOU MAN!
Cheers :)
Graviranje i secenje
Excellent, but anyway I wanted to find somewhere a way to not appear different clips.
&rel=0
Sweet tip!!!
tks
Thanks for help - great advice!
You saved me a lot of time. I started to thing about posting video on some other site instead Youtube - but thanks to you - it is all fixed now.
Works great!
You tube and W3C validation
I think you joke.. tell me where why your code is not validating:
...
Please try this link to see tell me where I wrong:
http://www.validome.org/xml/validate/
Anyone has the Answer but which is that??
Thank you
clever trick
Actually, I am doing some gray hat technique for youtube videos. I know they can be banned any time. But a lots of thanks to you coz now I am sure that I won't get banned to disable those videos.
Till now I was using youtube videos in my own player.
grad
Thank you very much, this is really to use due to competition....
I'm still having problems
Here is my embedded info where do I place the rel=0?
Thank you so much for your help
Hi, Thanks a ton. It really
Hi,
Thanks a ton. It really helped save lot of time.....
Thankyou worked a treat!
Thankyou worked a treat!
Thanks
Thanks for the information man. Saved lot of time.
Ok, successful for my facebook page...
Posted a clip of my kids and an sexy video is related... I was able to remove the related video on my facebook but if people go directly on youtube, they will see the related video still.... I changed the category, changed the description so any word could be seen related... But its still there, on youtube itself. Anyone knows how to have that changed?
Unfortunately the procedure I
Unfortunately the procedure I describe here is only for embedding videos on websites. I'm not aware of any procedure for disabling related videos on Youtube itself.
I don't know if it is possible. Anyway you can ask for help in the official Yotube forum. There you'll probably find more informations.
http://www.google.com/support/forum/p/youtube?hl=en
You Are the Man!
You saved me from doing a lot of work finding a stand alone player and video hosting for a client. Once again, YOU ARE THE MAN!
Wonderful
Thank you very much !
Thank you!!
rel=0 worked great!
Postei um védio no youtube e
Postei um védio no youtube e existe um vídeo indesejado relacionado ao meu. Já tentei mas não consigo extraí-lo de lá.
Ajuda ?
I'm sorry. Would you please
I'm sorry. Would you please ask the question in English? Not able to understand Portuguese.
Good tip
It's sad that we have to do this now but thank you for sharing this information. It will come in handy!
Excellent!
Thanks for being the top "Google" search result for "remove related youtube"! Clear and easy explanation.
Thnak you. it worked , very
Thnak you.
it worked , very nice.
Thanks! I really needed
Thanks! I really needed this! There was an inappropriate movie right after the on I wanted that would show up as related videos.
Wordpress
Does this work with wordpress? I have tried it but it still shows up.
thank u man i'll check it
thank u man
i'll check it
Thanks for the TIP
Worked great!!!!
While this feature could be
While this feature could be useful for some users it is probably not wanted on Youtube video aggregation websites.
mpcoc
How do I remove the URL at the bottom of the embedded player?
The HTML code provided by YouTube for a custom embedded player is generating a border at the bottom of the player that contains the link to our YouTube Profile page, e.g., youtube.com/user/name.
How can this link be removed or kept from appearing?
Have you tried using the
Have you tried using the code provided in the article? It does not display any username link.
You just have to copy and past the last code and substitute any occurrence of Yc_J_kXaFS with the id of your video.
eg. if your video has url (the browser address) http://www.youtube.com/watch?v=CQzUsTFqtW0 you will substitute Yc_J_kXaFS with CQzUsTFqtW0 in the last code I provided.
Hope this helps, if you still needs help just post here.
correction
In the above question, the link was not meant to be an actual one, but it apparently links to an actual page. Please ignore the example.
I modified your comment to
I modified your comment to let the link disappear.
Don't Advertise For Your Competition on You Tube
If you use You Tube to host business related videos that you then place onto your website or blog you are running a nice traffic feed for your competitors as videos with related content are offered at the end of your video. I have always suggested that my associates do not do this.
I appreciate this revelation and the specific code to solve this problem. I will put it into practice and add it to my coaching program for the people I work with in online marketing.
Great tip!
James
http://www.Twitter.com/AskJamesHolmes
I needed this!
Thank you so much. I've wondered for a long time whether I could do this, and I finally Googled it. So glad your (very clear) explanation was near the top.
rel=0 was useful.....
Thank you... this information was extremely helpful to me....
I was trying to find how to disable the youtube related video.... and your blog was the solution i needed.
when you double click
when you double click quickly within the video player, it brings you to the original youtube page.. is there any way to disable that? would be great
thanks
Thanks a Lot.This is really very useful.
keyeagle
Thanks a Lot
Thanks a Lot.This is really very useful.
Thanks so much for it! I
Thanks so much for it! I actually was able to find your site really fast :) Thank God for SEO ^^
Adjust YouTube Customised Players Alpha
Can a parameter of the youtube customised player code be set to say 50% alpha so that the outer edges of the customised player will be see through but the videos that play stay normal? Please indicate how with the below code is so...
Post new comment