Apple Low-Latency HLSを使った 超低遅延配信について

Cb4d62dd7c1d325863696c45e9b6484d?s=47 Shumpei Urabe
September 12, 2020

Apple Low-Latency HLSを使った 超低遅延配信について

iOSDC Japan 2020
https://iosdc.jp/2020/

Cb4d62dd7c1d325863696c45e9b6484d?s=128

Shumpei Urabe

September 12, 2020
Tweet

Transcript

  1. Apple Low-Latency HLSΛ࢖ͬͨ ௒௿஗Ԇ഑৴ʹ͍ͭͯ 2020.09.21 ߹ಉձࣾφΫα
 ઎෦ ॡฏ

  2. ࣗݾ঺հ ઎෦ ॡฏ • ߹ಉձࣾφΫαɹ୅ද • iPhoneͱPixel 4Λ࣋ͪา͘ਓ • iOSͱAndroidΛ͜Αͳ͘Ѫ͍ͯ͠Δ

  3. ࠶ੜ஗Ԇʹ͍ͭͯ )551-JWF4USFBNJOH $PNNVOJUZ-PX-BUFODZ)-4 $PNNPO.FEJB"QQMJDBUJPO'PSNBU ΋͘͡ "QQMF-PX-BUFODZ)-4ʹ͍ͭͯ "QQMF-PX-BUFODZ)-4ͷ࢓༷ "71MBZFSͰ"QQMF--)-4Λࢼ͢

  4. ࠶ੜ஗Ԇʹ͍ͭͯ 1.

  5. ஗Ԇ ഑৴ऀ Τϯίʔυ ωοτϫʔΫ σίʔυ ࢹௌऀ 75$PNQSFTTJPO4FTTJPO 75%FDPNQSFTTJPO4FTTJPO 1BDLFU-PTT +JUUFS

    /"54FTTJPO 'JSFXBMM
  6. ஗Ԇ ഑৴ऀ Τϯίʔυ ωοτϫʔΫ σίʔυ ࢹௌऀ 75$PNQSFTTJPO4FTTJPO 75%FDPNQSFTTJPO4FTTJPO 1BDLFU-PTT +JUUFS

    /"54FTTJPO 'JSFXBMM 55ms - 10sec 5ms-100ms 15ms-2sec
  7. w όοΫϘʔϯωοτϫʔΫ஗Ԇ w #(1ʹΑΔܦ࿏޿ใͰɺҰ෦ܦ࿏ʹো֐͕ൃੜͯ͠ϑΣΠϧΦʔόʔ΍ΠϯλʔωοτΤΫενΣϯδͷ᫔᫓ w *41͔Βࢹௌऀ·Ͱͷ஗Ԇ w ϑϨοπ/(/ͷ10* 111P& ͷ᫔᫓ɺޫͷ఻ૹ଎౓ɺ௨৴ܦ࿏ͷύέοτϩε

    w Τϯίʔυɾσίʔυ஗Ԇ w ෳࡶੑ͕ߴ·ΔΞϧΰϦζϜʹͳΕ͹ͳΔ΄ͲɺΤϯίʔυ΍σίʔυ͕஗ΕΔ w ࠶ੜόοϑΝϦϯά w ࠶ੜ͢Δ·Ͱ͋Δఔ౓όοϑΝΛͨΊΔ͕ɺόοϑΝ͕ͳ͘ͳͬͯ͘ΔͱɺҰ࣌ఀࢭ͠ɺόοϑΝ͕ͨΊऴΘΔ·Ͱ଴ͭ w $%/໰୊ w $%/ΛڬΉ৔߹ɺ$%/͸ΦϦδϯ͔Βऔಘ͠ɺΩϟογϡ͞ΕΔ·ͰԠ౴Λฦ͞ͳ͍৔߹ʹ஗Ԇ͢Δ ͳͥ஗Ԇ͢Δͷ͔
  8. HTTP Live Streaming 2.

  9. w "QQMF͕։ൃ w 3'$ͱͯ͠ඪ४Խ w NVͷϓϨΠϦετͰ഑৴ w .1&(54'SBHNFOUFE.1 HTTP Live

    Streaming .BTUFS1MBZMJTU .FEJB1MBZMJTU 4FHNFOU 4FHNFOU .FEJB1MBZMJTU 4FHNFOU 4FHNFOU .FEJB1MBZMJTU MJTUNV QNV UT UT QNV UT UT QNV
  10. w "71MBZFSͩͱ࠷௿ͭηάϝϯτΛ ઌʹಡΈࠐΉඞཁ͕͋Δ w ηάϝϯτ͕શ෦ಡΈऴΘΒͳ͍ͱ ࠶ੜͰ͖ͳ͍ HTTP Live Streaming .BTUFS1MBZMJTU

    .FEJB1MBZMJTU 4FHNFOU 4FHNFOU .FEJB1MBZMJTU 4FHNFOU 4FHNFOU .FEJB1MBZMJTU MJTUNV QNV UT UT QNV UT UT QNV
  11. Community Low-Latency HLS 3.

  12. w 1FSJTDPQFࣾ 5XJUUFS ͕ఏҊ w 54ϑΝΠϧΛ)551Ͱ$IVOLFE 5SBOTGFS&ODPEJOH $5& ͢Δ͜ͱͰઌʹ ΫϥΠΞϯτଆͰड͚औΕΔ

    w ࣍ͷηάϝϯτ͕Τϯίʔυ͢ΔલʹϚχ ϑΣετʹॻ͘ Community LL-HLS .BTUFS1MBZMJTU .FEJB1MBZMJTU 4FHNFOU 4FHNFOU 1MBZ 1MBZ MJTUNV QNV UT $MJFOU UT $MJFOU $IVOL $IVOL
  13. w ͜ͷΞϓϩʔν͸౰ֵ໋࣌తͩͬͨ w ͜ΕΛ͖͔͚ͬʹ&95913&'&5$)͕ ੜ·Εͨ w ͜ΕʹΑΓɺΫϥΠΞϯτͷόοϑΝϦϯ άͱηάϝϯτͷऔಘΛಉ࣌ʹߦ͑ΔΑ͏ ʹͳͬͨ Community

    LL-HLS .BTUFS1MBZMJTU .FEJB1MBZMJTU 4FHNFOU 4FHNFOU 1MBZ 1MBZ MJTUNV QNV UT $MJFOU UT $MJFOU $IVOL $IVOL
  14. Common Media Application Format 4.

  15. w ͜Ε·Ͱ"QQMF)-4ͷଞʹ*40ඪ४ͷ.1&(%"4)ͱ͍͏ϑΥʔ Ϛοτ͕͋ͬͨ w ͜ΕΒͷϑΥʔϚοτΛ౷Ұ͢ΔͨΊʹ$PNNPO.FEJB "QQMJDBUJPO'PSNBU $."' ͕ࡦఆ͞Εͨ w $."'Ͱ͸ɺ*40#BTF.FEJB'JMF'PSNBU

    *40#.'' ͕࢖ΘΕ Δ͜ͱ͕ܾΊΒΕ͓ͯΓɺ)-4΍%"4)Ͱ͸GSBHNFOUFE.1͕࢖ ΘΕ͍ͯΔ w $."'ʹΑΓɺ)-4ͱ%"4)Ͱಉ͡ηάϝϯτΛ࢖͏͜ͱ͕Ͱ͖ɺ ϚχϑΣετΛม͑Δ͚ͩͰ྆ํରԠ͢Δ͜ͱ͕Մೳʹͳͬͨ Common Media Application Format .BTUFS1MBZMJTU .FEJB1MBZMJTU *OJUJBM4FHNFOU 4FHNFOU 4FHNFOU .FEJB1MBZMJTU 4FHNFOU 4FHNFOU MJTUNV QNV NT QNV NT JOJUNT NT NT
  16. w $."'Ͱ͸ɺνϟϯΫͱݺ͹ΕΔηάϝϯτΑΓ΋ࡉ͔͍֓ ೦͕ఆٛ͞Ε͍ͯΔ w νϟϯΫ͸ɺ)551ͷ$IVOLFE5SBOTGFS&ODPEJOHΛ࢖ ͍ɺΤϯίʔυ௚ޙͷσʔλΛଈΫϥΠΞϯτʹૹͬͯɺ νϟϯΫΛ࠶ੜ͢Δ͜ͱͰ஗ԆΛݮΒ͢͜ͱ͕Ͱ͖ΔΑ͏ʹ ͳͬͨ w ͜ͷ࢓૊Έ͸ઌ΄Ͳͷ$PNNVOJUZ-PX-BUFODZ)-4ͷӨڹ

    Λେ͖͘ड͚͍ͯΔ CMAF Chunk GUZQ NPPW NWIE USBL NEBU NPPG NGIE USBG 7JEFP%BUB 'SBHNFOUFE.1 ॳظԽηάϝϯτ JOJUNT ηάϝϯτϑΝΠϧ NT
  17. Apple Low-lantecy HLS 5.

  18. w 88%$Ͱൃදɻඪ४Խ͸͞Ε͓ͯΒͣɺ ESBGUQBOUPTIMTSGDCJTͱͯ͠ެ։ɻ w ௕͍ͷͰɺ"QQMF--)-4΍"-)-4ͳͲͱ΋ݺ͹ΕΔ w ͜Ε·Ͱͷ)-4͔Βେ෯ʹ࢓༷มߋ͞Εͨ w ैདྷͷ)-4ͱͷେ͖ͳҧ͍͸ɺϚχϑΣετʹ 1BSUJDBM4FHNFOU͕هࡌ͞Ε͍ͯΔ

    w ͜ΕʹΑΓɺΫϥΠΞϯτ͸Τϯίʔυ௚ޙͷηά ϝϯτΛऔಘՄೳʹͳͬͨ Apple Low-Latency HLS .BTUFS1MBZMJTU .FEJB1MBZMJTU 1BSUJDBM4FHNFOU @UT 1MBZ 1MBZ 1BSUJDBM4FHNFOU @UT 1BSUJDBM4FHNFOU @UT 1BSUJDBM4FHNFOU @UT 1BSUJDBM4FHNFOU @UT 1BSUJDB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:&4Λૠೖ͢Δ EXT-X-PART Video Tech Deep-Dive: Live Low Latency Streaming Part 3 - Low-Latency HLS (https://bitmovin.com/live-low-latency-hls/)͔ΒҾ༻
  23. w "QQMF--)-4ͷൃද౰ॳɺ)551ͷαʔόϓογϡΛ࢖͍ɺϓϨΠϦετͱ ηάϝϯτΛૹΔඞཁ͕͋ͬͨ w ͔͠͠ɺ)551ͷαʔόϓογϡʹରԠ͢Δʹ͸ΠϯϑϥࣗମΛมߋͤ͟Δ ಘͳ͍ঢ়گͰ͋ΔͨΊɺ൷൑͕૬͍࣍ͩ HTTP/2 PUSH(DEPRECATED)

  24. w "QQMF͸೥݄ɺαʔόϓογϡΛཁ͔݅ Β࡟আ͠ɺ৽ͨʹ&95913&-0"%)*/5Λ௥ Ճͨ͠ w 1BSUJDBM4FHNFOU͕ར༻ՄೳʹͳΔ৔߹ɺ 1SFMPBE͢Δ͜ͱͰ1BSUJDBM4FHNFOU͕ಡΈࠐ Μͩॠؒʹ࠶ੜͰ͖ΔΑ͏ʹ४උ͓ͯ͘͜͠ͱ ͕Մೳʹͳͬͨ EXT-X-PRELOAD-HINT(NEW)

    Video Tech Deep-Dive: Live Low Latency Streaming Part 3 - Low-Latency HLS (https://bitmovin.com/live-low-latency-hls/)͔ΒҾ༻
  25. w )-4Λ഑৴͢Δαʔόʹରͯ͠ɺΫϥΠΞϯτ ͕Ͳ͏͍ͬͨ৚݅Ͱऔಘ͍͔ͨ͠αʔόʹ௨஌ Ͱ͖ΔΑ͏ʹͳͬͨ w ΫϥΠΞϯτ͸)-4ͷϓϨΠϦετʹӈͷΑ͏ ʹಛघͳΫΤϦύϥϝʔλΛ௥Ճ͢Δ͜ͱͰ αʔόʹରͯ͠ɺ&9594&37&3$0/530- Λཁٻ͢Δ͜ͱ͕Ͱ͖Δ EXT-X-SERVER-CONTROL

    @)-4NTO @)-4QBSU OVNCFS ࢦఆ͞Εͨηάϝϯτͷ ൪߸ΛؚΉϓϨΠϦετ Λऔಘ @)-4@TLJQ :&4 ࠩ෼ߋ৽Λ༗ޮʹͯ͠ɺ ݱࡏͷϓϨΠϦετ͔Β ͷࠩ෼͚ͩૹ৴͢Δ
  26. w $"/#-0$,3&-0"%:&4 w ෦෼ηάϝϯτ͕ར༻ՄೳʹͳΔ·ͰɺΫϥΠΞϯτ͸ϚχϑΣετΛߋ৽͠ͳ͍ w $"/4,*16/5*- w ඵ·ͰͷηάϝϯτΛεΩοϓ͢Δ w 1"35)0-%#"$,

    w ࠷ޙ͔Βඵલͷ1BSUJDBM4FHNFOUΛ࠶ੜ͢Δɻͨͩ͠*ϑϨʔϜ͔Β࢝·Δඞཁ͕͋ΔͷͰɺͦͷதͰ*ϑϨʔ Ϝ͕͋Δηάϝϯτ͕બ͹ΕΔɻ Ωϟογϡώοτ޲্ EXT-X-SERVER-CONTROL
  27. w &9594,*1Λ࢖͏ͱɺࢦఆ͞ΕͨηάϝϯτΑΓ΋લͷ΋ͷ͸࠶ ੜ͠ͳ͍ w &9594,*14,*11&%4&(.&/54 w ͭલͷηάϝϯτ͸εΩοϓ͢Δ EXT-X-SKIP

  28. w &9593&/%*5*0/3&1035͸ϨϯσΟγϣϯʹؔ͢Δ৘ใΛ௨ ஌ͯ͘͠ΕΔ w 63*͸ϓϨΠϦετͷ63* w -"45.4/͸࠷ޙͷ1BSUJDBM4FHNFOUͷ൪߸ w -"451"35͸ύʔτΠϯσοΫε w

    ͜ΕΛ࢖͏ͱɺผͷϨϯσΟγϣϯΛ࠶ੜ͢ΔࡍʹϚελʔϓϨ ΠϦετΛݟʹߦ͔ͳͯ͘΋͙͢ʹ࠶ੜ͢Δ͜ͱ͕Ͱ͖Δ EXT-X-RENDITION-REPORT Video Tech Deep-Dive: Live Low Latency Streaming Part 3 - Low-Latency HLS (https://bitmovin.com/live-low-latency-hls/)͔ΒҾ༻
  29. AVPlayerͰApple LL-HLSΛࢼ͢ 7.

  30. w J04Ͱ͸ɺFOUJUMFNFOUʹ DPNBQQMFEFWFMPQFSDPSFNFEJBIMTMPXMBUFODZFOUJUMFNFOU Λ௥Ճ͢Δඞཁ͕͋Δ w ௥Ճ͢Δͱɺ$FSUJGJDBUFT *EFOUJGJFS1SPGJMFTʹ-PX-BUFODZ )-4͕ग़ݱ͢Δ w ͜ΕʹΑͬͯɺ"71MBZFSͰ"QQMF--)-4͕༗ޮʹͳΔ

    w 4BGBSJͰ͸࠶ੜ͢Δ͜ͱ͕Ͱ͖ͳ͍ iOS 13Ͱࢼ͢ʹ͸
  31. w 'SBHNFOUFE.1͸࠶ੜͰ͖ͳ͍ w "QQMF--)-4͸.1&(54ͷΈαϙʔτ͍ͯ͠Δ w 1BSUJDBM4FHNFOU͕୹͗͢Δͱ࠶ੜͰ͖ͳ͍ w ө૾ͱԻ੠͕ਖ਼͘͠ಉظ͠ͳ͍ʢԻζϨ͢Δʣ ط஌ͷ໰୊

  32. w ඪ४Ͱαϙʔτ͞Ε͍ͯ·͢ w 8FC,JU΋αϙʔτͨ͠ͷͰɺ"-)-4Λ4BGBSJͰ࠶ੜͰ͖·͢ iOS 14Ҏ߱

  33. w IUUQTMMIMTUFTUBQQMFDPNNBTUFSNV w Իྔ஫ҙ Apple LL-HLSͷσϞ

  34. w "QQMF-PX-BUFODZ)-4͸·ͩ·ͩൃల్্ w ཧ༝͸ରԠ͕ͱͯ΋େมɻ"QQMF͸΍Δؾ͕ͩۀքͱͯ͠͸"QQMFσόΠεҎ֎͸$."'6--Ͱे෼ͳؾ΋ɻ w 8PX[BͳͲɺଟ͘ͷओཁϕϯμʔͰ͸αϙʔτ༧ఆ w /"9"΋αϙʔτؤு͍ͬͯ·͢ʂ w "QQMF-PX-BUFODZ)-4ΛରԠͨ͠࿩Λͨ͘͞Μฉ͖͍ͨͷͰɺօ͞Μϒϩάͱ͔ʹॻ͍͍ͯͩ͘͞ʂ

    ·ͱΊ