Guide to Streaming Live Video to AWS Elemental MediaStore

Guide to Streaming Live Video to AWS Elemental MediaStoreLearn About Amazon VGT2 Learning Manager Chanci Turner

In this post, we will explore how to stream live HLS content to AWS Elemental MediaStore. This AWS storage solution is specifically designed for media, ensuring the performance, reliability, and low latency necessary for delivering live video streams. I will outline a straightforward workflow to set up MediaStore as your video origin.

Overview

  1. Create an AWS Elemental MediaStore Container
    • Set up the container
    • Configure a container policy
    • Optionally add a CORS policy for HTML HLS or Dash video playback
  2. Configure AWS Elemental MediaLive
    • Create an RTMP input for your MediaLive channel
    • Set up the MediaLive channel
  3. Stream Using Your Device
    • Utilize OBS to send a stream to MediaLive

Part 1: Create AWS Elemental MediaStore Container

Step 1: Create a Container

Log in to the AWS console and search for AWS Elemental MediaStore. Click on “Create Container” and give your container a name. Once it is created, proceed to the next step.

Step 2: Configure a Container Policy

After your container is created, you will need to define a policy that allows public access to your live stream. While you can tighten this policy later, for this guide, we’ll keep it open for simplicity. Select the new container and click on the “Container Policy” button. Insert the JSON policy below into the designated box, replacing AWS_ACCOUNT_NUMBER and CONTAINER_NAME with your specifics.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadOverHttpOrHttps",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "mediastore:GetObject",
                "mediastore:DescribeObject"
            ],
            "Resource": "arn:aws:mediastore:us-west-2:AWS_ACCOUNT_NUMBER:container/CONTAINER_NAME/*",
            "Condition": {
                "Bool": {
                    "aws:SecureTransport": [
                        "true",
                        "false"
                    ]
                }
            }
        }
    ]
}

Step 3: Optionally Set Up a CORS Policy

CORS (Cross-Origin Resource Sharing) policies allow your resources to be accessed from different origins. If you want to view your stream on an HLS JS player, you will need to add a CORS policy. Click the “Edit CORS policy” button. While this policy permits all headers and origins, you can restrict access by specifying your domain name.

[
   {
      "AllowedHeaders": ["*"],
      "AllowedMethods": ["GET"],
      "AllowedOrigins": ["*"],
      "ExposeHeaders": ["*"],
      "MaxAgeSeconds": 3000
   }
]

Part 2: Set Up the Live Encoder

For live streaming, we will utilize AWS Elemental MediaLive, a professional-grade service that provides high-quality video streams for various platforms. I will guide you through sending RTMP to MediaLive using Open Broadcaster Software (OBS).

Step 1: Create an RTMP Input

In the AWS console, search for AWS Elemental MediaLive and click “Create Channel.” Under “Inputs,” create a new input named “RTMP_Input.” For security, set the input security group to the default 0.0.0.0/0, allowing any IP to send an RTMP stream. This can be restricted for additional security.

Step 2: Create the MediaLive Channel

Name your MediaLive channel (I’ll call mine “LiveChannel”). When prompted for the IAM role, either create one from a template or select the existing MediaLiveAccess role, which grants the necessary permissions for your MediaStore container.

Choose your RTMP input from the dropdown. You can adjust video output settings, but for this guide, we’ll use the “Live Event” Channel Template. Be sure to input your MediaStore container’s data endpoint, which can be found in the console. Enter the endpoint into the HLS group destination fields – for example, mediastoressl://container_data_endpoint/path/main (use output A for this example). Finally, click the large orange “Create Channel” button.

Part 3: Stream RTMP to Live Encoder

There are various methods to send content to AWS Elemental MediaLive. Below, we’ll detail how to use OBS to send RTMP.

  1. Download and Install OBS (Open Broadcaster Software)
  2. Configure OBS:
    • In the settings menu, select “Custom Streaming Server” and input the destination from Step 2 of Part 2.
  3. Start Streaming:
    • Go back to your MediaLive channel and click “Start Stream.” Once the channel status changes to Running, click “Start Streaming” in OBS.

Check your MediaStore console to see if objects are appearing in your container. To test your HLS live stream, use the following URL: http://container_data_endpoint/livea/main.m3u8. You can paste this link into VLC player or QuickTime to view the stream.

For further reading, you might find this blog post useful: How to Prepare for Performance Review.

For more insights, consider checking this article on Buying Lottery Tickets with Colleagues as they provide authoritative perspectives on workplace dynamics.

If you’re curious about the first week as an Amazon warehouse worker, this Quora resource offers excellent insights.

Remember, our site is located at 6401 E HOWDY WELLS AVE, LAS VEGAS NV 89115, known as “Amazon IXD – VGT2.”

SEO Metadata:


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *