Ultra Low Latency with CMAF - Paris Video Tech€¢Backed by many other companies (Google, Netflix,...

11
Paris Video Tech Meetup #4 / July 2017 Ultra Low Latency with CMAF NICOLAS WEIL - SENIOR ENTERPRISE ARCHITECT @ AKAMAI ROMAIN BOUQUEAU – CEO @ GPAC LICENSING

Transcript of Ultra Low Latency with CMAF - Paris Video Tech€¢Backed by many other companies (Google, Netflix,...

Paris Video Tech Meetup #4 / July 2017

Ultra Low Latency with CMAFN I C O L A S W E I L - S E N I O R E N T E R P R I S E A R C H I T E C T @ A K A M A I

R O M A I N B O U Q U E AU – C EO @ G PA C L I C E N S I N G

Paris Video Tech Meetup #4 / July 2017

Low Latency Levels: Where Are We Now ?

8 sec

HLS/DASH

with 2 sec

segments

on MSL4

Sub-second DASH

with CMAF Low

Latency Chunks

on AMD

Source : Wowza / Streaming Media Magazine

4 sec

HLS/DASH

with 1 sec

segments

on MSL4

Paris Video Tech Meetup #4 / July 2017

Common Media Application Format (CMAF)

Goal

• Provide one single media format that can be

referenced from both HLS playlists and DASH

manifests

Supporters

• Initiated by Apple and Microsoft

• Backed by many other companies (Google, Netflix,

Akamai…)

Approach

• Selection of existing technologies

• ISOBMFF fMP4 as container format

Standardization

• ISO International Standard expected by Q3 2017

Technologies

>> ISOBMFF, fMP4 container,

specifically ISO/IEC 14496-12:2015

>> Common Encryption (CENC) -

ISO/IEC 23001-7: 2016

Allows both “cenc” and “cbcs” modes

of operation

>> MPEG codec suite: AVC (ISO/IEC

14496-10), HEVC (ISO/IEC 23008-2)

and AAC (ISO/IEC 14496-3)

Allows extension to other codecs

>> Captioning & subtitles: WebVTT,

TTML IMSC1, CEAx08

Paris Video Tech Meetup #4 / July 2017

Latency Definitions: Where Can CMAF Help?

Join Latency: NO

• Mainly depends on the number of initial requests

Switch Latency: NO

• Mainly depends on the GOP structure

End-to-end (aka “hand-waving”) Latency: YES!

• Used to depend mainly on segments length

• With CMAF, it now depends on chunks length

MPEG-DASH Broadcast

ProfileCMAF

Segment start Any type of sample

IDR

Random access Open GOPs Closed GOPs

Switches Closed GOPs Closed GOPs

Segment duration Variable Fixed

Paris Video Tech Meetup #4 / July 2017

GPAC Licensing+GPAC+Akamai’s Approach Specifics

Content preparation

• Low latency encoding (I+P only)

• Packaging in CMAF Low Latency Chunks

Delivery

• Origin serves segments currently being written on disk

• Origin maps CMAF chunks to HTTP chunks

• CDN delivers segments in HTTP chunked mode

Playback

• Player leverages SegmentTemplate > availabilityTimeOffset

attribute : he is aware that a fragment of a segment is

available earlier than the full segment

• Playback can start as soon as a CMAF chunk containing an

IDR is fetched and appended to the buffer

Akamai Media Delivery’s

required advanced metadata

Network buffer deactivation

<network:http.buffer-response-

v2>off</network:http.buffer-response-v2>

Queue and serve edge requests in

“broadcast mode”

<cache:make-public-early>on</cache:make-

public-early>

<cache:set-timestamp-on-error-response-

storeentry>on</cache:set-timestamp-on-

error-response-storeentry>

Paris Video Tech Meetup #4 / July 2017

CMAF Low Latency Chunks

Paris Video Tech Meetup #4 / July 2017

Latency Reduction with CMAF

1 2 3 4 5LIVE Encoder producing regular 2s DASH segments

TIME

Start Now

Lowest latency

52s latency 2s buffer, 1s startup

5a

5b

1s latency 1s buffer, 0s startup

LIVE Encoder producing 2s CMAF segments with 500ms chunks

1a

1b

1c

1d

2a

2b

2c

2d

3a

3b

3c

3d

4a

4b

4c

4d

5a

5b

5c

5d

Paris Video Tech Meetup #4 / July 2017

CMAF Ultra Low Latency Prototype Architecture

Live webcam(EBU, Geneva)

Live Transcoding & CMAF LLC packaging

Mapping of CMAF LLCsto HTTP chunks

& Origin HTTP service

HTTP chunked transfers

(Pull) from Origin

mpd

CMAF LLC

CustomizedAMD

delivery

MP4client

SIGNALS

Sub-second glass to glass latencyover plain HTTP/1.1STREAM SPECS

H.264SBR 720p @ 1.5Mbps2 sec GOPs, 25fps6 sec CMAF segments40ms CMAF chunks (1 frame)

EBU,Geneva

‘eods’‘moof’ ‘mdat’

I

D

R

‘moof’ ‘mdat’ ‘moof’ ‘mdat’ ‘moof’ ‘mdat’ …+ 46

frames

‘moof’ ‘mdat’

I

D

R

‘moof’ ‘mdat’ ‘moof’ ‘mdat’ ‘moof’ ‘mdat’

CMAF /HTTP chunk

CMAF /HTTP chunk

CMAF /HTTP chunk

CMAF /HTTP chunk

…+ 46

framesCMAF /HTTP chunk

CMAF /HTTP chunk

CMAF /HTTP chunk

CMAF /HTTP chunk

CMAF /HTTP chunk

CMAF /HTTP chunk

CMAF /HTTP chunk

CMAF /HTTP chunk

6 seconds CMAF segment

‘moof’ ‘mdat’

I

D

R

‘moof’ ‘mdat’ ‘moof’ ‘mdat’ ‘moof’ ‘mdat’ …+ 46

frames

Paris Video Tech Meetup #4 / July 2017

CMAF Ultra Low Latency Prototype Workflow

SIGNALS NODE-GPAC-DASH MP4CLIENTAkamai Media Delivery

Encodes 6s segments, packages it

into 40ms chunks (1 frame), writes

segments to disk Requests segment

Pulls requested segment from origin

Analyzes segment:

use of ‘moof’ or ‘eods’

boxes to define CMAF

chunk boundaries

Returns segment in HTTP chunked

mode, with each HTTP chunk

containing a CMAF chunk Returns CMAF/HTTP mapped chunks

Encoder / Packager Origin CDN Player

Appends chunks to buffer

and plays stream from last

available IDR

- Incomplete segment:

“broadcasted” to all clients

connected to an edge

- Complete segment: cached at the

edge and mid-tier

Paris Video Tech Meetup #4 / July 2017

CMAF Ultra Low Latency Demo @ BroadThinking 2017

~ 600 milliseconds glass to glass latency [video]

Paris Video Tech Meetup #4 / July 2017

CMAF Low Latency Chunks Ecosystem Status

Component Support status

CMAF specification Final Draft International Standard (IS in Q3 2017)

Encoder / Packager GPAC Licensing Signals [link]Ongoing implementations: Harmonic, MediaExcel

Origin server node-gpac-dash module for node.js (open source) [link]

CDN Akamai Media Delivery [link]

Player GPAC MP4client (open source) [link]

What’s missing?

• 24/7 timecoded reference streams

• Browser implementation: Fetch API (Chrome native or polyfill)

support is required in dash.js / hls.js / other players

>> dash.js implementation is in the works

>> shaka player implementation on stand-by

(rearchitecture effort required)

Under consideration

>> Integration with HTTP/2 delivery

>> Integration with push-based ingest(Akamai Media Services Live)