Stream to your own website
Wish you could to live stream to your own website? You can with StreamYard!
There are number of ways to accomplish this – in this tutorial we’re going to use YouTube.
Note: If your YouTube account was created after August 2016, you need monetization enabled and an approved AdSense account linked to your YouTube account. Check the YouTube Features page to confirm live streaming and embedding is enabled as well.
You have two options for YouTube, let’s walk through both of them.
Option #1 - Temporary YouTube link
Use this if you’d like to embed a single live stream on your website. This is the simplest and most common option.
- Add your YouTube channel on StreamYard. You can do this from your dashboard.
- Create a broadcast. Then on the broadcast, click on “More”, then “View on YouTube”.
- On YouTube, right click on the video section and click “Copy embed code”.
- Paste the embed code onto your website. Your viewers will see the stream on your website when you go live on StreamYard! Note that the embed code will be different for each broadcast.
Option #2 - Permanent YouTube link
Use this if you’d like to broadcast to your website multiple times without having to change the embed code.
Note that this option requires using a StreamYard RTMP server destination instead of directly integrating with YouTube. This means you won’t able to show YouTube comments in the stream.
Locate your RTMP server URL and stream key on your YouTube live dashboard. Look for this section:
Add an RTMP Server destination on StreamYard using the server URL and stream key from above.
Navigate to your YouTube advanced settings. You should see a section called “Account information”. Copy your YouTube Channel ID to your clipboard.
On your website, create an embeddable link with the following format:
1 2 3 4 5
<iframe width="640" height="360" src="https://www.youtube.com/embed/live_stream?channel=INSERT_YOUR_CHANNEL_ID_HERE"> </iframe>
INSERT_YOUR_CHANNEL_ID_HEREpart with your actual channel ID and paste the code on your website. Now your live streams will appear on your website every time you go live!
Embedding Live Chat
- Find the video ID from the embed code in the Temporary YouTube Link section. For example, the video ID is
oHg5SJYRHA0zfor this embed code:
1 2 3 4 5 6
<iframe width="560" height="315" src="https://www.youtube.com/embed/oHg5SJYRHA0z" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen> </iframe>
- Create the live chat URL using your domain name and this video ID.
https://www.youtube.com/live_chat?v=<your video ID>&embed_domain=<your website domain>
So, if your website was
www.example.comand your video ID was
oHg5SJYRHA0z, the link would be
- On your website, create an embeddable link with the following format:
1 2 3 4 5
<iframe width="640" height="360" src="https://www.youtube.com/live_chat?v=<your video ID>&embed_domain=<your website domain>"> </iframe>
After following these steps, you should have a functional chat embedded on your website.