AWS Elemental Media Services: Complete Guide to Cloud Video Processing
이 글의 핵심
AWS Elemental Media Services provide professional-grade broadcast and streaming infrastructure in the cloud. This comprehensive guide covers MediaLive for live video encoding, MediaPackage for video packaging and origin services, MediaTailor for server-side ad insertion, plus MediaStore, MediaConnect, and MediaConvert for complete video workflows.
Introduction to AWS Elemental Media Services
AWS Elemental Media Services represent Amazon’s professional-grade video infrastructure, born from the acquisition of Elemental Technologies in 2015. These services power major broadcasters, sports leagues, streaming platforms, and media companies worldwide, handling millions of concurrent streams and live events at broadcast quality.
The AWS Elemental Portfolio
The Elemental suite provides end-to-end video processing in the cloud:
- AWS Elemental MediaLive — Real-time live video encoding and transcoding
- AWS Elemental MediaPackage — Just-in-time video packaging and origin services
- AWS Elemental MediaTailor — Server-side ad insertion and personalization
- AWS Elemental MediaStore — High-performance origin storage optimized for video
- AWS Elemental MediaConnect — Reliable live video transport over IP
- AWS Elemental MediaConvert — File-based video transcoding for VOD
Why AWS Elemental?
Traditional broadcast infrastructure requires:
- Expensive hardware encoders ($50K-$500K each)
- On-premise data center space with redundant power/cooling
- Specialized staff with broadcast engineering expertise
- Overprovisioning for peak capacity (Super Bowl, elections)
- Long hardware refresh cycles
AWS Elemental shifts this to:
- Pay-per-use cloud resources (no CapEx)
- Global scale-out capacity on demand
- Managed services with 99.9% SLA
- Integration with AWS ecosystem (S3, CloudFront, Lambda)
- Rapid feature updates and codec support
AWS Elemental MediaLive
Core Concepts
MediaLive is a broadcast-grade live video encoding service that processes live video streams in real-time. It takes input sources (RTMP, RTP, HLS, MediaConnect), encodes/transcodes them into adaptive bitrate (ABR) formats, and outputs to downstream services like MediaPackage, S3, or MediaStore.
Architecture Components
Input Types
MediaLive supports multiple input protocols:
RTMP Push — Most common for live encoders and cameras:
rtmp://a.b.c.d:1935/live/stream-key
Encoders push to MediaLive. Supports primary/backup redundancy.
RTP/RTSP — For professional broadcast equipment:
rtp://10.0.1.100:5000
Typically used with MediaConnect for managed transport.
HLS Pull — Ingest from existing HLS sources:
https://example.com/live/stream.m3u8
MediaLive pulls and re-encodes.
MediaConnect — Secure, reliable live transport:
medialive://arn:aws:mediaconnect:us-west-2:123456789012:flow:...
Preferred for professional workflows requiring FEC, ARQ, and redundancy.
MP4/TS File — VOD files treated as live inputs:
s3://my-bucket/input.mp4
Useful for testing or 24/7 looping content.
Input Security Groups
Control access to RTMP/RTP inputs via CIDR whitelists:
{
"InputSecurityGroupId": "isg-1234567890abcdef0",
"WhitelistRules": [
{"Cidr": "203.0.113.0/24"},
{"Cidr": "198.51.100.42/32"}
]
}
Only these IPs can push to your input. Critical for preventing unauthorized streams.
Channels
A channel is the core encoding pipeline:
Input → Input Attachment → Channel → Output Groups → Outputs → Destinations
Channel Classes:
- STANDARD — Dual-pipeline redundancy, automatic failover, 99.9% SLA
- SINGLE_PIPELINE — Single encoding pipeline, lower cost (~50% cheaper)
Standard class runs two identical pipelines in different AZs. If pipeline 0 fails, pipeline 1 seamlessly takes over with no viewer disruption.
Output Groups
Organize outputs by destination type:
HLS Output Group — Generates HLS manifests and segments:
{
"OutputGroupSettings": {
"HlsGroupSettings": {
"Destination": "s3://my-bucket/live/",
"ManifestDurationFormat": "FLOATING_POINT",
"SegmentLength": 6,
"ProgramDateTimePeriod": 600
}
}
}
MediaPackage Output Group — Sends to MediaPackage channel:
{
"OutputGroupSettings": {
"MediaPackageGroupSettings": {
"Destination": "arn:aws:mediapackage:us-west-2:123456789012:channels/my-channel"
}
}
}
Archive Output Group — Records full-resolution archive to S3:
{
"OutputGroupSettings": {
"ArchiveGroupSettings": {
"Destination": "s3://my-archive-bucket/",
"RolloverInterval": 3600
}
}
}
Frame Capture Output Group — Extract thumbnail images:
{
"OutputGroupSettings": {
"FrameCaptureGroupSettings": {
"Destination": "s3://my-thumbnails/",
"FrameCaptureInterval": 30
}
}
}
Outputs and Encoding Profiles
Each output group contains multiple outputs (bitrate ladder):
{
"Outputs": [
{
"OutputName": "1080p",
"VideoDescriptionName": "video_1080p30",
"AudioDescriptionNames": ["audio_aac_128k"],
"OutputSettings": {
"HlsOutputSettings": {
"NameModifier": "_1080p",
"HlsSettings": {"StandardHlsSettings": {"M3u8Settings": {...}}}
}
}
},
{
"OutputName": "720p",
"VideoDescriptionName": "video_720p30",
"AudioDescriptionNames": ["audio_aac_128k"],
"OutputSettings": {
"HlsOutputSettings": {
"NameModifier": "_720p",
"HlsSettings": {"StandardHlsSettings": {"M3u8Settings": {...}}}
}
}
},
{
"OutputName": "480p",
"VideoDescriptionName": "video_480p30",
"AudioDescriptionNames": ["audio_aac_96k"],
"OutputSettings": {
"HlsOutputSettings": {
"NameModifier": "_480p",
"HlsSettings": {"StandardHlsSettings": {"M3u8Settings": {...}}}
}
}
}
]
}
Video Encode Settings
H.264/AVC — Most widely supported:
{
"VideoDescriptions": [
{
"Name": "video_1080p30",
"CodecSettings": {
"H264Settings": {
"Profile": "HIGH",
"Level": "H264_LEVEL_4_1",
"RateControlMode": "CBR",
"Bitrate": 5000000,
"FramerateControl": "SPECIFIED",
"FramerateNumerator": 30,
"FramerateDenominator": 1,
"GopSize": 2.0,
"GopSizeUnits": "SECONDS",
"SceneChangeDetect": "ENABLED",
"LookAheadRateControl": "MEDIUM",
"AdaptiveQuantization": "HIGH"
}
},
"Width": 1920,
"Height": 1080,
"ScalingBehavior": "DEFAULT"
}
]
}
H.265/HEVC — 40-50% better compression, growing adoption:
{
"CodecSettings": {
"H265Settings": {
"Profile": "MAIN",
"Tier": "MAIN",
"Level": "H265_LEVEL_4_1",
"RateControlMode": "CBR",
"Bitrate": 3000000,
"FramerateNumerator": 30,
"FramerateDenominator": 1,
"GopSize": 2.0,
"LookAheadRateControl": "MEDIUM",
"AdaptiveQuantization": "HIGH"
}
}
}
Rate Control Modes:
- CBR (Constant Bitrate) — Predictable bandwidth, preferred for live streaming
- VBR (Variable Bitrate) — Better quality, less predictable, suited for VOD
- QVBR (Quality-defined VBR) — Optimizes for perceptual quality at target bitrate
GOP (Group of Pictures) Structure:
{
"GopSize": 2.0,
"GopSizeUnits": "SECONDS",
"GopClosedCadence": 1,
"GopBReference": "ENABLED"
}
- GopSize — Keyframe interval (2s = keyframe every 2 seconds)
- Closed GOP — Every GOP starts with IDR frame (better seeking, ad insertion)
- B-frames — Bidirectional prediction frames (better compression, slight latency)
Audio Encode Settings
AAC — Standard audio codec:
{
"AudioDescriptions": [
{
"Name": "audio_aac_128k",
"CodecSettings": {
"AacSettings": {
"Bitrate": 128000,
"CodingMode": "CODING_MODE_2_0",
"SampleRate": 48000,
"RawFormat": "NONE",
"Profile": "LC"
}
},
"AudioSelectorName": "default"
}
]
}
AC-3/EAC-3 (Dolby Digital) — Surround sound:
{
"CodecSettings": {
"Eac3Settings": {
"Bitrate": 384000,
"CodingMode": "CODING_MODE_3_2",
"LfeControl": "LFE",
"DcFilter": "ENABLED",
"SurroundMode": "ENABLED"
}
}
}
Advanced Features
Automatic Input Failover
For STANDARD channels with dual inputs:
{
"InputAttachments": [
{
"InputId": "input-primary-1234567890abc",
"InputSettings": {
"SourceEndBehavior": "CONTINUE",
"InputFilter": "AUTO"
},
"AutomaticInputFailoverSettings": {
"SecondaryInputId": "input-backup-9876543210xyz",
"ErrorClearTimeMsec": 60000,
"FailoverConditions": [
{"FailoverConditionSettings": {"InputLossSettings": {"InputLossThresholdMsec": 3000}}}
]
}
}
]
}
If primary input drops for 3 seconds, MediaLive switches to backup. If primary recovers and stays stable for 60 seconds, failback occurs.
SCTE-35 Ad Marker Handling
Insert ad break markers into streams:
{
"AvailBlanking": {
"State": "ENABLED",
"AvailBlankingImage": "s3://my-bucket/slate.png"
},
"Scte35Control": "PASSTHROUGH"
}
Modes:
- PASSTHROUGH — Pass SCTE-35 markers unchanged (for MediaTailor)
- NONE — Remove markers
- SPLICE_INSERT — Generate splice_insert markers
Audio Normalization
Maintain consistent loudness:
{
"AudioNormalizationSettings": {
"Algorithm": "ITU_1770_2",
"TargetLkfs": -23.0
}
}
ITU-R BS.1770 is the international loudness standard. Target -23 LKFS for broadcast, -14 LUFS for streaming platforms.
Video Preprocessing
Deinterlacing:
{
"DeinterlaceMode": "ADAPTIVE",
"DeinterlaceAlgorithm": "INTERPOLATE"
}
Noise Reduction:
{
"FilterSettings": {
"TemporalFilterSettings": {
"PostFilterSharpening": "AUTO",
"Strength": "STRENGTH_8"
}
}
}
Embedded Captions/Subtitles
Extract and pass through captions:
{
"CaptionDescriptions": [
{
"CaptionSelectorName": "caption-selector-1",
"Name": "caption_608",
"DestinationSettings": {
"EmbeddedDestinationSettings": {}
}
}
]
}
WebVTT Sidecar:
{
"DestinationSettings": {
"WebvttDestinationSettings": {}
}
}
Generates .vtt files alongside video segments.
Scheduling and Automation
Schedule Actions
Control channel behavior over time:
Start/Stop Input:
aws medialive create-schedule-action \
--channel-id 1234567 \
--action-name "start-feed-0800" \
--schedule-action-start-settings FixedModeScheduleActionStartSettings={Time="2026-05-14T08:00:00Z"} \
--schedule-action-settings InputSwitchSettings={InputAttachmentNameReference="main-feed"}
Insert Static Image (Slate):
aws medialive create-schedule-action \
--channel-id 1234567 \
--action-name "show-slate" \
--schedule-action-start-settings FixedModeScheduleActionStartSettings={Time="2026-05-14T12:00:00Z"} \
--schedule-action-settings StaticImageActivateSettings={Image={Uri="s3://my-bucket/slate.png"}}
SCTE-35 Splice Insert:
aws medialive create-schedule-action \
--channel-id 1234567 \
--action-name "ad-break-1" \
--schedule-action-start-settings FixedModeScheduleActionStartSettings={Time="2026-05-14T15:30:00Z"} \
--schedule-action-settings Scte35SpliceInsertSettings={Duration=90000}
Duration in 90kHz ticks (90000 = 1 second).
EventBridge Integration
Trigger Lambda functions on channel state changes:
{
"source": ["aws.medialive"],
"detail-type": ["MediaLive Channel State Change"],
"detail": {
"channel_arn": ["arn:aws:medialive:us-west-2:123456789012:channel:1234567"],
"state": ["RUNNING", "IDLE", "STARTING", "STOPPING"]
}
}
Monitoring and Troubleshooting
CloudWatch Metrics
Key metrics to monitor:
Input Video:
InputVideoFrameRate— Source frame rateInputTimecodesPresent— Whether timecodes exist in input
Pipeline Health:
Pipeline0Active/Pipeline1Active— Pipeline statusActiveAlerts— Count of active alerts
Output Health:
OutputVideoFrameRate— Encoded output frame rateNetworkIn/NetworkOut— Network throughputSvq(Statistical Video Quality) — Video quality score (0-100)
Dropped Frames:
DroppedFrames— Frames dropped due to overloadFillerMsec— Time filled with black frames (input loss)
Alerting
Configure CloudWatch alarms:
aws cloudwatch put-metric-alarm \
--alarm-name medialive-pipeline-failure \
--comparison-operator LessThanThreshold \
--evaluation-periods 1 \
--metric-name Pipeline0Active \
--namespace AWS/MediaLive \
--period 60 \
--statistic Average \
--threshold 1 \
--dimensions Name=ChannelId,Value=1234567 \
--alarm-actions arn:aws:sns:us-west-2:123456789012:ops-alerts
Logs
MediaLive pushes logs to CloudWatch Logs:
/aws/medialive/{channel-id}
Log events include:
- Input connection status
- Encoding errors
- Failover events
- Schedule action execution
AWS Elemental MediaPackage
Overview
MediaPackage is a just-in-time video packaging service that acts as a highly scalable origin for adaptive streaming. It ingests encoded content from MediaLive, dynamically packages it into streaming formats (HLS, DASH, CMAF), and serves manifests and segments to CDNs.
Core Concepts
Channels
A channel is the ingest point:
aws mediapackage create-channel \
--id my-live-channel \
--description "Live sports channel"
Response includes two redundant ingest endpoints:
{
"Id": "my-live-channel",
"HlsIngest": {
"IngestEndpoints": [
{
"Id": "endpoint1",
"Url": "https://abcdef.mediapackage.us-west-2.amazonaws.com/in/v2/my-live-channel/channel",
"Username": "user-e8d9f7c6",
"Password": "pass-a1b2c3d4"
},
{
"Id": "endpoint2",
"Url": "https://ghijkl.mediapackage.us-west-2.amazonaws.com/in/v2/my-live-channel/channel",
"Username": "user-5f4e3d2c",
"Password": "pass-9z8y7x6w"
}
]
}
}
MediaLive sends HLS segments to both endpoints for redundancy.
Origin Endpoints
Origin endpoints define how content is packaged and delivered:
HLS Endpoint:
aws mediapackage create-origin-endpoint \
--channel-id my-live-channel \
--id hls-endpoint \
--manifest-name index \
--hls-package '{
"SegmentDurationSeconds": 6,
"PlaylistWindowSeconds": 60,
"ProgramDateTimeIntervalSeconds": 60,
"AdMarkers": "PASSTHROUGH",
"IncludeIframeOnlyStream": true
}'
Generates HLS output at:
https://abcdef.mediapackage.us-west-2.amazonaws.com/out/v1/xyz123/index.m3u8
DASH Endpoint:
aws mediapackage create-origin-endpoint \
--channel-id my-live-channel \
--id dash-endpoint \
--manifest-name manifest \
--dash-package '{
"SegmentDurationSeconds": 6,
"ManifestWindowSeconds": 60,
"Profile": "NONE",
"AdMarkers": "PASSTHROUGH"
}'
Generates DASH output at:
https://abcdef.mediapackage.us-west-2.amazonaws.com/out/v1/abc456/manifest.mpd
CMAF Endpoint:
aws mediapackage create-origin-endpoint \
--channel-id my-live-channel \
--id cmaf-endpoint \
--cmaf-package '{
"SegmentDurationSeconds": 6,
"HlsManifests": [
{"Id": "hls", "ManifestName": "index"}
],
"DashManifests": [
{"Id": "dash", "ManifestName": "manifest"}
]
}'
CMAF (Common Media Application Format) creates unified segments usable by both HLS and DASH.
Advanced Features
Time-Shifted Viewing (Catch-Up TV)
Startover Windows:
{
"StartoverWindowSeconds": 3600
}
Allows viewers to restart the live stream from up to 1 hour ago.
Time Delay:
{
"TimeDelaySeconds": 30
}
Delays the live edge by 30 seconds (useful for moderation, spoiler prevention).
DVR (Network PVR)
Configure manifest window for DVR:
{
"PlaylistWindowSeconds": 86400
}
24-hour DVR window. Viewers can seek back up to 24 hours in the live stream.
Content Protection (DRM)
Encryption:
{
"Encryption": {
"SpekeKeyProvider": {
"SystemIds": [
"9a04f079-9840-4286-ab92-e65be0885f95",
"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"
],
"Url": "https://drm-provider.example.com/speke/v2",
"ResourceId": "my-live-channel"
}
}
}
System IDs:
9a04f079-9840-4286-ab92-e65be0885f95— PlayReadyedef8ba9-79d6-4ace-a3c8-27dcd51d21ed— Widevine94ce86fb-07ff-4f43-adb8-93d2fa968ca2— FairPlay
MediaPackage integrates with SPEKE (Secure Packager and Encoder Key Exchange) providers like AWS Elemental MediaConvert SPEKE Proxy, BuyDRM KeyOS, Irdeto, EZDRM.
AES-128 (Simple Encryption):
{
"Encryption": {
"EncryptionMethod": "AES_128",
"KeyRotationIntervalSeconds": 600,
"ConstantInitializationVector": "0x12345678901234567890123456789012"
}
}
Not DRM, but encrypts segments. Keys distributed via manifests.
Manifest Filtering
Stream Selection:
{
"StreamSelection": {
"MinVideoBitsPerSecond": 500000,
"MaxVideoBitsPerSecond": 5000000,
"StreamOrder": "ORIGINAL"
}
}
Filters bitrate ladder. Useful for device-specific endpoints (e.g., mobile-only endpoint excludes 4K).
Ad Marker Signaling
SCTE-35 Enhanced:
{
"AdMarkers": "SCTE35_ENHANCED"
}
Inserts #EXT-X-DATERANGE tags with SCTE-35 data in HLS manifests.
PASSTHROUGH:
{
"AdMarkers": "PASSTHROUGH"
}
Passes SCTE-35 markers unchanged.
Harvest Jobs
Export time ranges to VOD assets:
aws mediapackage create-harvest-job \
--origin-endpoint-id hls-endpoint \
--s3-destination BucketName=my-vod-bucket,ManifestKey=highlights/game1/index.m3u8,RoleArn=arn:aws:iam::123456789012:role/MediaPackageHarvest \
--start-time 2026-05-14T19:00:00Z \
--end-time 2026-05-14T21:00:00Z
Extracts 2 hours of live stream to S3 as VOD HLS. Useful for highlights, replays, or archiving.
VOD Assets
MediaPackage can also package VOD content:
aws mediapackage-vod create-asset \
--id my-vod-asset \
--source-arn arn:aws:s3:::my-bucket/videos/movie.mp4 \
--source-role-arn arn:aws:iam::123456789012:role/MediaPackageVOD \
--packaging-group-id my-packaging-group
Packaging Configurations:
aws mediapackage-vod create-packaging-configuration \
--id hls-vod-config \
--packaging-group-id my-packaging-group \
--hls-package '{
"SegmentDurationSeconds": 6,
"IncludeIframeOnlyStream": true
}'
Generates HLS VOD manifest from source file.
Monitoring
CloudWatch Metrics
Ingress:
IngressBytes— Data received from MediaLiveIngressResponseTime— Latency of ingest requests
Egress:
EgressBytes— Data served to CDN/viewersEgressResponseTime— Origin response latencyEgressRequestCount— Manifest and segment requests4xxErrorCount/5xxErrorCount— Error rates
DRM:
KeyProviderResponseTime— SPEKE key provider latency
Alarms
aws cloudwatch put-metric-alarm \
--alarm-name mediapackage-ingress-failure \
--comparison-operator GreaterThanThreshold \
--evaluation-periods 2 \
--metric-name 4xxErrorCount \
--namespace AWS/MediaPackage \
--period 60 \
--statistic Sum \
--threshold 10 \
--dimensions Name=Channel,Value=my-live-channel
AWS Elemental MediaTailor
Overview
MediaTailor is a server-side ad insertion (SSAI) and content personalization service. It stitches ads into video streams on the server side, creating a seamless viewing experience where ads are indistinguishable from content to the player (and ad blockers).
Why Server-Side Ad Insertion?
Client-Side Ad Insertion (CSAI):
Player requests manifest → Manifest contains ad markers → Player calls ad server → Ad server returns ad URL → Player requests ad manifest → Player switches streams
Problems:
- Ad blockers easily detect and block ad URLs
- Stream switching causes buffering
- Different DRM/packaging for ads vs. content
- Complex player logic
Server-Side Ad Insertion (SSAI):
Player requests manifest → MediaTailor intercepts → MediaTailor calls ad server → MediaTailor stitches ad segments into manifest → Player requests segments → Player doesn't know ads exist
Benefits:
- Ads served from same origin (harder to block)
- Seamless playback (no buffering)
- Unified DRM/packaging
- Simpler player
- Better ad viewability and completion rates
Core Concepts
Configurations
A configuration defines the integration:
aws mediatailor put-playback-configuration \
--name my-live-channel \
--video-content-source-url https://abcdef.mediapackage.us-west-2.amazonaws.com/out/v1/xyz123/index.m3u8 \
--ad-decision-server-url https://ad-server.example.com/vast?user=[session.user_id]&device=[player_params.device] \
--cdn-configuration '{
"AdSegmentUrlPrefix": "https://cdn.example.com/ads/",
"ContentSegmentUrlPrefix": "https://cdn.example.com/content/"
}' \
--slate-ad-url https://cdn.example.com/slate.mp4
MediaTailor Playback URL:
https://abcdef.mediatailor.us-west-2.amazonaws.com/v1/master/xyz123/my-live-channel/index.m3u8
Viewers request this URL instead of direct MediaPackage URL.
Session Initialization
When a viewer requests the manifest, MediaTailor:
- Calls the Ad Decision Server (ADS) with query parameters
- Receives VAST/VMAP response with ad creatives
- Caches ad metadata
- Rewrites manifest to include ad segments
- Returns personalized manifest to player
Ad Decision Server URL:
https://ad-server.example.com/vast?user=[session.user_id]&ip=[session.client_ip]&ua=[player_params.user_agent]&geo=[session.geo_country]
MediaTailor replaces variables with actual session data.
VAST/VMAP Integration
VAST (Video Ad Serving Template):
<VAST version="4.2">
<Ad id="ad1">
<InLine>
<AdTitle>Amazing Product</AdTitle>
<Duration>00:00:30</Duration>
<MediaFiles>
<MediaFile delivery="progressive" type="video/mp4" width="1920" height="1080">
https://ad-cdn.example.com/ad123.mp4
</MediaFile>
</MediaFiles>
<TrackingEvents>
<Tracking event="start">https://ad-server.example.com/track/start?ad=ad1</Tracking>
<Tracking event="firstQuartile">https://ad-server.example.com/track/q1?ad=ad1</Tracking>
<Tracking event="midpoint">https://ad-server.example.com/track/mid?ad=ad1</Tracking>
<Tracking event="complete">https://ad-server.example.com/track/complete?ad=ad1</Tracking>
</TrackingEvents>
</InLine>
</Ad>
</VAST>
VMAP (Video Multiple Ad Playlist):
<vmap:VMAP version="1.0">
<vmap:AdBreak timeOffset="start" breakType="linear" breakId="preroll">
<vmap:AdSource id="preroll-ad">
<vmap:VASTAdData>
<VAST>...</VAST>
</vmap:VASTAdData>
</vmap:AdSource>
</vmap:AdBreak>
<vmap:AdBreak timeOffset="00:05:00" breakType="linear" breakId="midroll-1">
<vmap:AdSource id="midroll-ad-1">
<vmap:VASTAdData>
<VAST>...</VAST>
</vmap:VASTAdData>
</vmap:AdSource>
</vmap:AdBreak>
</vmap:VMAP>
VMAP defines multiple ad breaks in VOD content.
Manifest Manipulation
HLS Manifest Personalization
Original MediaPackage Manifest:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:1000
#EXTINF:6.0,
segment1000.ts
#EXTINF:6.0,
segment1001.ts
#EXT-X-DATERANGE:ID="splice-1",START-DATE="2026-05-14T20:00:00.000Z",DURATION=90,SCTE35-OUT=0xFC302F00
#EXTINF:6.0,
segment1002.ts
MediaTailor Personalized Manifest:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:1000
#EXTINF:6.0,
https://cdn.example.com/content/segment1000.ts?aws.sessionId=xyz
#EXTINF:6.0,
https://cdn.example.com/content/segment1001.ts?aws.sessionId=xyz
#EXT-X-DISCONTINUITY
#EXTINF:6.0,
https://cdn.example.com/ads/ad-seg1.ts?aws.sessionId=xyz
#EXTINF:6.0,
https://cdn.example.com/ads/ad-seg2.ts?aws.sessionId=xyz
#EXTINF:6.0,
https://cdn.example.com/ads/ad-seg3.ts?aws.sessionId=xyz
#EXT-X-DISCONTINUITY
#EXTINF:6.0,
https://cdn.example.com/content/segment1002.ts?aws.sessionId=xyz
MediaTailor:
- Detected SCTE-35 marker (90-second ad break)
- Called ad server, received 3x 6-second ad segments
- Inserted
#EXT-X-DISCONTINUITYtags to signal encoding changes - Prefixed segments with CDN URLs
- Added session ID for tracking
Ad Transcoding
If ad creatives don’t match content encoding:
Ad Transcode Profile:
{
"AdTranscoding": {
"HlsAdTranscoding": {
"MaxDurationInSeconds": 60,
"SegmentDurationSeconds": 6
}
}
}
MediaTailor transcodes ads on-the-fly to match content bitrates and formats. Transcoded ads are cached for reuse.
Tracking and Beacons
Server-Side Beacon Firing
MediaTailor fires tracking beacons on behalf of the player:
Beacon Proxying:
{
"AvailSuppression": {
"Mode": "OFF"
},
"Bumper": {
"StartUrl": "https://cdn.example.com/bumper-start.mp4",
"EndUrl": "https://cdn.example.com/bumper-end.mp4"
}
}
When a viewer watches an ad segment, MediaTailor:
- Detects segment request in CDN logs (if integrated)
- Fires VAST tracking URLs (
start,firstQuartile,midpoint,complete) - Sends impression beacons to ad networks
Client-Side Reporting API:
For better accuracy, players can report:
POST https://abcdef.mediatailor.us-west-2.amazonaws.com/v1/tracking/xyz123/event
{
"sessionId": "xyz-session-123",
"event": "impression",
"adBreakId": "midroll-1",
"adId": "ad123"
}
Personalization
Dynamic Configuration Variables
Player Parameters:
https://abcdef.mediatailor.us-west-2.amazonaws.com/v1/master/xyz123/my-live-channel/index.m3u8?user_id=12345&device=mobile&subscription=premium
Passed to ad server:
https://ad-server.example.com/vast?user=12345&device=mobile&sub=premium
Ad server returns targeted ads based on user profile.
Avail Suppression
Suppress ads for premium subscribers:
{
"AvailSuppression": {
"Mode": "BEHIND_LIVE_EDGE",
"Value": "00:00:05"
}
}
Suppresses ad breaks within 5 seconds of live edge (reduces latency).
VOD Ad Insertion
VOD Configuration:
aws mediatailor put-playback-configuration \
--name my-vod-asset \
--video-content-source-url https://cdn.example.com/vod/movie.m3u8 \
--ad-decision-server-url https://ad-server.example.com/vmap \
--personalization-threshold-seconds 1
MediaTailor:
- Calls ad server once per VOD session
- Receives VMAP with ad break timings
- Inserts ads at specified offsets
- Caches VOD manifests per session (1-second personalization window = aggressive caching)
Channel Assembly
Linear Channel Assembly:
Create 24/7 linear channels from VOD content with ad insertion:
aws mediatailor create-channel \
--channel-name my-linear-channel \
--outputs '[{"ManifestName": "index", "SourceGroup": "default"}]' \
--playback-mode LOOP
Source Locations:
aws mediatailor create-source-location \
--source-location-name my-vod-library \
--http-configuration-base-url https://cdn.example.com/vod/
Programs:
aws mediatailor create-program \
--channel-name my-linear-channel \
--program-name program-1 \
--source-location-name my-vod-library \
--vod-source-name movie1 \
--schedule-configuration StartTime=2026-05-14T00:00:00Z,DurationSeconds=7200
Creates a scheduled linear channel that plays VOD assets in a loop with ad breaks.
Monitoring
CloudWatch Metrics
Ad Delivery:
AdDecisionServer.Errors— ADS failuresAdDecisionServer.Duration— ADS response timeAvail.Duration— Total ad break durationAvail.FillRate— Percentage of ad slots filled
Playback:
GetManifest.Requests— Manifest requestsGetManifest.Errors— Manifest errorsOrigin.Errors— Content origin failures
Tracking:
Beacon.Requests— Tracking beacon firesBeacon.Errors— Failed beacons
AWS Elemental MediaStore
Overview
MediaStore is a high-performance, low-latency object storage service optimized for media workloads. It acts as an origin for live and VOD video, providing consistent sub-10ms PUT latency and horizontal scalability.
When to Use MediaStore vs S3
Use MediaStore for:
- Live streaming origin (low write latency)
- Chunked transfer encoding (HLS segment upload while encoding)
- High-frequency small object writes
- Consistent low-latency reads (origin for CDN)
Use S3 for:
- VOD archives (large files, infrequent access)
- Cost-optimized storage (S3 is cheaper)
- Integration with broader AWS services (Lambda, Athena)
- Long-term retention
Container Configuration
aws mediastore create-container \
--container-name live-origin
CORS Policy:
aws mediastore put-cors-policy \
--container-name live-origin \
--cors-policy '[
{
"AllowedOrigins": ["*"],
"AllowedMethods": ["GET", "HEAD"],
"AllowedHeaders": ["*"],
"MaxAgeSeconds": 3000
}
]'
Container Policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": ["mediastore:GetObject"],
"Resource": "arn:aws:mediastore:us-west-2:123456789012:container/live-origin/*",
"Condition": {
"StringEquals": {
"aws:UserAgent": "Amazon CloudFront"
}
}
}
]
}
Restricts access to CloudFront only.
MediaLive Integration
MediaLive HLS Output to MediaStore:
{
"OutputGroupSettings": {
"HlsGroupSettings": {
"Destination": "mediastoressl://abcdef.data.mediastore.us-west-2.amazonaws.com/live/stream"
}
}
}
MediaLive uses mediastoressl:// protocol for authenticated, low-latency writes.
Chunked Transfer Encoding
MediaStore supports HTTP chunked transfer:
PUT /live/stream/segment1000.ts HTTP/1.1
Host: abcdef.data.mediastore.us-west-2.amazonaws.com
Transfer-Encoding: chunked
6\r\n
chunk1\r\n
8\r\n
chunk2ab\r\n
0\r\n
\r\n
Encoders can start uploading segment before encoding completes, reducing glass-to-glass latency.
Monitoring
CloudWatch Metrics
PutRequests— Write operationsGetRequests— Read operationsDeleteRequests— Delete operationsListRequests— List operations4xxErrorCount/5xxErrorCount— Error ratesTotalRequestLatency— Request latency
AWS Elemental MediaConnect
Overview
MediaConnect is a reliable, secure live video transport service for contribution and distribution. It replaces satellite and fiber links with IP-based transport over AWS global network.
Use Cases
Contribution:
- Remote production (send live feeds from venues to broadcast center)
- Multi-camera feeds to cloud editing
- Disaster recovery (backup contribution path)
Distribution:
- Content distribution to regional data centers
- Affiliate distribution (send feeds to partner stations)
- MediaLive input redundancy
Core Concepts
Flows
A flow is a live video transport connection:
aws mediaconnect create-flow \
--name remote-camera-feed \
--source Name=Camera-1,Protocol=zixi-push,WhitelistCidr=203.0.113.0/24 \
--vpc-interfaces Name=vpc-interface-1,NetworkInterfaceType=efa,SubnetId=subnet-12345
Protocols:
- Zixi — UDP-based with FEC, ARQ, bonding (professional broadcast)
- RIST — Reliable Internet Stream Transport (open standard)
- RTP/RTP-FEC — Real-time Protocol with Forward Error Correction
- SRT — Secure Reliable Transport (open-source, growing adoption)
- CDI — Cloud Digital Interface (uncompressed, ultra-low latency)
Sources
Push Source (Camera pushes to MediaConnect):
aws mediaconnect update-flow-source \
--flow-arn arn:aws:mediaconnect:us-west-2:123456789012:flow:abc123 \
--source-arn arn:aws:mediaconnect:us-west-2:123456789012:source:src-xyz \
--ingest-port 5000 \
--whitelist-cidr 203.0.113.42/32
Ingest URL:
zixi-push://abcdef.mediaconnect.us-west-2.amazonaws.com:5000
Pull Source (MediaConnect pulls from encoder):
aws mediaconnect create-flow \
--source Name=Encoder,Protocol=rtp,IngestIp=203.0.113.42,IngestPort=5000
Outputs
MediaLive Output:
aws mediaconnect add-flow-outputs \
--flow-arn arn:aws:mediaconnect:us-west-2:123456789012:flow:abc123 \
--outputs Protocol=rtp,Destination=10.0.1.100,Port=5000,Name=To-MediaLive
MediaLive input references MediaConnect flow:
{
"InputSettings": {
"SourceEndBehavior": "CONTINUE",
"MediaConnectFlows": [
{"FlowArn": "arn:aws:mediaconnect:us-west-2:123456789012:flow:abc123"}
]
}
}
Entitlements (Distribution to Partners):
aws mediaconnect grant-flow-entitlements \
--flow-arn arn:aws:mediaconnect:us-west-2:123456789012:flow:abc123 \
--entitlements Name=Partner-A,Subscribers=123456789012,Encryption={"Algorithm":"aes128","RoleArn":"arn:aws:iam::123456789012:role/MediaConnect"}
Partner creates output in their account using entitlement.
Redundancy
Dual-Source Redundancy:
aws mediaconnect update-flow \
--flow-arn arn:aws:mediaconnect:us-west-2:123456789012:flow:abc123 \
--source-failover-config State=ENABLED,FailoverMode=MERGE,SourcePriority={"PrimarySource":"source-1"}
Failover Modes:
- MERGE — Combine packets from both sources (hitless failover)
- FAILOVER — Switch to secondary on primary loss
Monitoring
CloudWatch Metrics
SourceBitRate— Inbound bitrateSourcePacketLossPercent— Packet loss on sourceARQRecoveredPackets— Packets recovered via ARQFECRecoveredPackets— Packets recovered via FECOutputConnected— Output connection status
AWS Elemental MediaConvert
Overview
MediaConvert is a file-based video transcoding service for VOD content. It converts source files (MP4, MOV, MXF, etc.) into adaptive bitrate formats with professional broadcast features.
Job Submission
aws mediaconvert create-job \
--role arn:aws:iam::123456789012:role/MediaConvertRole \
--settings file://job-settings.json
job-settings.json:
{
"Inputs": [
{
"FileInput": "s3://my-source-bucket/input-video.mp4",
"TimecodeSource": "ZEROBASED",
"VideoSelector": {},
"AudioSelectors": {
"Audio Selector 1": {"DefaultSelection": "DEFAULT"}
}
}
],
"OutputGroups": [
{
"Name": "HLS ABR",
"OutputGroupSettings": {
"Type": "HLS_GROUP_SETTINGS",
"HlsGroupSettings": {
"Destination": "s3://my-output-bucket/hls/",
"SegmentLength": 6,
"MinSegmentLength": 0,
"ManifestDurationFormat": "FLOATING_POINT",
"SegmentControl": "SEGMENTED_FILES"
}
},
"Outputs": [
{
"NameModifier": "_1080p",
"VideoDescription": {
"CodecSettings": {
"Codec": "H_264",
"H264Settings": {
"RateControlMode": "QVBR",
"QvbrSettings": {"QvbrQualityLevel": 8},
"Bitrate": 5000000
}
},
"Width": 1920,
"Height": 1080
},
"AudioDescriptions": [
{
"CodecSettings": {
"Codec": "AAC",
"AacSettings": {"Bitrate": 128000, "SampleRate": 48000}
}
}
]
}
]
}
]
}
Advanced Features
Automated ABR
QVBR (Quality-defined VBR):
Optimizes quality at target bitrate using machine learning.
HDR Support
HDR10:
{
"VideoDescription": {
"ColorMetadata": "INSERT",
"ColorSpace": "HDR10",
"Hdr10Metadata": {
"RedPrimaryX": 34000,
"RedPrimaryY": 16000,
"GreenPrimaryX": 13250,
"GreenPrimaryY": 34500,
"BluePrimaryX": 7500,
"BluePrimaryY": 3000,
"WhitePointX": 15635,
"WhitePointY": 16450,
"MaxFrameAverageLightLevel": 1000,
"MaxContentLightLevel": 4000
}
}
}
Dolby Vision:
Requires Dolby Vision profile metadata from source.
Audio Processing
Dolby Atmos Pass-Through:
{
"AudioDescriptions": [
{
"CodecSettings": {
"Codec": "PASSTHROUGH"
}
}
]
}
Automated Content Moderation
AWS Rekognition Video:
{
"VideoDescription": {
"AfdSignaling": "AUTO",
"RespondToAfd": "PASSTHROUGH"
}
}
Detect and flag inappropriate content.
Architecture Patterns
Live Streaming Architecture
Standard Live Workflow:
Encoder (RTMP) → MediaLive (Transcode) → MediaPackage (Origin) → CloudFront (CDN) → Viewers
With Ad Insertion:
Encoder → MediaLive (w/ SCTE-35) → MediaPackage → MediaTailor (SSAI) → CloudFront → Viewers
Redundant Contribution:
Encoder (Primary) ─┐
├─→ MediaConnect (Merge) → MediaLive → MediaPackage → CloudFront
Encoder (Backup) ─┘
VOD Workflow
Source File (S3) → MediaConvert (Transcode) → S3 (ABR Assets) → CloudFront → Viewers
With DRM:
Source → MediaConvert → S3 → MediaPackage VOD (SPEKE Encryption) → CloudFront → Viewers
Hybrid Live-to-VOD
Encoder → MediaLive → MediaPackage (Live + Archive) → S3 (Recording)
↓
CloudFront (Live)
S3 Archive → MediaConvert (Trim/Edit) → S3 VOD → CloudFront (VOD)
Multi-Region Resilience
Encoder (Primary) → MediaLive (us-west-2) → MediaPackage (us-west-2) → CloudFront
↓
Encoder (Backup) → MediaLive (us-east-1) → MediaPackage (us-east-1) ────────┘
Use Route53 health checks to failover between regions.
Pricing
MediaLive
Input Pricing:
- HD (1080p, H.264): ~$2.40/hour
- HD (1080p, HEVC): ~$4.80/hour
- UHD (4K, H.264): ~$9.60/hour
- UHD (4K, HEVC): ~$19.20/hour
Output Pricing:
- HD Output: ~$1.00/hour per output
- UHD Output: ~$4.00/hour per output
Example: 24/7 HD channel with 5 outputs:
Input: $2.40/hour × 24 × 30 = $1,728/month
Outputs: $1.00/hour × 5 × 24 × 30 = $3,600/month
Total: ~$5,328/month
MediaPackage
Ingress: $0.075/GB
Egress (Origin): $0.100/GB
Manifest Requests: $0.005 per 10,000 requests
Example: 5 Mbps stream, 10,000 concurrent viewers:
Ingress: 5 Mbps × 3600s × 24h × 30d / 8 / 1024 / 1024 = ~1,620 GB
Cost: 1,620 GB × $0.075 = $121.50
Egress: 5 Mbps × 10,000 viewers × ... = ~16,200 TB
(But egress goes to CloudFront, which has its own pricing)
Manifest Requests: ~10M requests/month
Cost: 10,000,000 / 10,000 × $0.005 = $5
MediaTailor
Session Initialization: $0.01 per session
Manifest Requests: $0.005 per 10,000 requests
Ad Decision Server Calls: $0.025 per 1,000 calls
Example: 100,000 viewers, 2-hour sessions, 3 ad breaks:
Sessions: 100,000 × $0.01 = $1,000
ADS Calls: 100,000 × 3 × $0.025/1000 = $7.50
Total: ~$1,007.50
MediaStore
Storage: $0.025/GB/month
PUT Requests: $0.01 per 1,000 requests
GET Requests: $0.001 per 1,000 requests
Data Transfer: $0.025/GB (to internet)
MediaConnect
Flow Hours: $0.075/hour
Data Transfer:
- Inbound: Free
- Outbound (to internet): $0.050/GB
- Outbound (to MediaLive): Free
MediaConvert
HD (1080p):
- Basic: $0.015/minute
- Professional: $0.030/minute
UHD (4K):
- Basic: $0.060/minute
- Professional: $0.120/minute
Example: Transcode 100 hours of HD VOD content:
100 hours × 60 minutes × $0.030 = $180
Best Practices
High Availability
- Use STANDARD MediaLive channels for production (dual pipeline)
- Implement input failover (primary/backup encoders)
- Multi-region redundancy for critical events
- Monitor aggressively (CloudWatch alarms, PagerDuty)
Cost Optimization
- Right-size encoding (don’t encode 4K if audience is 90% mobile)
- Use SINGLE_PIPELINE channels for non-critical streams
- Efficient bitrate ladders (eliminate redundant profiles)
- Schedule channels (stop encoding during off-hours)
- Optimize CDN caching (reduce origin egress)
Security
- Encrypt at rest (S3 encryption, MediaStore encryption)
- Encrypt in transit (HTTPS, TLS)
- DRM for premium content (SPEKE integration)
- Restrict access (IAM policies, input security groups, signed URLs)
- Audit logs (CloudTrail, access logs)
Quality
- Use closed GOP for ABR switching and ad insertion
- Optimize GOP size (2s for live, 4-6s for VOD)
- Audio normalization (ITU-R BS.1770)
- Slate/filler content for input loss
- Test failover regularly
Monitoring
- CloudWatch dashboards (real-time metrics)
- Custom alarms (pipeline failures, input loss, high errors)
- EventBridge automation (auto-remediation)
- Synthetic monitoring (continuous playback tests)
- Player analytics (quality of experience, rebuffering)
Conclusion
AWS Elemental Media Services provide a comprehensive, cloud-native broadcast infrastructure that scales from small live streams to global sporting events with millions of concurrent viewers. By leveraging MediaLive for encoding, MediaPackage for origin services, MediaTailor for ad monetization, and integrating with CloudFront for global distribution, you can build professional-grade video workflows without the capital expense and operational complexity of traditional broadcast infrastructure.
The elasticity of the cloud means you pay only for what you use, scaling up for peak events and down during off-hours. The integration with the broader AWS ecosystem (Lambda for automation, S3 for archiving, Rekognition for content moderation, etc.) enables powerful video applications that would be prohibitively expensive with on-premise solutions.
Whether you’re building a live sports platform, a VOD streaming service, a 24/7 linear channel, or a hybrid workflow, AWS Elemental provides the building blocks to deliver broadcast-quality video at internet scale.