What Is A YouTube Video Embed Anyway?
If you upload a video file to your own website hosting, the large video file will eat up your storage and when the video is played by visitors it will use some serious bandwidth. If you get a lot of visitors and or upload a lot of videos, this can run you up against your account limits with your web host.
Also, your web host may not be optimized for playing videos so they may play slow or the default player on your website platform (WordPress, etc.) may not play nice with all browsers and devices.
Embedding a YouTube video solves these problems. YouTube knows a thing or two about video hosting so utilizing their technology is a smart move on your part.
You can use the code provided by YouTube to embed any video on a site. The video will display on your website just like the example videos below, but it will be playing off the YouTube servers and in the YouTube standard player.
Some benefits of embedding a YouTube video are:
- Your visitors get to watch a video…obviously
- Since the video plays from YouTube servers, it won’t take up your storage or bandwidth
- The data transfer won’t take up your hosting account bandwidth
- The YouTube player is optimized for any browser and device so you can be confident the video will play reliably
How To Embed YouTube Videos On Your Website
So how do you actually do this? It’s pretty easy, just go to any YouTube video YouTube.com and click the Share button. You’ll see some options for embedding the video and an HTML code that can be pasted into your site. Pasting in that code will display the video on your site. Voila!
Step 1 – Click Share and Embed
Step 2 – Get the code & paste on your site!
What if the video is not on YouTube?
If your video is not yet on YouTube, that’s a problem – but not a big problem!
You can upload a video to YouTube for free. Follow the instructions in my video above to upload your video first and then follow the instructions above to get the embed code.
A Couple More YouTube Embed Tips…
1. Embedding a YouTube Video in WordPress is even simpler
One other tip – if you’re using a WordPress site, you don’t even need the YouTube code. You can simply paste in a YouTube video link like “https://www.youtube.com/watch?v=vGHrJDmepI0” to WordPress and the text editor in WordPress will automatically embed the video. WordPress for the win – YES!
2. Make Your YouTube Embedded Videos Sleek and Clean
YouTube is pretty solid when it comes to playing video. The player itself is functional and people know it like the back of their smart phone, but the player doesn’t always present the clean look you’re looking for on your site. Check out the two videos below. The one on the left uses the standard YouTube embed code described above and the video on the right (2nd video) has some controls and titles removed. The result is a much cleaner look. To create this look, just use my code below but change the video ID in bold.
UPDATE: As you can see below, the videos are basically the same. Youtube has changed some of the embed parameters so that the “showinfo” parameter now does nothing. The result is the channel avatar, video title, watch later, and share buttons will all show at the top of the video. A nice clean video embed from Youtube seems to be a thing of the past. The 3rd embed below is part of my WordPress theme and does give a nicer look before the video is played.
<iframe src="https://www.youtube.com/embed/vGHrJDmepI0?rel=0;controls=0;showinfo=0;theme=light" allowfullscreen="" width="420" height="235" frameborder="0">
Let me know if you have any more questions about embedding YouTube videos on your site. Happy to delve in deeper and there are probably more links I can share. I found my embed code on another blog post like this one. You can also see all the standard instructions on embeds from YouTube here.