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

ピクシブの大規模ライブ配信 / ImageFlux Live

ImageFlux
January 26, 2018

ピクシブの大規模ライブ配信 / ImageFlux Live

ImageFlux meetup #1
MICHII Shunsuke, pixiv Technologies Inc.
2018-01-25

ImageFlux

January 26, 2018
Tweet

More Decks by ImageFlux

Other Decks in Technology

Transcript

  1. ImageFlux Live ഑৴ऀ ImageFlux Live WebRTC HLS ࢹௌऀ • WebRTCετϦʔϜͰड͚औͬͨಈըΛHLSʹม׵ͯ͠഑৴

    • HLSܗࣜʹม׵͢Δ͜ͱͰɺ઀ଓ਺Λؾʹͤͣେن໛഑৴͕Մೳ • WebRTCͳͷͰ௿஗Ԇɺ͔ͭHLSͳͷͰେن໛഑৴Ͱ͖Δʂ
  2. HLS (HTTP Live Streaming) .m3u8 hls0.ts hls1.ts hls2.ts ϓϨΠϦετϑΝΠϧ ಈըετϦʔϜϑΝΠϧ

    #EXTM3U #EXT-X-TARGETDURATION:3 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:3.00000, hls0.ts #EXTINF:3.00000, hls1.ts #EXTINF:3.00000, hls2.ts ϑΝΠϧͷ௕͞
  3. HLS (HTTP Live Streaming) .m3u8 hls0.ts hls1.ts ϓϨΠϠʔ #EXTM3U #EXT-X-TARGETDURATION:3

    #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:3.00000, hls0.ts #EXTINF:3.00000, hls1.ts ϙʔϦϯά
  4. HLS (HTTP Live Streaming) .m3u8 hls0.ts hls1.ts ϓϨΠϠʔ ϙʔϦϯά #EXTM3U

    #EXT-X-TARGETDURATION:3 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:3.00000, hls0.ts #EXTINF:3.00000, hls1.ts
  5. HLS (HTTP Live Streaming) .m3u8 hls0.ts hls1.ts hls2.ts ϓϨΠϠʔ #EXTM3U

    #EXT-X-TARGETDURATION:3 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:3.00000, hls0.ts #EXTINF:3.00000, hls1.ts #EXTINF:3.00000, hls2.ts ϙʔϦϯά
  6. HLS (HTTP Live Streaming) .m3u8 hls0.ts hls1.ts hls2.ts ϓϨΠϠʔ #EXTM3U

    #EXT-X-TARGETDURATION:3 #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:3.00000, hls0.ts #EXTINF:3.00000, hls1.ts #EXTINF:3.00000, hls2.ts ϙʔϦϯά
  7. γεςϜߏ੒ Transcoder Transcoder Transcoder RTP stream Stream
 Manager Msgpack
 stream

    TS TS TS ഑৴ऀ WebRTC
 SFU WebRTC API Transcoder: H.264/AVC, OpusετϦʔϜΛ τϥϯείʔυ͠ɺMPEG2-TS ʹmuxingͯ͠ग़ྗ Stream Manager: Transcoderͷϓϩηε؅ཧ
 RTPετϦʔϜΛύʔε͠ɺॱং ੍ޚΛߦͬͯTranscoderʹ͓͘Δ Transcoder͕ग़ྗͨ͠TSϑΝΠϧ ΛHLSʹه࿥ API: ετϦʔϜΛ࢝ΊΔAPI ·ͩαʔϏε࢓༷͕ܾ·͍ͬͯ·ͤΜ
  8. WebRTC SFU • WebRTC SFU / ηογϣϯ؅ཧʹWebRTC SFU SoraΛ࠾༻ •

    Sora͕ղআͨ͠RTPετϦʔϜΛStream Managerʹసૹ RTP stream WebRTC
 SFU WebRTC
  9. Stream Manager Transcoder Stream
 Manager RTP stream UDP HTTP API

    TCP • GoͰॻ͔Εͨγϯάϧϓϩηεαʔό • ඞཁͳ਺ͷTranscoderϓϩηεΛىಈ • RTPετϦʔϜΛσίʔυɺύʔεͯ͠Msgpackʹ٧Ί௚ͯ͠τϥϯείʔμʹసૹ • RTPετϦʔϜ͸UDPͷͨΊॱং੍ޚɺόοϑΝϦϯά͕ඞཁʹͳΔ Msgpack