Demystifying Live Streaming: A Beginner’s Guide to Amazon IVS

Prashant Kandathil
Four Nine Digital
5 min readSep 28, 2023

--

You might have experienced Live Video while watching sports and or the news. Some of you might have watched your favourite content producers go live on Instagram, YouTube, Twitch, or TikTok. While others have gone live while attending meetings on Google Meet or Zoom.

What if you wanted to create Live Video without using any of the Social Platforms (YouTube, Twitch, Instagram, TikTok) or applications like Google Meet or Zoom that already exist? With Amazon’s Interactive Live Video Streaming service, you have all the capabilities to create a branded and interactive experience specifically for your use case and followers.

In this guide, I will walk you through the process of setting up a Live Video Stream and embedding it into a website. I will follow up this post with another guide where I show you how to add interactivity to your Live Stream.

Creating a Channel

Amazon IVS has a product called Low-latency Streaming. Using this service you can live stream to millions of users with a delay of only 3–5 seconds. To be able to use this Low-latency Streaming product, you need to create a Channel. A channel will give you the specific configuration you need to broadcast and playback your video content. Here is how to set it up:

  • Log into the Amazon Console and Search for Amazon IVS.
  • Click on Low-Latency Streaming on the sidebar and click Get Started or Create Channel
  • Give the channel a name, use the Default configuration, and click Create Channel
  • You will be taken to your Channel detail page. Scroll down to Stream Configuration. You will see two values here — your Ingest Server and Stream Key. To start Live Streaming you will need to use these two values in the next step.

How to Stream

To be able to stream you need an application that captures the content from your desktop or your webcam and sends it to the Amazon IVS Servers. OBS is an application that will help you achieve this goal. You will need the configuration of the Channel you created in the previous step here.

  • Download and install OBS.
  • Open the application and click on Settings on the bottom right.
  • Then click on Stream.
  • Add your Ingest Server and Stream Key and click Ok.
  • On the main OBS screen under Sources click the + icon and you can add your camera.
  • Then on the right-hand side click Start Streaming. The bottom bar of OBS on the right side should now indicate that you are Live.
  • On the Channel Details page for the channel you just created you see a section called Live Stream. Open it and press Play. You should see your live stream.

How to monitor your stream

Monitoring your stream will give you information on the number of users viewing your stream and the quality of the stream. Do the following to view this information.

  • Go to the Amazon Console and scroll to the bottom of your Channel Details page. You will see a section called Stream Sessions. It will have a new session added to the list with Live indicator. You can click on the Stream ID to view more detailed monitoring information.

How to embed your live stream into a webpage

Now that you have your live stream running you probably want to know how to embed it into your website so that you can share it with your viewers around the world. In the following code, we are going to:

  • Import the IVS player SDK.
  • Create an instance of the player object and attach it to a video tag.
  • Use the Playback URL from your Channel Configuration to view your live stream.

Here are the instructions:

  • Open a generic HTML file and add this code:
<script src="https://player.live-video.net/1.21.0/amazon-ivs-player.min.js"></script>
<video id="video-player" playsinline></video>
<script>
if (IVSPlayer.isPlayerSupported) {
const player = IVSPlayer.create();
player.attachHTMLVideoElement(document.getElementById('video-player'));
player.load("PLAYBACK_URL");
player.play();
}
</script>
  • Go to the Amazon Console and scroll to the Playback Configuration section. Copy the Playback URL and replace PLAYBACK_URL in the above code.
  • View your page, you will see your Live Stream playing!

Summary

That’s it, you are done! You just learned:

  • The basics of live streaming
  • How to set up your own Live Stream with Amazon IVS
  • How to monitor your Live Stream’s performance
  • How to embed that Live Stream on your own web page

Next Post

In my next post, I will show you how to add interactivity to your Live Stream application by integrating Chat.

--

--