More Related Content Similar to The Road to Ultra Low Latency (20) More from Akamai Developers & Admins (20) The Road to Ultra Low Latency1. © AKAMAI - EDGE 2017
The Road to Ultra Low Latency Streaming
Phillip Harrison, Enterprise Media Architect
2. © AKAMAI - EDGE 2017
What we’ll cover
Where latency stands today
Where the road diverges
What technology is coming next
Demo
3. © AKAMAI - EDGE 2017
1. Start up time does not impact latency and vice versa.
2. Hand wave latency is the sum total of many delays in the live workflow chain.
3. The player chooses the start position and then builds the buffer to the live edge.
4. Multicast, WebRTC, UDP technologies complement low latency.
5. Low latency is always a trade-off between quality and latency.
But first some definitions…
4. © AKAMAI - EDGE 2017
Other areas to Optimise…
Encoding Shift encoder priority to from quality to latency optimisation
Packaging Use smaller segment sizes
Ingest Ensure ingest server is close to encoding facility
CDN Optimise CDN mid-tier for fast transfers
Last Mile Ensure server close to end users for short round trip time
Player Optimise start-up buffer logic to be as close to live as possible
5. © AKAMAI - EDGE 2017
IPP Encoding
• Encoding with zero input buffering:
• I-Frame and P-frames only (No B-Frames)
• Encoder should output frame as soon as CPU has encoded
• Higher input framerates will lead to lower encoding latency. Use 50/60p if possible.
6. © AKAMAI - EDGE 2017
Encoding
delay
First-mile
upload CDN propagation
Last mile
delivery
Player
buffer
D = Segment duration
Min(1xD, 5) 0.25xD 1xD 0.25xD 3xD
Total
5.5xD
5 2.5 10 2.5 3010s 50s
2 0.5 2 0.5 62s 11s
Why use short segments?
7. © AKAMAI - EDGE 2017
2 Second
Segment sizes
10 Second
Segment sizes
1 Second
Segment
sizes? Graphic Credit: Wowza
8. © AKAMAI - EDGE 2017
• Future Proof
• Described my m3u8 or MPD
• Sub Segment Feature
• Efficient
• High compatibility
• Generally only m3u8
• No Sub segment
• Redundant data
9. © AKAMAI - EDGE 2017
CMAF Sub Segment
moof mdat
Encoder output
timestamp
mdatmoof moof moof moof moof
Encoder output
timestamp
Encoder output
timestamp
Encoder output
timestamp
Encoder output
timestamp
Encoder output
timestamp
6 Second Segment with 1 Fragment (1 moof + 1 mdat)
6 Second Segment with 6 Fragments (6 moof + 6 mdat)
10. © AKAMAI - EDGE 2017
HTTP/1.1 200 OK
Content-Type: video/mp4
Transfer-Encoding: chunked
4C4B4
��X�SS�����X�ST0����ґm��1^#ů���U
�)�p��sj!�)CN|,R*��w�KO|�Z*�
4C4B4
�������X�US�����X�UT0����ґm��1
^#ů�鲧U�)�p��•
��X�SS���
�)�p�
��
^#ů
4C4B4
��X�SS�����X�ST0����ґm��1^#ů���U
�)�p��sj!�)CN|,R*��w�KO|�Z*�
4C4B4
�������X�US�����X�UT0����ґm��1
^#ů�鲧U�)�p��•
4C4B4
��X�SS�����X�ST0����ґm��1^#ů���U
�)�p��sj!�)CN|,R*��w�KO|�Z*�
��X�SS���
�)�p�
GET /ull/v_0_640x360-1507596336.m4s HTTP/1.1
User-Agent: curl/7.37.
Host: pharriso.akamaized.net
Accept: */*
HTTP Chunked Transfer Encoding
11. © AKAMAI - EDGE 2017
HTTP Chunked Transfer Encoding
Upload SubSegments to CDN while Segment is still being created
ENCODER INGEST ORIGN CDN PLAYER
Creates 1s segments with 500ms
SubSegments (Fragments) and
uploads via HTTP Chunked Transfer
Encoding Bytes streamed to multiple Live
Origins
Player requests segment that is still
being encoded
Request goes forward to Origin
Origin streams bytes to Edge
Bytes streamed to client and object
stored in cache once complete
12. © AKAMAI - EDGE 2017
Seconds in the buffer
0
1
2
3
4
5
6
7
QUIC+H2+Fetch API Standard
14. © AKAMAI - EDGE 2017
Summary
Fragmented MP4 (CMAF)
Chunked Transfer Encoding
Fetch API, H2, QUIC
MPEG-DASH
15. © AKAMAI - EDGE 2017
Manifest at the Edge
#EXTM3U
#EXT-X-TARGETDURATION:1
#EXT-X-VERSION:7
#EXT-X-MEDIA-SEQUENCE:1503290621
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="v_0_640x360-init.mp4”
#EXTINF:1,
#EXT-X-PROGRAM-DATE-TIME:2017-08-21T04:43:40.00+0000
v_0_640x360-1503290620.m4s
#EXTINF:1,
#EXT-X-PROGRAM-DATE-TIME:2017-08-21T04:43:41.00+0000
v_0_640x360-1503290621.m4s
#EXTINF:1,
#EXT-X-PROGRAM-DATE-TIME:2017-08-21T04:43:42.00+0000
v_0_640x360-1503290622.m4s
Now
Now
Now -1
Now +1