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

HLS/CDN Streaming inside out

Ching Yi Chan
January 11, 2017
110

HLS/CDN Streaming inside out

Ching Yi Chan

January 11, 2017
Tweet

Transcript

  1. About Me • qrtt1 • a java programmer for backend

    service • one of the organizers for TWJUG • Info • https://github.com/qrtt1 • http://www.codedata.com.tw/author/qrtt1 • https://www.meetup.com/taiwanjug/
  2. 傳統串串流協定 h Ꮄᓃ • 即時性佳(latency ⼩小) h ॹᓃ • 受限於

    Media Server,導致不易易 scale out • Client 端需要特殊播放程式(Flash Player 或 Native Library) • 其它(firewall issue)
  3. 串串流協定的轉變 • 向標準靠攏 • ISO base media file format •

    mp4, mpeg-ts, mf4 container • decoder 能⽀支硬體加速 • {h264, h265}/ aac codec *6/.XKFGQ  /GFKC5QWTEG'ZVGPUKQP K15#PFTQKF0CVKXG5WRRQTV
  4. 串串流協定的轉變 • 無狀狀態化 • 去除 session layer 的設計 • transport

    layer 向 HTTP 靠攏 • HTTP Based Protocol • HLS • MPEG-DASH • Smooth Streaming • HDS (Adobe HTTP Dynamic Streaming) 䶬㾶楃 VOD ⛑䍄Ⰸ⟆Ⰸ MyVideo FriDay ㉒櫔--68 twitch, livehouse.in
 LiTV
  5. HLS
 HTTP Live streaming #EXT-X-VERSION:3 #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE:1 # Old-style

    integer duration; avoid for newer clients. #EXTINF:10, http://media.example.com/segment0.ts # New-style floating-point duration; use for modern clients. #EXTINF:10.0, http://media.example.com/segment1.ts #EXTINF:9.5, http://media.example.com/segment2.ts #EXT-X-ENDLIST 81&2NC[NKUV from Ref [3]
  6. HLS
 HTTP Live streaming #EXTM3U #EXT-X-VERSION:6 #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE:26 #EXTINF:9.901, http://media.example.com/wifi/segment26.ts

    #EXTINF:9.901, http://media.example.com/wifi/segment27.ts #EXTINF:9.501, http://media.example.com/wifi/segment28.ts #EXT-X-ENDLIST .KXG2NC[NKUV .KXG2NC[NKUV㽳㧪':6:'0&.+56 䡗2NC[NKUV㧕㢑苌5'37'0%'槡  from Ref [3]
  7. HLS Recap New in 2016
 HTTP Live streaming from Ref

    [4] • MPEG-4 Fragment Support in HLS (DGVC) • 應該是感受到 MPEG-DASH 帶來來的壓⼒力力 • MP4 比起 MPEG-TS 要精實,佔較少空間
  8. HLS Recap New in 2016
 HTTP Live streaming from Ref

    [4] • Offline HLS • ⼿手機開航空模式時很需要! • ⽀支援離線加解密驗證
  9. HLS
 HTTP Live streaming • Tools • HTTP Live Streaming

    Tools http://apple.co/ 2haDPJ5 • FFMpeg • Cloud Service • Zencoder • wowza on {AWS, AZURE, GCP} • AWS Elastic Transocder
  10. HLS
 HTTP Live streaming .KXG&GOQHQT.KXG*662.KXG5VTGCOKPI • Twitch’s HLS
 https://www.youtube.com/watch? v=uLmMPdYEnbg&feature=youtu.be

    • HLS tips for latency tuning • segment duration • Group of pictures -G[HTCOGKPVGTXCNU 'PEQFGT 5GIOGPVGT
  11. Reference • [1] 如何实现1080P延迟低于500ms的实时超清直播传输技术 http://bit.ly/ 2gYs6Ig • [2] HTTP Live

    Streaming Overview http://apple.co/2h6Jyh7 • [3] About HTTP Live Streaming http://apple.co/2idzAIF • [4] What's New in HTTP Live Streaming http://apple.co/2harYKX