AWS MediaLive is a live video processing service. You’ll use it to ingest your video stream (your live feed or VOD playlist), transcode it if needed, insert markers, and output to downstream systems like AWS MediaPackage or CDN.
Input Type: HLS
- MediaLive can ingest inputs in several formats — RTMP, RTP, HLS, etc.
- Here, we are using HLS as an input.
- This means MediaLive will pull a live HLS stream (a master playlist URL) from your origin or source.
Step-by-Step to Create MediaLive Channel with HLS Input
Step 1: Prepare Your HLS Input URL
- You need a publicly accessible HLS URL (e.g., https://your-origin.com/live/stream.m3u8).
- The URL must be reachable by MediaLive’s service in the AWS region where your channel will run.
- Make sure the HLS stream is stable and has a consistent segment duration.
Step 2: Create an Input in MediaLive Console
- Go to AWS Console → MediaLive → Inputs → Create input
- Select Input type: HLS
- Give it a name (e.g., FastChannel-HLS-Input)
- Choose SINGLE_INPUT for the Input class since you selected a single-pipeline channel.
- Under Input sources:
- Enter your HLS URL
- Enter your HLS URL
- Click Create input.
Step 3: Create a Channel in MediaLive
- Go to MediaLive → Channels → Create channel
- Basic settings:
- Give your channel a name (FastChannel-MediaLive-Channel)
- Choose an IAM role for permissions to read inputs and write outputs.
- Choose SINGLE_PIPELINE in the channel class because it’s easier to configure and troubleshoot, as there is only one pipeline to manage.
- Give your channel a name (FastChannel-MediaLive-Channel)
Step 4: Configure Input Attachments
- Select the input you created in Step 2 (your HLS input).
- Click on the confirm button
Step 5: Set Output Groups and Outputs
- Define Output groups that define where MediaLive sends processed video.
- For FAST channels, the common output group is AWS Elemental MediaPackage, which packages and prepares the stream for delivery and playback.
- Select MediaPackage as the output group type.
- Select “Use HLS output” in the MediaPackage destination settings.
- Then, under the MediaPackage channel group name, select the MediaPackage channel group you created earlier (you can refer to the MediaPackage setup steps for how to create this channel).
Additional MediaPackage Output Settings Details
- In MediaPackage settings, give your output a name for easy identification.
- Go to the Output section of your MediaPackage channel and click on Settings to configure the video parameters.
- Configure video settings as follows:
- Width: 720
- Height: 1280
- Codec: H.264
- Width: 720
- Move to Aspect Ratio and set PAR (Pixel Aspect Ratio) Control to Specified.
- Reason: Setting PAR to Specified ensures that the pixel aspect ratio is explicitly controlled, preventing distortion during playback on different devices. This is important to maintain consistent image quality.
- Reason: Setting PAR to Specified ensures that the pixel aspect ratio is explicitly controlled, preventing distortion during playback on different devices. This is important to maintain consistent image quality.
- Set Aspect Ratio to 16:9.
- This is the standard widescreen format for most streaming content, ensuring compatibility with most players and devices.
- This is the standard widescreen format for most streaming content, ensuring compatibility with most players and devices.
- In the Rate Control section:
- Enter 1500000 for bitrate (1.5 Mbps).
- Reason: 1.5 Mbps is a good balance between video quality and bandwidth usage for HD streaming on FAST channels, optimizing viewer experience without excessive network load.
- Enter 1500000 for bitrate (1.5 Mbps).
- For Frame Rate, select Specified in framerate control.
- Set Numerator: 30
- Set Denominator: 1
- This means the frame rate is 30 fps, a common standard for smooth video playback.
- Set Numerator: 30
- Click on Audio settings and select AAC as the codec.
- AAC is widely supported and efficient for audio streaming.
- AAC is widely supported and efficient for audio streaming.
- Click on Create channel to finalize and launch your MediaLive channel configuration.
AWS Elemental MediaPackage Setup for FAST Channel — Detailed Steps
Overview of MediaPackage
- MediaPackage Live (v1) channels are the original method for creating a live packaging endpoint.
- You can create a channel directly.
- This channel provides endpoints (HLS, DASH) for your MediaLive output to send to.
Step-by-Step MediaPackage Channel Setup (Live v1)
Step 1: Create a MediaPackage Channel
- Go to AWS Console → MediaPackage → Channels.
- Click Create channel.
- Enter a name for your channel (e.g., FastChannel-MediaPackage-Channel).
- (Optional) Add description/tags.
- Click Create.
Step 2: Create an Endpoint for the Channel
- Select the channel you just created.
- Click Create endpoint.
- Enter a name for the endpoint (e.g., FastChannel-HLS-Endpoint).
- In the Packager settings, find the Additional configuration section.
- Select SCTE-35 Enhanced in the Ad marker field.
- Reason: This option ensures that SCTE-35 ad markers embedded in the stream are preserved and enhanced for server-side ad insertion (SSAI), which is essential for FAST channel monetization and dynamic ad insertion.
- Reason: This option ensures that SCTE-35 ad markers embedded in the stream are preserved and enhanced for server-side ad insertion (SSAI), which is essential for FAST channel monetization and dynamic ad insertion.
- Select Unrestricted in the Ads on delivery restrictions field.
- Reason: This setting allows ads to be delivered without regional or content-based restrictions, maximizing ad fill opportunities and revenue.
- Reason: This setting allows ads to be delivered without regional or content-based restrictions, maximizing ad fill opportunities and revenue.
- Click Create.
. Reminder for your MediaLive setup
- In the MediaLive output group, select MediaPackage as the output.
- Under the MediaPackage channel name, select this MediaPackage channel.
- Under “Use HLS output”, ensure it’s enabled.
AWS Elemental MediaTailor Setup for FAST Channel — Detailed Steps
1. Overview of MediaTailor
- MediaTailor personalizes and inserts ads into your live or on-demand video streams.
- It works seamlessly with MediaPackage and MediaLive SCTE-35 markers.
- For FAST channels, it enables dynamic ad insertion without disrupting the viewer experience.
- It also supports analytics and reporting on ad playback.
Step-by-Step MediaTailor Setup
Step 1: Create a MediaTailor Configuration
- Go to AWS Console → MediaTailor → Configurations → Create configuration.
- Enter a name for the configuration (e.g., FastChannel-MediaTailor-Config).
Step 2: Configure Source Location
- Add the MediaPackage channel endpoint URL, which you can find in the Manifest preview of the origin endpoint.
- Remove the index.m3u8 (or similar) from the end of the URL before pasting it.
- Reason: MediaTailor requires the base manifest URL without the playlist filename to correctly process and insert ads across the entire stream manifest. Including the playlist filename can cause errors or incomplete ad insertion.
Step 3: Configure Ad Decision Server (ADS)
- Provide the URL of your ad decision server or ad provider that MediaTailor will communicate with to get ads.
- This could be your ad server or a third-party SSAI partner.
Configure Logging and Metrics (Optional)
- Enable CloudWatch logging for monitoring and troubleshooting.
Finalize and Create
- Review your settings and click Create configuration.
Use MediaTailor Output URL
- MediaTailor provides an output URL that your player will use to stream the video with dynamically inserted ads.
- To get this URL, click on the created MediaTailor configuration; there, you will see the HLS Playback URL prefix — append index.m3u8 at the end of this prefix to form the full playable URL.
Starting MediaLive Channel, Inserting Ads, and Testing with MediaTailor HLS URL
Step 1: Start the MediaLive Channel
- Go to AWS Console → MediaLive → Channels.
- Select your configured channel.
- Click Start to begin the live streaming process.
- MediaLive will pull your HLS input, process it, and send output to MediaPackage.
Step 2: Insert Ads Using SCTE-35 Markers and Scheduled Actions in MediaLive
- In your MediaLive channel, where you start the channel, scroll down to find the Schedule tab.
- Click on Create to add a scheduled action.
- Enter an Action name (e.g., AdBreak1).
- For Start type, select Immediate (good for testing as it triggers the action right away).
- For Action type, select SCTE-35 Splice Insert.
- Click Create to save the scheduled action.
What happens next?
- MediaLive injects an SCTE-35 splice_insert message into the live stream immediately.
- This signals downstream services (MediaPackage, MediaTailor) to trigger an ad break at that point.
- MediaTailor uses this cue to insert ads dynamically into the playback stream.
Step 3: Use MediaTailor HLS URL for Testing
- Go to AWS Console → MediaTailor → Configurations.
- Click on your MediaTailor configuration.
- Copy the HLS Playback URL prefix and append index.m3u8 to form the full URL.
- Use this full URL to test your stream.
Step 4: Test the Stream with hls.js Player
- Search for hls.js demo player online and open the official demo page.
- Paste the MediaTailor full HLS URL (HLS Playback URL prefix + index.m3u8) into the player URL input.
- After loading, you should see the live streaming video along with ads inserted dynamically.
- You can also:
- First, paste the MediaTailor URL before inserting the ad marker from MediaLive.
- Make sure the MediaLive channel is running so the stream is live.
- First, paste the MediaTailor URL before inserting the ad marker from MediaLive.
- While watching the stream, you can then follow the scheduled action process in MediaLive to insert SCTE-35 splice insert markers (ad breaks).
- The ads should dynamically appear in the stream after the marker insertion.
You have now successfully set up an end-to-end FAST channel workflow using AWS MediaLive, MediaPackage, and MediaTailor. This configuration enables reliable live streaming with dynamic server-side ad insertion, providing a seamless viewing experience.
Read More: How to Use AI for Video Editing: The Complete Guide to Smart Video Tools