GoLive - this is a boilerplate to live stream using AWS MediaLive and MediaStore.
I use serverless framework to create the following AWS resources:
- MediaLive Channel
- MediaLive Input
- MediaLive InputSecurityGroup
- MediaStore Container
- IAM Role
- Make sure you have installed serverless framework cli
- Configure AWS credentials
- (Optional) Install AWS cli
- Clone this repo
- Deploy from bash:
serverless deploy
- Get input's destination url using aws cli
aws medialive list-inputs
or by logging in toaws.amazon.com
MediaLive -> Inputs -> Destination A - Open a live streaming software(I use OBS in this example)
- In OBS, add a
Video Capture Device
object from in theSources
window - Click on
Settings
and navigate toStream
section - Select
Service
asCustom
,Server
asrtmp://xxxxxxxx:yyyy/golive/
- Add the last part of the url (which it should be
now
if you haven't done any changes to the code) asStream Key
- Start the GoLive channel using aws cli:
aws medialive list-channels
to get channel's id. Thenaws medialive start-channel --channel-id xxxxxxx
. Or inaws.amazon.com
navigate to MediaLive -> Channels -> GoLive -> Start channel - After channel starts, go to OBS and click
Start Streaming
- Done. You should be live at
https://xxxxxx.data.mediastore.{your-region}.amazonaws.com/mystreams/stream.m3u8
. You can get the full link fromaws.amazon.com
navigate to MediaStore -> click on your item -> select them3u8
file -> select the object's name.