Live Streaming With Amazon Web Services

Intro

In this post we will be discussing how to Live Stream using the AWS service MediaLive we will be using the FREE OBS Open Broadcast Software as our streaming app Download OBS. We will be implementing the following features in this post.

  • Using OBS to stream
  • AWS Media Live https://aws.amazon.com/medialive to process our stream
  • Implement startover time for live rewind
  • S3Bubble WordPress player to output our stream to our website
  • Media Package https://aws.amazon.com/mediapackage to instantly turn our Live Stream into a VOD asset
  • Harvesting our AWS job and moving it to an AWS S3 bucket to playback via a Cloudfront Distribution

So we will be covering a lot lets get started.

Setup

First download the free OBS software. Create an S3Bubble account and connect it to your AWS account using the following IAM Policy.

{
        "Version": "2012-10-17",
        "Statement": [{
        "Action": [
            "mediaconvert:*",
            "medialive:*",
            "ssm:PutParameter",
            "mediapackage:*",
            "cloudfront:*",
            "s3:List*",
            "s3:Put*",
            "s3:Get*",
            "s3:CreateBucket",
            "s3:*MultipartUpload*",
            "iam:CreateRole",
            "iam:GetRole",
            "iam:PassRole",
            "iam:PutRolePolicy"
        ],
        "Effect": "Allow",
        "Resource": "*"
        }]
}

We have lots of tutorials on YouTube showing you how this is done.

Once the connection has been made you can let S3Bubble's API handle the rest head over to the MediaLive Streaming page in S3Bubble.

https://s3bubble.com/app/?eu-west-2#/medialive
Click create stream give you stream a name, start and end time and timezone. It is up to you if you would like the system to create a Cloudfront Distribution we suggest you do this.

Click Submit

S3Bubble will set everything up for you and supply you with with the details you need to stream.

Use the RTMP url with OBS software add it within the settings menu take of the last value after the forward slash and use as you stream key.

As long a your Media Live channel is running you can click start stream. You can then take the S3Bubble player code and insert this html into any post page or section within your website.

The stream will begin at the start time you specified and finish at the end time you specified. Users will also be able to live rewind to the start of the stream.

Ending Stream

After the stream has ended you can delete your Channel as it is no longer needed. The stream will be saved as it is packaged with the Media Package service.

When you are ready you can create a AWS Harvest job by clicking on the Media Package channel action button and clicking create Harvest job.

You will need to specify an AWS S3 bucket and Cloudfront Distribution you would like to output your assets to. This will start a Harvest Job.

When your harvest job is complete it will supply you with a new player code that you can switch out with you current one and then delete your Media Package channel.

Full Video Tutorial