It’s no secret that COVID-19 has changed the way that we work. Businesses all over the world were forced to quickly adapt to a remote workforce, conducting business through a myriad of devices and internet connections of varying quality.
Thankfully, AWS has made it easy to set up and operate high-quality audio and video streams through a service called Amazon Interactive Video Service.
Amazon Interactive Video Service is a managed live streaming solution that is quick and easy to set up, and it’s ideal for creating interactive video experiences. In this post, I’ll show you how to quickly set it up and use it right away.
Getting started is simple. In the console, type “IVS” and click “Create Channel” in the top right of the screen. Give the channel a name and click “Create Channel” at the bottom right of the screen.
Setting up Amazon Interactive Video Service
Now it’s time to set up a streaming tool so that we can use the channel’s stream configuration to present audio and video for playback. In this example, we’ll use an app called Larix Broadcaster. Install the app on your device, then, in a browser, use this wizard to generate a URL and a QR code:
In the AWS console, copy the Ingest Server value and paste it in the URL section of the Larix Grove wizard. In the AWS console, copy the stream key and paste it after the ‘/’ in the URL section of the Larix Grove wizard. Click QR-code, and the result should look like this:
Open the Camera app on your device and point the camera at the QR code. A prompt should appear to open the Larix app. Allow it to open Larix, and save the connection. Click the red button on your phone to start streaming.
In the AWS console, click “Live channels” on the left-hand side. You should see a “Live” status for the channel you created earlier. Click the channel name, and you should see your device output when you click the play button in the “Live stream” section of the resulting page.
Now, on to some more advanced topics…
You may have noticed that the Playback URL references a m3u8 file. What is this file? M3U8 is the unicode version of M3U, and M3U is a plain text file that specifies the locations of media files. Apple has popularized adaptive streaming via their “HTTP Live Streaming” (HLS) format, and M3U8 files are the basis for this adaptive bitrate streaming protocol.
So what does the M3U8 file contain? Let’s look at our example. The playback URL is https://48a1becc32e6.us-east-1.playback.live-video.net/api/video/v1/us-east-1.276373161959.channel.SzWbrFLdwxfN.m3u8, so if we start streaming to the channel and open this link in a browser on a Mac, we can download it and take a look at the contents.
In Terminal, we can curl the endpoint and grab the USER-IP value, which matches the external IP address of the Mac, as shown:
Let’s take a look at the Adaptive Bit Rate settings provided by IVS by taking a look at the EXT-X-STREAM-INF and EXT-X-MEDIA values within the M3U8 file:
Here we can see the adaptive bitrate information provided by the service. There’s nothing you should need to change here, but it gives us detailed information about how the video will be served in terms of bandwidth, frame rate, and resolution. AWS handles all those details for us, so unless you have advanced technical needs, that’s all you’ll need to know about it for now.
It’s important to understand video quality basics in order to deliver the optimum product to your consumers. We won’t go into many of those details, but here are a few suggestions on maintaining superior quality end to end:
- Use a high-quality camera with proper lighting in your streaming environment.
- Use buffers such that when hardware failures occur, you will have some time to correct them and the failure will ideally be imperceptible to viewers.
- Ensure the network of your stream-producing device is reliable and of high quality, especially for uploading.
- Use Quality-Defined Adaptive Bitrate for best results. This is provided within AWS Elemental live services and it minimizes buffering while maximizing viewer bitrate.
We’ll save MediaLive for another post, but as we continue to see higher resolutions and more immersive viewing experiences, the underlying systems serving content will evolve and will provide a better streaming experience for all users.
If streaming audio and/or visual in AWS is a capability that your organization is interested in, please contact us to discuss. AHEAD is an AWS Advanced Consulting Partner with AWS Data & Analytics Competency. We can help you identify and prioritize AWS services that accelerate your technology practice to meet business goals.