© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Scalable Streaming of On-Demand Video Using Amazon Web Services
Mark W Ramberg – Global Digital Business Media
Nihar Bihani, Senior Product Manager - Amazon CloudFront
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AgendaComponents of a Media Streaming Stack
Challenges of Media Streaming Beyond the Desktop
Traditional Media Streaming Solution
Media Streaming Best Practices
Using AWS to Implement Best Practices
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AgendaComponents of a Media Streaming Stack
Challenges of Media Streaming Beyond the Desktop
Traditional Media Streaming Solution
Media Streaming Best Practices
Using AWS to Implement Best Practices
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Ingest Media into the CloudMedia companies traditionally have on-premise storage
Tiered storage
Content owners cannot keep up with scale – being forced to look to outside storage solutions
Need fast, inexpensive ways to move content into the cloud
4
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Storage & Archival
Scalability for content expansion
Durability and media critical performance
Policy based archival solution
Compatibility with media solutions
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Media Ingest & Storage Architecture
6
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Transcoding / Transmuxing
Convert input files to multiple formats• Multiple bit rates• Multiple screen sizes• Various Codecs
Prepare transcoded files for HTTP delivery (aka transmuxing)• File level segmenting• Virtual segmenting
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Audio and Video CodecsCodec = “COmpressor”+”DECompressor”
Saves storage space and transmission bandwidth - Tradeoff is additional compute required
Lossy vs. lossless: depends on the task
Audio Video
Capture/Editing
• PCM (raw) • MJPEG• MPEG-2• AVCHD/AVC-Intra• HDCAM HD• Raw Data recording• Apple ProRes 422 and Apple ProRes 422 (HQ),• Avid DNxHD• Sony’s DVCAM and XDCAM• DVCPro• RED .r3d camera files
Distribution
• AAC, HE-AAC (a.k.a. MPEG2 Part 3, MPEG4 Part 3, ISO/IEC 13818-3, ISO/IEC 14496-3)
• MP3 (a.k.a. MPEG1 Layer 3 Audio, MPEG1)• Older but still extremely widely used audio codec.
Supported everywhere and by most every device in existence
• Vorbis (open source)
• H.264 (the current distribution format standard)• Blu-ray, Internet VOD, HD live video broadcasting, etc.
• WMV (Windows Media Video)• Flash Video (Sorenson H.263 for Flash)• VP8 (On2)
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Media File Containers
MP4• MPEG4 system container, used by Quicktime and Adobe Flash. This container is quite versatile and has excellent support almost everywhere (from
phones to computers).• Extensions: mp4, mov, m4v, m4a, m4b, m4p, f4v, 3gp, 3g2• Synonyms: MPEG4 Part 14, ISO/IEC 14496-14
WebM / Matroska• A versatile container similar in concept to the MPEG4 system container. WebM uses a subset of Matroska to create a container optimized for web
media and HTML5. Adobe has also recently announced plans to support WebM in the Flash player.• Extensions: webm, mkv
ASF• Microsoft’s Advanced Streaming Format• Extensions: asf, wmv, wma
AVI• Microsoft's generic container format. This can generally store anything and everything. It has excellent support on most computers.• Extensions: avi
FLV• Adobe Flash media container which is useful for storing legacy Flash content and for low-latency live streaming. Adobe's newer format is F4V, a subset
of the MPEG4 system container.• Extensions: flv
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Media Delivery ProtocolsProgressive Download (YouTube)Traditional streaming formats (RTSP, RTMP, etc.)“Pseudo-streaming“
• HTTP based, requires player logic and server suport• Typically uses byte-range requests and/or query strings
Radio Streaming (Shoutcast, Icecast, etc.)• Don’t work well with CDNs – require a persistent connection
Adaptive Bit Rate (ABR) - HTTP Streaming• Microsoft Smooth Steaming - Xbox, Windows Phone, Silverlight, etc.
• Microsoft maintained/supported AMI available
• Apple HTTP Live Streaming (HLS) – iOS devices• Segmenters for live and VOD only run on iOS
• Adobe HTTP Dynamic Streaming (HDS) - Flash• Adobe maintained/supported AMI available
• MPEG DASH• Future industry standard
Good article: http://www.longtailvideo.com/blog/19578/what-is-video-streaming
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Stream Generation
Pre-encoded files directly from storage medium• Suitable for popular content• Less moving parts
Streaming servers for real-time transcoding/ transmuxing• Turnkey solution• Transcode / transmux only as needed• Fewer files to manage• Vendor specific value added services
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Global Delivery
Use Content Delivery Networks to• Increase performance• Handle popularity surges• Increase availability• Reduce costs
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Media Players and Devices – “Clients”
Desktop/Laptop Smartphone/Tablet Living Room
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Content Security Summary by Streaming Type
Authentication Player VerificationNetwork
EncryptionContent
Encryption DRM
RTMP Streaming
Token SWF VerificationRTMPE, RTMPS, RTMPTE
see DRM Adobe Access
HTTP Dynamic Streaming
Token SWF Verification SSL see DRMAdobe Access &
PHDS
HTTP Live Streaming
none none SSL AES-128Multiple available
Smooth Streaming
Token unknown SSL see DRM PlayReady, etc.
RTSP/RTP Token unknown SRTP unknown unknown
MPEG2-TS Over RTP only unknownConditional
AccessAES-128 unknown
Legend
Supported
Partial Support
Not Supported
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AgendaComponents of a Media Streaming Stack
Challenges of Media Streaming Beyond the Desktop
Traditional Media Streaming Solution
Media Streaming Best Practices
Using AWS to Implement Best Practices
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
A Fragmented Ecosystem… Many Devices, Codecs and Protocols…
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Plethora of Devices
Supports Only HLS
Devices are Vendor SpecificSoftware-only Baseline
Supports Only Smooth Streaming
New Devices Entering the Market
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Multiple Transcodes
Codecs
Screens
Asset Library
Managem
ent
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Players and Security Models
Native Media Players
Third-Party Media Players
DRM-ed Content Tokenized Security
vs
vs
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Monitor• Viewer Experience• Operational Excellence• Business Impact
Identify• Devices that Need Optimization• Best Delivery Networks• Viewer Trends
Reduce• Sub-optimal Viewer Experience• Turnaround Times• Operational Costs
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AgendaComponents of a Media Streaming Stack
Challenges of Media Streaming Beyond the Desktop
Traditional Media Streaming Solution
Media Streaming Best Practices
Using AWS to Implement Best Practices
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AgendaComponents of a Media Streaming Stack
Challenges of Media Streaming Beyond the Desktop
Traditional Media Streaming Solution
Media Streaming Best Practices
Using AWS to Implement Best Practices
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Device Video Compression Audio Compression Quality Level Delivery Protocol
iOS H.264 AAC SD (low), SD (high), HD HLS
Android H.264 AAC SD (low), SD (high), HD HLS *
Windows Phone 8 / Xbox
H.264 AAC SD (low), SD (high), HD Smooth Streaming
Roku H.264 AAC SD (low), SD (high), HD HLS
PlayStation 3 H.264 AAC SD (low), SD (high), HD HLS
Desktop H.264 AAC SD (low), SD (high), HD HLS / Smooth Streaming
Encode To Take Advantage of Commonality Among Devices
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Avoid Storage Duplication
Same Content in Multiple Places? Central Location with Archival Backup
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Global Reach
High Performance Delivery
Streaming Context Aware
Access Logs for Customer Insights
Pick The Right Content Delivery Network
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Feature Native Player Third-Party Player
Consistency No Yes
Customizability No Yes
Turn-Key Yes No
Debugging Support No Yes
Data Collection No Yes
Players – Native, Third-Party, or Both?
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Securing Your Assets
Pre-DRM DRM On-The-Fly CDN Private Content
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Measure Viewer ExperienceCDN Server Logs Real User Metrics
# of concurrent sessions (expected)
# of concurrent sessions (actual)
% of re-buffered sessions
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AgendaComponents of a Media Streaming Stack
Challenges of Media Streaming Beyond the Desktop
Traditional Media Streaming Solution
Media Streaming Best Practices
Using AWS to Implement Best Practices
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Using AWS to Implement Media Streaming
•Native Infrastructure services (Amazon S3, Amazon Elastic Transcoder, Amazon CloudFront, Amazon EC2)•Partner solutions in AWS Marketplace
Well Formed Ecosystem
•Pay-as-you-go pricing model•Capacity when you need it•Global footprint
Cost Effective Scaling
•MPAA Security Best PracticesMedia Specific Capabilities
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Amazon S3
Mezzanine File
Amazon Elastic Transcoder
Encode To Take Advantage of Commonality Among Devices
• Faster onboarding of content• Reduced storage costs• Less content management
overhead
• Lowest number of encodes that span maximum number of devices
• H.264 video, AAC audio• Low quality, high quality and 720p
HD compression
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Amazon S3
Images
Videos
Files
Binaries
Snapshots
Internet scale storage via API
AWS Storage Gateway
S3, Glacier
Integrates on-premises IT and AWS storage
Amazon Glacier
Images
Videos
Files
Binaries
Snapshots
Storage for archiving and backup
Storing and Managing Your Media Assets on AWS
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Video Streaming through AWS
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Delivering Video Using Amazon CloudFront
All HTTP-based streaming protocols (HLS, HDS, Smooth Streaming, MPEG-DASH) supportedVideo streaming-specific caching optimizations
Scalable to handle popular content
Global reach (43 edge locations)
Native streaming support for HLS
Joint solutions with streaming media ISVs
Granular customer access logs
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Delivering Secured Content
•Private content features of Amazon CloudFront
Restrict Access to Content
•Vary based on platform you are reaching•Partner solutions available in AWS Marketplace•Enabled by AWS CloudHSM solution
Encrypt Content Using Policies
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Monitor and Measure Customer Experience
Process Using Amazon Elastic MapReduce
Amazon CloudFront Access Logs
Video Client
Monitoring Aggregator
Telemetry Data
Real User Metrics
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
?