Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CMAF Low Latency Streaming by Will Law from Akamai

CMAF Low Latency Streaming by Will Law from Akamai

Will Law describing the principles behind CMAF Low Latency Streaming. Presented at Streaming Tech Sweden on Nov 22, 2017

Streaming Tech Sweden

November 22, 2017
Tweet

More Decks by Streaming Tech Sweden

Other Decks in Technology

Transcript

  1. Akamai Confidential ©2011 Akamai Faster ForwardTM CMAF Low Latency Streaming

    Will Law | Chief Architect – Media Division | Akamai | 11.17
  2. ©2017 AKAMAI | FASTER FORWARDTM Live stream latency Live stream

    latency = end-to-end latency = glass-to-glass latency = hand-waving latency CAMERA ENCODER CDN Connection latency (RTT)
  3. ©2017 AKAMAI | FASTER FORWARDTM Latency Levels – early 2017

    Source : Wowza / Streaming Media Magazine 2017 2018
  4. ©2017 AKAMAI | FASTER FORWARDTM Legacy Live Stream Latency -

    2016/2017 • Europe • USA
  5. ©2017 AKAMAI | FASTER FORWARDTM Facts about latency with segmented

    media delivery 1. Stream start time = time it takes for the video to start playing after you press ‘play’ 2. Hand–waving latency = time delay between an action occurring in front of the camera and the same action being visible on the end-user device. 3. Stream start time IS NOT EQUAL to latency. A stream may take 5s to start and only be 2s behind live. Conversely, a stream can start in 2s and be 5s behind live. 4. A live player has only ONE CHANCE to build a buffer and that is BEFORE it starts playback. 5. Live latency in segmented media streams is a modulus of the segment duration. 6. Low latency is always a trade-off against stability of playback. Low latency == small buffers.
  6. ©2017 AKAMAI | FASTER FORWARDTM Live Segmented Stream Startup 1

    2 3 4 5 LIVE Encoder producing 2s segments TIME Start Now iOS default Last available Lowest latency 5 7s latency 6s buffer, 0s startup 3s latency 2s buffer, 0s startup 2s latency 2s buffer, 1s startup 3 4 2 4
  7. ©2017 AKAMAI | FASTER FORWARDTM ©2017 SERVICES ACADEMY Live Stream

    Latency Components Encoding delay First-mile upload CDN propagation Last mile delivery Player buffer D = Segment duration D 0.25xD 1xD 0.25xD 3xD Total 5.5xD 10 2.5 10 2.5 30 10s 50s 2 0.5 2 0.5 6 2s 11s
  8. ©2017 AKAMAI | FASTER FORWARDTM Technology Options for live stream

    delivery ENCODER RTMP CDN PLAYER HLS/DASH 4-6s ENCODER RTMP CDN PLAYER WEBSOCKETS 2-5s ENCODER HLS/DASH CDN PLAYER HLS/DASH 6-8s ENCODER HLS/DASH CMAF LLC CDN PLAYER HLS/DASH CMAF LLC 1-3s ENCODER RTMP CDN PLAYER RTMP 3-5s End-to-end latency at scale ENCODER WebRTC CDN PLAYER WebRTC < 1s
  9. ©2017 AKAMAI | FASTER FORWARDTM Output format comparisons HLS/DASH HLS/DASH

    CMAF LLC WebRTC Playback support in HTML5 NO YES YES YES YES Latency LOW MEDIUM LOW LOW VERY LOW Allows multi-bitrate playback YES YES NO YES NO Supports DRM NO YES YES YES NO Full Control over start-up logic YES MAYBE YES MAYBE NO Quality assured delivery YES YES YES YES NO Cacheable by HTTP servers NO YES NO YES NO RTMP WEBSOCKETS
  10. ©2017 AKAMAI | FASTER FORWARDTM Steps to reduce segmented live

    stream latency 1. Reduce encoding delay • Encoder configuration setting trading quality for speed 2. Reduce segment duration • 2s is stable and good quality. 1s can also be used with little quality degradation for mid-to- low motion scenes. 3. Reduce ingest upload time • Ingest cluster located close to encoding facility 4. Reduce CDN transfer time • CDN mid-tier designed for speed of throughput 5. Reduce last mile RTT • Edge server located close to end-user. 6. Reduce player forward buffer at start-up • Better player design, more conservative ABR rules to lower risk of rebuffering 7. Use CMAF low latency segments, decoupling request units from switching boundaries.
  11. ©2017 AKAMAI | FASTER FORWARDTM CMAF History and Roadmap CMAF

    • Microsoft and Apple, collaborating with MLBAM, Cisco, Akamai and Comcast, presented a proposal to MPEG in Feb 2016 to proposed a new media format which would be common between HLS and DASH. • MPEG approved the establishment of a new standard: • ISO/IEC 23000-20 – Common Media Application Format • This standard moved to final draft status in August 2017.
  12. ©2017 AKAMAI | FASTER FORWARDTM CMAF Core Technologies • ISOBMFF,

    fMP4 container, specifically ISO/IEC 14496-12:201. • Common Encryption (CENC) - ISO/IEC 23001-7: 2016 • Allows both“cenc”and“cbcs”modes of operation • Supports the MPEG codec suite of AVC (ISO/IEC 14496-10), AAC (ISO/IEC 14496-3) and HEVC (ISO/IEC 23008-2) codecs but allow other codecs (such as VP9 or multichannel audio) to be signaled. • Supports captioning and subtitles • WebVTT, TTML IMSC1, CEAx08 • Has a low latency mode of encoding, copied from the DASH broadcast profile.
  13. ©2017 AKAMAI | FASTER FORWARDTM CMAF Box structure * Image

    courtesy Thomas Stockhammer
  14. ©2017 AKAMAI | FASTER FORWARDTM CMAF Low Latency Chunks

  15. ©2017 AKAMAI | FASTER FORWARDTM 1 2 3 4 5

    LIVE Encoder producing 2s segments TIME Start Now 4 Lowest latency 3s latency 2s buffer, 0s startup 5 a 5 b 2s CMAF segments with 500ms chunks 1 a 1 b 1 c 1 d 2 a 2 b 2 c 2 d 3 a 3 b 3 c 3 d 4 a 4 b 4 c 4 d 5 a 5 b 5 c 5 d 6 a 1s latency 1s buffer, 0s startup Latest available 500ms buffer, 1s startup < 500ms latency Deferred playback Segmented Stream Startup with CMAF low latency
  16. ©2017 AKAMAI | FASTER FORWARDTM Chunked contribution MOOF MDAT MOOF

    MDAT MOOF MDAT ENCODER CDN PLAYER MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT POST using TRANSFER-ENCODING GET using TRANSFER-ENCODING HTTP POST HTTP GET
  17. ©2017 AKAMAI | FASTER FORWARDTM Chunked contribution MOOF MDAT MOOF

    MDAT MOOF MDAT ENCODER CDN PLAYER MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT MOOF MDAT
  18. ©2017 AKAMAI | FASTER FORWARDTM Latency Levels: Where should you

    be in 1H18? 10 sec HLS/DASH with 2 sec segments 4-8 sec HLS/DASH with 1 sec segments 1 to 3 sec HLS/DASH with CMAF LLC Source : Wowza / Streaming Media Magazine 0.5 to 1 sec WebRTC JUST DON’T BE HERE Latency - where should you be in 2018?
  19. ©2017 AKAMAI | FASTER FORWARDTM Goodbye 45s! HLS with 1s

    segments (Boston to San Francisco)
  20. ©2017 AKAMAI | FASTER FORWARDTM Goodbye 45s! DASH with 1s

    segments (Boston to San Francisco)
  21. ©2017 AKAMAI | FASTER FORWARDTM Goodbye 45s! WebRTC (Boston to

    San Francisco)
  22. ©2017 AKAMAI | FASTER FORWARDTM CMAF LLC – Paris to

    Stockholm
  23. ©2017 AKAMAI | FASTER FORWARDTM CMAF Ultra Low Latency Demo

    @ EBU BroadThinking 2017 Live webcam (EBU, Geneva) Live Transcoding & CMAF LLC packaging Mapping of CMAF LLCs to HTTP chunks & Origin HTTP service HTTP chunked transfers (Pull) from Origin mpd CMAF LLC Customize d AMD delivery MP4client SIGNALS ~ 600 milliseconds glass to glass latency STREAM SPECS H.264 SBR 720p @ 1.5Mbps 2 sec GOPs, 25fps 6 sec CMAF segments 40ms CMAF chunks (1 frame) EBU, Geneva
  24. ©2017 AKAMAI | FASTER FORWARDTM CMAF Low Latency Chunks Tokyo

    to San Francisco, < 1s
  25. ©2017 AKAMAI | FASTER FORWARDTM Key Summary LOW LATENCY 1.Smaller

    fragment sizes automatically reduce the hand-waving latency for segmented media. 2.Low latency requires modified player behavior for startup and buffer management 3.Player startup behavior is a large contributor to overall latency 4.CMAF Low Latency Chunks have a great potential for reaching Low Latency at scale, with cacheable content that is compatible with existing HTTP CDNs. 5.WebRTC, if it were scaled out to a broadcast network, offers the potential for robust sub-second streaming.
  26. ©2017 AKAMAI | FASTER FORWARDTM Creative use of live delay

    by the “The Academic” https://www.youtube.com/watch?v=lO9d-AJai8Q Copyright: The Academic
  27. Thank you for your time. Questions?