Page 1
© 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.
On-Demand Adaptive Bit-Rate Streaming
using Amazon Web Services
Nihar Bihani
Senior Product Manager, Amazon CloudFront
Page 2
© 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.
Agenda
Components of a Media Streaming Stack
Using AWS to Create a Streaming Stack
Demo: HLS & Smooth Streaming using Amazon CloudFront
Page 3
© 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.
Agenda
Components of a Media Streaming Stack
Using AWS to Create a Streaming Stack
Demo: HLS & Smooth Streaming using Amazon CloudFront
Page 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.
Ingest Media into the Cloud
Media 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
Page 5
© 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
Page 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
Page 7
© 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 Codecs Codec = “COmpressor”+”DECompressor”
Saves storage space and transmission bandwidth - Tradeoff is additional compute required
Lossy vs. lossless: depends on the task
Audio Video
Cap
ture
/
Ed
itin
g
• 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
Dis
trib
uti
on
• 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)
Page 8
© 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
Page 9
© 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 Protocols Progressive 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
Page 10
© 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
Page 11
© 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
Page 12
© 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 Verification
Network
Encryption
Content
Encryption DRM
RTMP
Streaming Token SWF Verification
RTMPE,
RTMPS,
RTMPTE
see DRM Adobe Access
HTTP Dynamic
Streaming Token SWF Verification SSL see DRM
Adobe Access &
PHDS
HTTP Live
Streaming none none SSL AES-128
Multiple
available
Smooth
Streaming Token unknown SSL see DRM PlayReady, etc.
RTSP/RTP Token unknown SRTP unknown unknown
MPEG2-TS Over RTP only unknown Conditional
Access AES-128 unknown
Le
ge
nd
Supported
Partial Support
Not Supported
Page 13
© 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.
Agenda
Components of a Media Streaming Stack
Using AWS to Create a Streaming Stack
Demo: HLS & Smooth Streaming using Amazon CloudFront
Page 14
© 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 Practices Media Specific
Capabilities
Page 15
© 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
Page 16
© 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
Page 17
© 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) supported
Video streaming-specific caching optimizations
Scalable to handle popular content
Global reach (50+ edge locations)
Native streaming support for Smooth Streaming & HLS
Joint solutions with streaming media ISVs
Granular customer access logs
Page 18
© 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.
Smooth Streaming Using Amazon CloudFront
Smooth Streaming is the latest addition to the set of video streaming technologies that CloudFront supports.
Content is encoded at multiple bit rates and stored in Amazon S3, one MP4 file per bit rate.
CloudFront will recognize and respond to the specially formatted URLs which comprise a Smooth Streaming request.
You don't need to run a streaming server!
More Info: http://aws.typepad.com/aws/2014/02/amazon-cloudfront-now-supports-microsoft-smooth-streaming.html
Page 19
© 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.
Agenda
Components of a Media Streaming Stack
Using AWS to Create a Streaming Stack
Demo: HLS & Smooth Streaming using Amazon CloudFront
Page 20
© 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.
Demo Setup Architecture
HLS Segments S3 Bucket
Smooth Streaming S3 Bucket
Mezzanine File S3 Bucket
Mezzanine File
Amazon Elastic
Transcoder
Smooth Format File
Amazon CloudFront
Page 21
© 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.
Demo
Page 22
© 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.
Uploading Video File to Amazon S3
Page 23
© 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.
Uploading Video File to Amazon S3
Page 24
© 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.
Uploading Video File to Amazon S3
Page 25
© 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.
Uploading Video File to Amazon S3
Page 26
© 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.
Uploading Video File to Amazon S3
Page 27
© 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.
Uploading Video File to Amazon S3
Page 28
© 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.
Uploading Video File to Amazon S3
Page 29
© 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.
Uploading Video File to Amazon S3
Page 30
© 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.
Uploading Video File to Amazon S3
Page 31
© 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.
Uploading Video File to Amazon S3
Page 32
© 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.
Uploading Video File to Amazon S3
Page 33
© 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.
Uploading Video File to Amazon S3
Page 34
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 35
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 36
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 37
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 38
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 39
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 40
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 41
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 42
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 43
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 44
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 45
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 46
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 47
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 48
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 49
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 50
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 51
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 52
© 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 Amazon Elastic Transcoder to Create HLS Segments
Page 53
© 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 Amazon CloudFront for Global Delivery
Page 54
© 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 Amazon CloudFront for Global Delivery
Page 55
© 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 Amazon CloudFront for Global Delivery
Page 56
© 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 Amazon CloudFront for Global Delivery
Page 57
© 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 Amazon CloudFront for Global Delivery
Page 58
© 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 Amazon CloudFront for Global Delivery
Page 59
© 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 Amazon CloudFront for Global Delivery
Page 60
© 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 Amazon CloudFront for Global Delivery
Page 61
© 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 Amazon CloudFront for Global Delivery
Page 62
© 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 Amazon CloudFront for Global Delivery
Page 63
© 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 Amazon CloudFront for Global Delivery
Page 64
© 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 Amazon CloudFront for Global Delivery
Page 65
© 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 Amazon CloudFront for Global Delivery
•http://d3ak3zw7f80z4a.cloudfront.net/nasa_msl_launch/master.m3u8
• http://tinyurl.com/webinar-hls HLS Multi-bitrate
URL
•http://d3ak3zw7f80z4a.cloudfront.net/nasa_multibit/nasa_msl_launch.ism/Manifest
• http://tinyurl.com/webinar-smooth (works on
platforms with Silverlight support)
Smooth Streaming Multi-bitrate URL