scaling the cloud for uhd and hevc

10
Scaling the cloud for UHD and HEVC Lessons from Amazon Instant Video UHD launch Ben Waggoner – Principal Video Engineer, Amazon Instant Video

Upload: amazon-web-services

Post on 16-Jul-2015

127 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Scaling the cloud for UHD and HEVC

Scaling the cloud for UHD and HEVCLessons from Amazon Instant Video UHD launch

Ben Waggoner – Principal Video Engineer, Amazon Instant Video

Page 2: Scaling the cloud for UHD and HEVC

Agenda

UHD and HEVC

Challenges

Scaling to many cores

Scaling across instances

What’s next

©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved

Page 3: Scaling the cloud for UHD and HEVC

UHD: Ultra High Definition

Frame size up to 3840x2160

2x2 grid of 1920x1080

Commonly called 4K (which is really 4096x)

Today’s “Next Big Thing” in consumer television

Page 4: Scaling the cloud for UHD and HEVC

HEVC: High Efficiency Video Coding

Aka H.265 – the next MPEG standard codec

Following in the illustrious footsteps of H.264 and MPEG-2

HEVC targets same quality at 50% the bitrate of H.264

Particularly well suited for high resolution >50% advantage at UHD

But much more complex to encode; >6x as much math per pixel

Supported in lots of TVs and coming other places too

All 2014+ UHD Smart TVs

Blu-ray 2.0

Windows 10 & Android 5.0 (Lollipop)

Lots of mobile SoCs for 2015+ devices

Page 5: Scaling the cloud for UHD and HEVC

The job

Amazon Instant Video committed to launch UHD by end of 2014

All current seasons of Amazon Originals

100+ Sony movies and episodes (Breaking Bad & Better Call Saul)

Has to look great

On the UHD TVs customers are buying

Has to stream great

Adaptive streaming – no downloading required

Need to support down to 150 Kbps, like 1080p AIV

Can’t tell customers they can’t watch a title because they got it in UHD!

Has to look spectacular on fast connections

Page 6: Scaling the cloud for UHD and HEVC

The challenge - scale

~200 hours of content to launch And source files are 4x bigger

13 bitrates each

HEVC is ~10x slower per pixel as H.264

And UHD is 4x more pixels as 1080p

Each UHD hour needs ~30x more time than 1080p hour

Could go wide – encode each stream on single host Wasteful – 1080p and below streams done way early

Also redo all source decode and preprocessing

Encoding instances are faster constrained to one NUMA socket

Page 7: Scaling the cloud for UHD and HEVC

How we made it work

Lots of AWS EC2 c2.8xlarge instances Dual sockets with two 8-core Sandy Bridge Xeon

processors

64 GB of RAM

Add EBS storage to allow >1 TB source files

Optimization! Work with 3rd party to enhance encoder throughput

AVX and SSE optimizations

The faster the encoder, the more it can improve quality given speed

Page 8: Scaling the cloud for UHD and HEVC

Balancing Encoding Tasks-Sockets and Instances

Want to get optimal balance of

total work per socket

Efficient to have all streams of

same size happen on same socket

(at least core)

Speed proportional to frame size

Optimal to have two instances

simultaneously encode one title

Your Tetris skills shall not go to

waste!

Page 9: Scaling the cloud for UHD and HEVC

What’s ahead?

Implement wide variety of quality improvements

Lots of AVX2 and other optimizations

Share work between multiple encodes of same content

Move to new CC4.8xlarge instances 2 sockets, 18 cores of Broadwell cores (2 gen past Sandy

Bridge)

AVX2!

64 GB RAM

Speed improvements to increase encoder quality

©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved

Page 10: Scaling the cloud for UHD and HEVC