Your SlideShare is downloading. ×
On-demand & Live Streaming with Amazon CloudFront in the Post-PC World (MED305) | AWS re:Invent 2013
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

On-demand & Live Streaming with Amazon CloudFront in the Post-PC World (MED305) | AWS re:Invent 2013

1,930
views

Published on

Learn how AWS customers are using Amazon CloudFront to deliver their video content to users over HTTP(S) using a number of modern streaming protocols such as Smooth Streaming, HLS, DASH, etc. You …

Learn how AWS customers are using Amazon CloudFront to deliver their video content to users over HTTP(S) using a number of modern streaming protocols such as Smooth Streaming, HLS, DASH, etc. You also learn about options for end-to-end security of your video content—through both encryption and preventing access from unauthorized users based on their location. Finally, we demonstrate how easy it is to use CloudFront to deliver both your on-demand and live video to a global audience with great performance.


0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,930
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
47
Comments
0
Likes
7
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Media Streaming with Amazon CloudFront in a Post-PC World Alex Dunlap, Senior Manager - Amazon CloudFront November 14, 2013 © 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.
  • 2. Agenda • • • • • Challenges of media streaming beyond the desktop Traditional media streaming solution Media streaming best practices Using AWS to implement best practices Demo: On-demand streaming to multiple devices using Amazon CloudFront and Amazon Elastic Transcoder • Customer walkthrough
  • 3. Agenda • • • • • Challenges of media streaming beyond the desktop Traditional media streaming solution Media streaming best practices Using AWS to implement best practices Demo: On-demand streaming to multiple devices using Amazon CloudFront and Amazon Elastic Transcoder • Customer walkthrough
  • 4. A Fragmented Ecosystem… Many Devices, Codecs and Protocols…
  • 5. Plethora of Devices Supports only HLS Devices are vendor specific software-only baseline Supports only smooth streaming New devices entering the market
  • 6. Multiple Transcodes Codecs Asset Library Management Screens
  • 7. Players and Security Models Native Media Players vs Third-Party Media Players DRM-ed Content vs Tokenized Security
  • 8. Monitor • Viewer experience • Operational excellence • Business impact Identify • Devices that need optimization • Best delivery networks • Viewer trends Reduce • Suboptimal viewer experience • Turnaround times • Operational costs
  • 9. Agenda • • • • • Challenges of media streaming beyond the desktop Traditional media streaming solution Media streaming best practices Using AWS to implement best practices Demo: On-demand streaming to multiple devices using Amazon CloudFront and Amazon Elastic Transcoder • Customer walkthrough
  • 10. Agenda • • • • • Challenges of media streaming beyond the desktop Traditional media streaming solution Media streaming best practices Using AWS to implement best practices Customer walkthrough
  • 11. Encode to Take Advantage of Commonality among Devices 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
  • 12. Avoid Storage Duplication Same content in multiple places? Central location with archival backup
  • 13. Pick the Right Content Delivery Network Global Reach High Performance Delivery Streaming Context Aware Access Logs for Customer Insights
  • 14. Players – Native, Third Party, or Both? Feature Native Player Third-Party Player Consistency No Yes Customizability No Yes Turn-Key Yes No Debugging Support No Yes Data Collection No Yes
  • 15. Securing Your Assets Pre-DRM DRM On-The-Fly CDN Private Content
  • 16. Measure Viewer Experience CDN Server Logs # of concurrent sessions (expected) # of concurrent sessions (actual) Real User Metrics % of re-buffered sessions
  • 17. Agenda • • • • • Challenges of media streaming beyond the desktop Traditional media streaming solution Media streaming best practices Using AWS to implement best practices Demo: On-demand streaming to multiple devices using Amazon CloudFront and Amazon Elastic Transcoder • Customer walkthrough
  • 18. Using AWS to Implement Media Streaming Well Formed Ecosystem • Native infrastructure services (Amazon S3, Amazon Elastic Transcoder, Amazon CloudFront, Amazon EC2) • Partner solutions in AWS Marketplace Cost Effective Scaling • Pay-as-you-go pricing model • Capacity when you need it • Global footprint Media Specific Capabilities • MPAA security best practices
  • 19. Encode to Take Advantage of Commonality among Devices • • • Lowest number of encodes that span maximum number of devices H.264 video, AAC audio Low quality, high quality, and 720p HD compression Mezzanine File Amazon S3 • • • Faster onboarding of content Reduced storage costs Less content management overhead Amazon Elastic Transcoder
  • 20. Storing and Managing Your Media Assets on AWS Amazon S3 Amazon Glacier AWS Storage Gateway Internet scale storage via API Storage for archiving and backup Integrates on-premises IT and AWS storage Amazon S3, Amazon Glacier Images Videos Files Binaries Snapshots Images Videos Files Binaries Snapshots
  • 21. Video Streaming through AWS
  • 22. Video Streaming through AWS All HTTP-based streaming protocols (HLS, HDS, Smooth Streaming, MPEG-DASH) supported Video 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
  • 23. Delivering Secured Content Restrict Access to Content • Private content features of Amazon CloudFront • Vary based on platform you are reaching Encrypt Content Using • Partner solutions available in AWS Marketplace Policies • Enabled by AWS CloudHSM solution
  • 24. Monitor and Measure Customer Experience Amazon CloudFront Access Logs Real User Metrics Telemetry Data Video Client Process Using Amazon Elastic MapReduce Monitoring Aggregator
  • 25. Agenda • • • • • Challenges of media streaming beyond the desktop Traditional media streaming solution Media streaming best practices Using AWS to implement best practices Demo: On-demand streaming to multiple devices using Amazon CloudFront and Amazon Elastic Transcoder • Customer walkthrough
  • 26. Customer Walkthrough
  • 27. CHALLENGES IN HD VIDEO ENCODING AND DELIVERY
  • 28. WHO WE ARE VEVO is the world's leading all-premium music video and entertainment platform. In August 2013: • 4.4 billion video views worldwide • 28% of global streams each month are on mobile • 250 million unique visitors worldwide • 75,000+ videos from more than 21,000 artists
  • 29. CHALLENGES Provide a cohesive video streaming experience across many different platforms Disparate streaming protocols and encodes for different devices and different screen sizes Quickly adapt and be able to penetrate new markets
  • 30. SUPPORTED PLATFORMS • Web (dynamic streaming over RTMP) • Android (PMD) • iOS (HLS) • Mobile web (PMD) • Apple TV (HLS) • • VEVOTV linear channel (RTMP/HLS/Smooth) Samsung TV (HLS) • Roku (HLS) • Flash syndicated player (HLS) • XBOX (Smooth Streaming) • Windows Phone / Windows 8 (Smooth Streaming)
  • 31. VIDEO RENDITIONS • Currently VEVO encodes 35 different renditions for each video • All video encodes are adaptive with the exception of Android and mobile web at the moment • Working towards consolidating to 18 different renditions and providing adaptive playback for all platforms by end of year • Achieved through implementing HLS/Smooth Streaming playback on as many sets of platforms as possible
  • 32. HLS APPROACH • Find the least common denominator in terms of video encoding settings • Example: HLS protocol has varying implementations on different devices • HLS 3 vs. HLS 4 support • Provide lightweight options such as choice of manifest for different devices • Repeatable workflows that are agnostic to technology providers
  • 33. HLS MANIFESTS Using the same adaptive bitrate encode for as many devices as possible: • Control quality and startup time by creating multiple versions of manifests for mobile vs. connected devices • Acceptable to use 500 kbps starting bitrate on 3G/4G cellular networks • On a TV connected device, 2400 kbps 720p playback is much more appropriate
  • 34. MASTER VARIANT PLAYLIST #EXTM3U #EXT-X-VERSION:4 #EXT-X-I-FRAME-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2728426,RESOLUTION=960x540, CODECS="avc1.4d401f,mp4a.40.2",URI="2400/vs3149982123_iframe.m3u8" #EXT-X-STREAM-INF:PROGRAM- ID=1,BANDWIDTH=2728426,RESOLUTION=960x540,CODECS="avc1.4d401f,mp4a.40.2" 2400/vs3149982123_2400k_960x540.m3u8 #EXT-X-I-FRAME-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1449571,RESOLUTION=960x540, CODECS="avc1.4d401f,mp4a.40.2",URI="1200/vs3149982123_iframe.m3u8" #EXT-X-STREAM-INF:PROGRAMID=1,BANDWIDTH=1449571,RESOLUTION=960x540,CODECS="avc1.4d401f,mp4a.40.2" 1200/vs3149982123_1200k_960x540.m3u8 ……
  • 35. BYTERANGE PLAYLIST #EXTM3U … #EXT-X-TARGETDURATION:10 #EXT-X-VERSION:4 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-PLAYLIST-TYPE:VOD #EXTINF:7.64000, #EXT-X-BYTERANGE:54522@564 vs3149982123_24.ts #EXT-X-ENDLIST #EXT-X-I-FRAMES-ONLY #EXTINF:10.00000, #EXT-X-BYTERANGE:1417@564 vs3149982123_0.ts #EXTINF:10.00000, #EXT-X-BYTERANGE:86377@564 vs3149982123_1.ts …
  • 36. VIDEO STREAMING • Use HTTP based protocol to deliver content where possible • FMS servers generally have higher streaming costs • ABR protocols benefit from faster startup time and the ability to target multiple screen sizes • Multi-CDN approach is not for everyone, but if footprint is large enough, it provides best valueperformancestability balance • Consider tradeoff between operational effort vs. extra redundancy and protection from regional outages • Video streaming in certain geographical regions and emerging markets are more expensive
  • 37. ENCODING WORKFLOW Queue-based system with designated tasks • Encoding Request: Mezzanine files uploaded to object storage • Encoding Job: Tasks created for each video platform and its associated renditions • Delivery: Upload encoded assets to CDN(s) • Update Data Layer: Back-end databases updated with information on how to stream the video
  • 38. Service Stack Queue System QUEUE BASED ENCODING SYSTEM Request Encode Request Service Delivery Encoding Service Update Delivery Service Update Service VEVO Database CDNS On-Premises Storage Amazon S3 Storage
  • 39. ANATOMY OF AN ENCODING MESSAGE JSON CaptionSource __type : "EncodingMessage:#Vevo.Encoding.Data.Messages" BucketName : "CaptionFiles" Attempt : 0 Key : "BRV222900341/BRV222900341" BatchId : "c7ad3b1f-b85b-4ed2-a1e0-84d3a1099147" Destination IsPriority : false BucketName : "EncodedOutput" Isrc : "BRV222900341" Key : "BRV222900341/" MessageId : "822745bc-9aac-497d-aac9-9794be54e7a2" Source Platform : 8 Priority : 1 ServiceRole : 2 TaskType : "Vevo.Encoding.Tasks.EncoderTask" VideoSizeMB : 419 BucketName : "Mezzanine" Key : "BRV222900341/BRV222900341.mp4"
  • 40. ENCODING WORKFLOW CONTINUED Benefits: 1. Stateless – failed tasks will be reprocessed 2. Scalable – scale out fleet horizontally for large catalog reencodes 3. Maintainable – workflow is extremely repeatable
  • 41. VIDEO ENCODING SETTINGS • Provide multiple bitrates for devices to choose from • Select an appropriate H.264 profile and level to gain maximum coverage across devices • Baseline profile 3.x level (less complexity) • High profile 4.x 1080p output (better compression) • Two-channel 44100Hz AAC audio format has broadest support • Live video broadcasts are a different beast!
  • 42. LAUNCHING ON A NEW PLATFORM In late August 2013 VEVO launched on the Apple TV platform How do we adapt HLS streams used for mobile devices to large screen device? • Expanded HLS encoding profile to add additional 3400 kbps & 4200 kbps bitrate encodes at 1080p resolution • Implemented byte-range playlists without losing interoperability • Reused widely for all devices supporting HLS natively • Large undertaking to re-encode entire video catalog
  • 43. API STACK Data Layer SQL Replication Route 53 DNS Elastic Load Balancing SQL Server SQL Server Availability Zone 1 Availability Zone 2 API Server Availability Zone 1 Cache Preloader API Server Availability Zone 2 ElasticCache Cluster Availability Zone 1 Amazon S3 Lucene Indexes US East
  • 44. WORKFLOW SUMMARY CDN A Encoding CDN B API CDN C Mezzanine Files Clients
  • 45. CLOUDFRONT • Ease of integration: Encoding workflows live in multiple cloud providers; simple to extend existing logic to output to a permanent Amazon S3 origin for streaming • Competitive pricing: Easy to work on proof of concept with pay-as-you-go model without a heavy initial investment • Prewarm cache from different geographic locations for anticipated high profile assets • Amazon S3 object storage is suitable as a origin in terms of caching efficiency and easy-to-control levels of redundancy for further cost savings; model for Amazon S3 + redundant backups is compelling from an overhead and management perspective.
  • 46. CLOUDFRONT CONTINUED • Protecting video content residing on Amazon S3 origin is simple with origin access identity • Restrict access to all users except for CloudFront to ensure assets are only streamed via CDN • Integrate your own tokenization schemas for further security • SSL for video content served over HTTP based protocol content if required
  • 47. ANALYZE YOUR LOGS • When selecting edge locations, study your origin logs to determine best balance between in-region delivery and cost. • • LATAM? APAC? Ability to select geographic edge locations helps keep cost under control as VEVO mostly operates in North America in Europe. Understand your traffic before making a decision New York, NY Frankfurt Am Main, Hessen Los Angeles, CA Atlanta, GA Milano, Italy Madrid, Spain Dallas, TX Berlin, Germany Houston, TX Hamburg, Germany Chicago, IL Phoenix, AZ Washington, DC Montreal, QC Philadelphia, PA Paris, France Toronto, ON San Diego, CA San Francisco, CA Stuttgart, Baden-Wuerttemberg
  • 48. ACHIEVED HIGHER AVERAGE BITRATE New HLS profiles delivered over CloudFront to US and EU resulted in increased average bitrate to iOS devices. iOS Average Bitrate Average Kbps 3000 2500 2000 1500 1000 500 0 6/1 6/11 6/21 7/1 7/11 7/21 iOS Bitrate 7/31 8/10 8/20 Linear (iOS Bitrate) 8/30 9/9 9/19 9/29
  • 49. LARGER MEDIA INDUSTRY CONCERNS • Lack of standardization and fragmentation is still a major issue. • The problem is not going to go away overnight. Is DASH the future? HTML 5? • Take the initiative to establish own internal standards for your video operations by consolidation around adaptive protocols and using repeatable workflows. • Pick the right CDN(s); buffering time has proven correlation with loss of engagement.
  • 50. THANK YOU! Ivan Yang ivan.yang@vevo.com
  • 51. We are sincerely eager to hear your feedback on this presentation and on re:Invent. MED305 Please fill out an evaluation form when you have a chance.