X
Popular Searches

How to Get Started with AWS Interactive Video Service (IVS) for Managed Live Streaming

AWS Logo

This week, AWS announced IVS, a managed solution for handling live video, likely based on some of the same software that powers the streaming giant Twitch. It offers an easy way to integrate live video into existing applications without the headaches of setting it up yourself.

What Is IVS?

Low-latency live video content is pretty hard to do properly, and even harder to scale up to handling many simultaneous streams all around the world. Running infrastructure at this scale is massively complicated, so there’s a need for a service like IVS.

The simple setup makes it particularly useful for services looking to add live experiences to their platforms, and especially for businesses that want to host professional live streams on their own sites without resorting to streaming on an official YouTube or Twitch channel.

IVS itself is pretty simple. You create a channel and get a stream key. You can stream content to IVS using standard software like OBS or Streamlabs. On the client side, you can use third-party live video players, but AWS provides a client player SDK that can be easily integrated or customized if needed.

IVS has two hourly charges for video input and video output. Video input is the number of people actively streaming content, which is charged differently based on resolution. SD content streamed at a maximum of 480p costs $0.20 per hour, per streamer. HD content at 1080p costs a pricey $2.00 per hour, per live stream, even if there’s nobody watching it.

IVS charges

Video output takes the place of the standard data charges. You don’t pay per GB like most AWS services; instead, you pay a flat hourly fee per hour of video output, depending on the resolution. This fee is slightly discounted after 10,000 hours of watch time, but is also significantly higher for regions like Taiwan and Korea.

Regional costs per hour.

So, if you’re planning on launching a streaming competitor to services like Twitch and YouTube, you should be prepared to front the cost for it. Even streamers with relatively small audiences can rack up tens of thousands of hours of watch time.

However, even if you wanted to do it yourself, you’re going to be paying these fees regardless. Video files are large, and streaming high definition video for hours on end to many different clients will fill up your bandwidth bill on any hosting platform.

Setting Up IVS

If you want to test it out, head over to the IVS console and click “Create Channel.” Of course, if you want users to be able to create their own channels, you’ll want to handle it for them and create channels using the AWS API or SDK.

 Click "Create Channel" on  IVS console.

Give it a name, and select Standard or Basic for the channel type. For the latency, you’ll likely want to keep it on the low latency option unless interactivity doesn’t matter. You can, of course, also add standard AWS tags to help with tracking cost.

Channel type setup.

You’ll be given an ingest server URL, and a stream key, as well as a playback URL to an m3u8 stream file for custom players.

Stream and playback configuration.

Currently, OBS Studio doesn’t support IVS out of the box, so you’ll need to select “Custom” and enter in both the server URL and stream key.

Select "Custom," enter both server URL and stream key.

From there, you can start streaming, and you should see the Live preview in the management console.

Live preview management console.

If you want to embed this on your own site, you’ll need to add the IVS player, and initialize it with the playback URL.

<script src="https://player.live-video.net/VERSION_NUMBER/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>

If you want more customization, IVS features an integration with video.js, a popular library for customizing HTML5 video players.

For mobile platforms, you can use the SDK for iOS or Android.

Anthony Heddings Anthony Heddings
Anthony Heddings is the resident cloud engineer for LifeSavvy Media, a technical writer, programmer, and an expert at Amazon's AWS platform. He's written hundreds of articles for How-To Geek and CloudSavvy IT that have been read millions of times. Read Full Bio »

The above article may contain affiliate links, which help support CloudSavvy IT.