Drupal, NetFlix, & Chill: Adaptive Bitrate Video Streaming - - PowerPoint PPT Presentation

drupal netflix chill adaptive bitrate video streaming
SMART_READER_LITE
LIVE PREVIEW

Drupal, NetFlix, & Chill: Adaptive Bitrate Video Streaming - - PowerPoint PPT Presentation

Drupal, NetFlix, & Chill: Adaptive Bitrate Video Streaming Stephen Barker, Digital Frontiers Media, Inc. Dave Kopecek, Aisle 8, Inc. 1 The Problem Existing Site 400 HD videos Slow video loading/buffering/playback latency (10-11 seconds


slide-1
SLIDE 1

Drupal, NetFlix, & Chill: Adaptive Bitrate Video Streaming

Stephen Barker, Digital Frontiers Media, Inc. Dave Kopecek, Aisle 8, Inc.

1

slide-2
SLIDE 2

The Problem

Existing Site 400 HD videos Slow video loading/buffering/playback latency (10-11 seconds average; sometimes up to 30 seconds!) Stuttering video playback Web server disk space being exhausted Budget Two-Pronged Issue of User Experience (stutter) v. Site Maintainability

2

slide-3
SLIDE 3

Does NetFlix hate you?

3

Image: cnet.com

slide-4
SLIDE 4

Adaptive Bitrate Streaming

4

Image: encoding.com

slide-5
SLIDE 5

HLS Video File Structure

5

Image: apple.com

slide-6
SLIDE 6

Stutter Solution: Amazon Elastic Transcoder

6

slide-7
SLIDE 7

Transcoder Workflow

7

slide-8
SLIDE 8

AWS Elastic Transcoder HLS Presets

8

slide-9
SLIDE 9

Pipelines and Jobs

9

slide-10
SLIDE 10

AmazonS3 Events

10

slide-11
SLIDE 11

AWS Lambda

11

slide-12
SLIDE 12

Node.js Lambda Function

12

slide-13
SLIDE 13

Lambda Initiated HLS Files

13

slide-14
SLIDE 14

Standard Drupal File Handling

14

slide-15
SLIDE 15

AmazonS3 Module

15

slide-16
SLIDE 16

AmazonS3 CORS Upload Module

16

slide-17
SLIDE 17

Tying It All Together

17

slide-18
SLIDE 18

CloudFront CDN Setup in Minutes

18

slide-19
SLIDE 19

Two URL Issues

19

slide-20
SLIDE 20

hook_file_url_alter

20

slide-21
SLIDE 21

hook_file_url_alter (cont.)

21

slide-22
SLIDE 22

Finishing Touches

Taking care of all existing files.

  • Bulk upload all files from Drupal files directory to S3
  • UPDATE file_managed SET uri = REPLACE(uri, 'public',

's3') WHERE INSTR(filemime, 'video') > 0;

22

Lambda cleanup functions.

  • If Elastic Transcoder is succesful, then move original

mp4 to an Archive bucket.

  • If Elastic Transcoder fails send Amazon SNS push

notification

slide-23
SLIDE 23

Results

23

slide-24
SLIDE 24

Results

Both New and Existing Videos now served via fast Amazon CloudFront CDN! End User Experience - No stuttering video playback or video stoppage! Maintainer Experience - No change from standard Drupal node creation. Single video upload. ZERO web server disk space used and nearly infinite S3 expandability! Super cheap and easy to maintain!

24

slide-25
SLIDE 25

Stephen Barker

stephen@digitalfrontiersmedia.com https://twitter.com/DigitalFrontier

25

Dave Kopecek

dave@aisle8.net https://twitter.com/davekopecek