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

Go and on-demand video streaming / Goとオンデマンド動画配信

Go and on-demand video streaming / Goとオンデマンド動画配信

Lecture at university of Aizu / 2017/12/10

Seiji Takahashi

December 13, 2017
Tweet

More Decks by Seiji Takahashi

Other Decks in Programming

Transcript

  1. • Seiji Takahashi • Github: timakin / Twitter: @__timakin__ •

    גࣜձࣾσΟʔɾΤψɾΤʔ • Perl / JavaScript • גࣜձࣾτϥϯεϦϛοτ • C++ (Cocos-2dx) • גࣜձࣾGunosy ৽نࣄۀ։ൃࣨ • Go / Swift ࣗݾ঺հ
  2. Go͕ؔΘΔͱ͜Ζ ө૾ॲཧ • ఏڙը࣭ʹ߹ΘͤͨϑϨʔϜ/ϏοτϨʔτͷௐ੔ • ϩεΛ཈͑ͨѹॖ ύοέʔδԽ • m3u8 +

    TSϑΝΠϧͷੜ੒ • ετϨʔδ΁ͷΞοϓϩʔυ ഑৴ • ಈըͷJSONΛฦ͢௨ৗͷAPIػೳ • αϜωΠϧ΍ؔ࿈ಈըੜ੒
  3. HLS഑৴ • HTTP Live Streaming • Apple͕iOS޲͚ʹ։ൃͨ͠ετϦʔϛϯάϓϩτίϧ • WindowsͳͲ͸࠶ੜ؀ڥ͕ݶఆ •

    ϫʔΫϑϩʔ • ಈըίϯςϯπͷΞοϓϩʔυ • ηάϝϯτԽ • ಉ࣌ʹαϜωΠϧੜ੒΍഑৴඼࣭ผͷੜ੒ͳͲ΋ • IndexFile(m3u8)Λ഑৴ͯ͠ɺΫϥΠΞϯτ͸
 ΠϯσοΫε͞ΕͨMPEG-2 TSϑΝΠϧΛಡΈʹߦ͘
  4. ffmpeg-based API • Docker multi-stage buildͰੜ੒͞ΕͨimageΛݩʹɺ execܦ༝ͰffmpegΛݺͿɻ • binding࣮૷͔ίϚϯυͷexecuteͰݺͿ΄͔ͳ͍ɻ •

    ݸਓతʹ͸GKEͰ্هimageΛݩʹͨ͠ίϯςφΛཱͯ ͯɺੜ੒݁ՌΛGoogle Cloud StorageʹΞοϓϩʔυ͢ ΔͳͲ͕ྑ͍ͱࢥͬͯΔɻ