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

Happy video transcoding with ElasticTranscoder

Happy video transcoding with ElasticTranscoder

AWS Casual Talks #3

Yoshiori SHOJI

October 31, 2014
Tweet

More Decks by Yoshiori SHOJI

Other Decks in Technology

Transcript

  1. )-4ʹ͍ͭͯ ΠϯσοΫεϑΝΠϧ NV  &YUFOEFE.6 #EXTM3U #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-ALLOW-CACHE:YES #EXT-X-TARGETDURATION:13

    #EXTINF:12.074367, hls_hi00000.ts #EXTINF:9.025267, hls_hi00001.ts #EXTINF:9.025611, hls_hi00002.ts #EXTINF:12.021333, hls_hi00003.ts #EXTINF:9.018667, hls_hi00004.ts #EXTINF:9.019011, hls_hi00005.ts #EXTINF:12.014733, hls_hi00006.ts #EXTINF:7.317022, hls_hi00007.ts #EXT-X-ENDLIST http://ja.wikipedia.org/wiki/M3U
  2. )-4ʹ͍ͭͯ .m3u8 .m3u8 .m3u8 .m3u8 .ts .ts .ts .ts .ts

    .ts .ts .ts .ts .ts .ts .ts ͭͷಈըͷߏ੒
  3. ヨシオリ プログラマ せいべつ:おとこ レベル: 39 HP: 128 MP: 256 E

    Mac E HHKPro E ATOM E zsh 1952G ちから: すばやさ: たいりょく: かしこさ: うんのよさ: こうげき力: しゅび力: 22 34 15 52 90 605 1
  4. CAUTION CAUTION CAUTION CAUTIO ON CAUTION CAUTIO AWS 触ったの4月くらい からだし

    マジカジュアルです >< http://twitpic.com/e1fwa4
  5. ಈ ը ΍ Δ ʙ ͸ ʙ ͍ ͱ Γ

    ͋ ͑ͣ ͳ Δ ΂ ͘  " 1 1  α ʔ ό ʹ ͸ ϑ Ν Πϧ ͷ స ૹ ͞ ͤ ͨ ͘ ͳ ͍ Ͷ ʙ ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ
  6. ಈ ը ΍ Δ ʙ ͸ ʙ ͍ ͱ Γ

    ͋ ͑ͣ ͳ Δ ΂ ͘  " 1 1  α ʔ ό ʹ ͸ ϑ Ν Πϧ ͷ స ૹ ͞ ͤ ͨ ͘ ͳ ͍ Ͷ ʙ 4   ͔ Β  $ % /  ௚ ઀ ͍ ͚ · ʔ ͢ ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ
  7. ಈ ը ΍ Δ ʙ ͸ ʙ ͍ ͱ Γ

    ͋ ͑ͣ ͳ Δ ΂ ͘  " 1 1  α ʔ ό ʹ ͸ ϑ Ν Πϧ ͷ స ૹ ͞ ͤ ͨ ͘ ͳ ͍ Ͷ ʙ 4   ͔ Β  $ % /  ௚ ઀ ͍ ͚ · ʔ ͢ ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ ͓ ɺ ͡ Ό ͊ ͦ ΕͰ ʂ  Ξ ο ϓ ϩ ʔ υ ͸ ྲྀ ੴ ʹ ೝ ূ ͋ Δ ͠  Ұ ୴ " 1 1  α ʔ ό Ͱ ड ͚ ͳ ͖ Ό ͔ ͳ ͊
  8. ಈ ը ΍ Δ ʙ ͸ ʙ ͍ ͱ Γ

    ͋ ͑ͣ ͳ Δ ΂ ͘  " 1 1  α ʔ ό ʹ ͸ ϑ Ν Πϧ ͷ స ૹ ͞ ͤ ͨ ͘ ͳ ͍ Ͷ ʙ 4   ͔ Β  $ % /  ௚ ઀ ͍ ͚ · ʔ ͢ ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ ͓ ɺ ͡ Ό ͊ ͦ ΕͰ ʂ  Ξ ο ϓ ϩ ʔ υ ͸ ྲྀ ੴ ʹ ೝ ূ ͋ Δ ͠  Ұ ୴ " 1 1  α ʔ ό Ͱ ड ͚ ͳ ͖ Ό ͔ ͳ ͊ 4 5 4  ࢖ ͑ ͹ ߦ ͚ Δ ͱ ࢥ ͍ · ͢ ʂ
  9. ಈ ը ΍ Δ ʙ ͸ ʙ ͍ ͱ Γ

    ͋ ͑ͣ ͳ Δ ΂ ͘  " 1 1  α ʔ ό ʹ ͸ ϑ Ν Πϧ ͷ స ૹ ͞ ͤ ͨ ͘ ͳ ͍ Ͷ ʙ 4   ͔ Β  $ % /  ௚ ઀ ͍ ͚ · ʔ ͢ ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ ͓ ɺ ͡ Ό ͊ ͦ ΕͰ ʂ  Ξ ο ϓ ϩ ʔ υ ͸ ྲྀ ੴ ʹ ೝ ূ ͋ Δ ͠  Ұ ୴ " 1 1  α ʔ ό Ͱ ड ͚ ͳ ͖ Ό ͔ ͳ ͊ 4 5 4  ࢖ ͑ ͹ ߦ ͚ Δ ͱ ࢥ ͍ · ͢ ʂ ྃ ղ ʂ  ௐ ΂ Δ ʂ ʂ 15分位の立ち話で終了
  10. ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ w ϑΝΠϧαʔόͷ໰୊͸4Ͱղܾͳ͸ͣ w 0, w "11αʔό͔Β഑৴ͱ͔͸ϠόΠ w 4͔Β$%/Ͱղܾ w

    1SPYZ΋ͳΔ΂͘௨ͨ͘͠ͳ͍ w ্ه 454Ͱղܾ w ίωΫγϣϯѲΓͬͺͳ͠ʹͨ͘͠ͳ͍ w )-4Ͱղܾ
  11. ͜ Μ ͳ ײ ͡ ʁ Ͱ ͢ ʙ ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ

    ಈ ը ͷ ϝλ σ ʔ λ ೖ Ε Δ ͷ ʹ Ӭ ଓ Խ ग़ དྷ Δ  , 7 4  ཉ ͠ ͍ ͳ ͊  3 F E J T  Ͱ ͍ ͍ ʁ
  12. ͜ Μ ͳ ײ ͡ ʁ Ͱ ͢ ʙ ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ

    ಈ ը ͷ ϝλ σ ʔ λ ೖ Ε Δ ͷ ʹ Ӭ ଓ Խ ग़ དྷ Δ  , 7 4  ཉ ͠ ͍ ͳ ͊  3 F E J T  Ͱ ͍ ͍ ʁ % Z O B N P % #  Ͱ ͸ ʂ ʁ  ʢ ࣾ ಺ Ͱ ࢖ ༻ ࣮ ੷ ͳ ͍ ͠  ৭ʑ౿ൈ͍ͯ஌ݟஷΊ͍ͨʂʂʣ
  13. ͜ Μ ͳ ײ ͡ ʁ Ͱ ͢ ʙ ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ

    ಈ ը ͷ ϝλ σ ʔ λ ೖ Ε Δ ͷ ʹ Ӭ ଓ Խ ग़ དྷ Δ  , 7 4  ཉ ͠ ͍ ͳ ͊  3 F E J T  Ͱ ͍ ͍ ʁ % Z O B N P % #  Ͱ ͸ ʂ ʁ  ʢ ࣾ ಺ Ͱ ࢖ ༻ ࣮ ੷ ͳ ͍ ͠  ৭ʑ౿ൈ͍ͯ஌ݟஷΊ͍ͨʂʂʣ ͠ ɺ ௐ ΂ · ͢ ʜ ʜ
  14. ͜ Μ ͳ ײ ͡ ʁ Ͱ ͢ ʙ ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ

    ಈ ը ͷ ϝλ σ ʔ λ ೖ Ε Δ ͷ ʹ Ӭ ଓ Խ ग़ དྷ Δ  , 7 4  ཉ ͠ ͍ ͳ ͊  3 F E J T  Ͱ ͍ ͍ ʁ % Z O B N P % #  Ͱ ͸ ʂ ʁ  ʢ ࣾ ಺ Ͱ ࢖ ༻ ࣮ ੷ ͳ ͍ ͠  ৭ʑ౿ൈ͍ͯ஌ݟஷΊ͍ͨʂʂʣ ͠ ɺ ௐ ΂ · ͢ ʜ ʜ ͋ ɺ "8 4  ͷ  Ξ Χ ΢ ϯ τ ͘ ͩ ͞ ͍ ʜ ʜ
  15. γ ʔ έ ϯε ͜ Μ ͳ ײ ͡ ʁ

    ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ
  16. γ ʔ έ ϯε ͜ Μ ͳ ײ ͡ ʁ

    ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ େ ৎ ෉ ͦ ͏Ͱ ͢ ʙ
  17. γ ʔ έ ϯε ͜ Μ ͳ ײ ͡ ʁ

    ͓ޓ͍લఏ஌ࣝͷڞ༗͋ΔͷͰ େ ৎ ෉ ͦ ͏Ͱ ͢ ʙ Μ ͡ Ό ࡞ Δ Θ ʙ
  18. &MBTUJD5SBOTDPEFS &5 “Amazon Elastic Transcoder is media transcoding in the

    cloud. It is designed to be a highly scalable, easy to use and a cost effective way for developers and businesses to convert (or “transcode”) media files from their source format into versions that will playback on devices like smartphones, tablets and PCs.”
  19. &MBTUJD5SBOTDPEFS &5 “Amazon Elastic Transcoder is media transcoding in the

    cloud. It is designed to be a highly scalable, easy to use and a cost effective way for developers and businesses to convert (or “transcode”) media files from their source format into versions that will playback on devices like smartphones, tablets and PCs.”
  20. &MBTUJD5SBOTDPEFS &5 “Amazon Elastic Transcoder is media transcoding in the

    cloud. It is designed to be a highly scalable, easy to use and a cost effective way for developers and businesses to convert (or “transcode”) media files from their source format into versions that will playback on devices like smartphones, tablets and PCs.” FY$SFBUF+PC"1*
  21. &MBTUJD5SBOTDPEFS &5 “Amazon Elastic Transcoder is media transcoding in the

    cloud. It is designed to be a highly scalable, easy to use and a cost effective way for developers and businesses to convert (or “transcode”) media files from their source format into versions that will playback on devices like smartphones, tablets and PCs.” FY$SFBUF+PC"1*
  22. &MBTUJD5SBOTDPEFS &5 “Amazon Elastic Transcoder is media transcoding in the

    cloud. It is designed to be a highly scalable, easy to use and a cost effective way for developers and businesses to convert (or “transcode”) media files from their source format into versions that will playback on devices like smartphones, tablets and PCs.” FY$SFBUF+PC"1*
  23. &MBTUJD5SBOTDPEFS &5 “Amazon Elastic Transcoder is media transcoding in the

    cloud. It is designed to be a highly scalable, easy to use and a cost effective way for developers and businesses to convert (or “transcode”) media files from their source format into versions that will playback on devices like smartphones, tablets and PCs.” FY$SFBUF+PC"1* FBTZ
  24. $SFBUF+PC w *OQVUͰೖྗιʔεࢦఆʢ4ͷLFZʣ w 0VUQVU,FZ1SFpYͰग़ྗઌͷࢦఆ w 0VUQVUTͰੜ੒͢ΔϑΝΠϧͷࢦఆ ෳ਺Մ  w

    ,FZͰग़ྗ͢ΔΩʔࢦఆ w 1SFTFU*EͰੜ੒͢ΔܗࣜΛࢦఆ w 1MBZMJTUTͰ)-4ͳͲͷϚελʔΠϯσοΫ εϑΝΠϧͷࢦఆ βοΫϦΠϝʔδ
  25. $SFBUF+PC ຊ൪؀ڥͰϦϦʔε࣌ͷಈըΛͲΜͲΜΞοϓ͠ ͯ֬ೝ͍ͯ͠Δ࣌ʹؾ͕͍ͭͨʜʜ ! ʮ͋ʂϑΝΠϧ໊Ұॹ͔ͩΒ$%/͕ݹ͍ͷ Ωϟογϡͪ͠ΌͬͯΔʂʢ౰ͨΓલʣʯ と、とりあえず CDN は CloudFront

    だし クエリ文字列パラメータに基づ いてキャッシュするように すればいいや http://docs.aws.amazon.com/ja_jp/AmazonCloudFront/latest/ DeveloperGuide/QueryStringParameters.html
  26. $SFBUF+PC Α͠ɺ"1*ͷϨεϙϯε࣌ʹ ಈը63-ʹߋ৽࣌ΛύϥϝʔλͰ͚ͭͯ ౉ͦ͏ʜʜ ! ͋ɺ;͊ʂʁͳΜ͔͓͔͍͠ʂʂʂ #EXTM3U #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-ALLOW-CACHE:YES

    #EXT-X-TARGETDURATION:13 #EXTINF:12.074367, hls_hi00000.ts #EXTINF:9.025267, hls_hi00001.ts #EXTINF:9.025611, hls_hi00002.ts #EXTINF:12.021333, hls_hi00003.ts #EXTINF:9.018667, hls_hi00004.ts #EXTINF:9.019011, hls_hi00005.ts #EXTINF:12.014733, hls_hi00006.ts #EXTINF:7.317022, hls_hi00007.ts #EXT-X-ENDLIST
  27. $SFBUF+PC Α͠ɺ"1*ͷϨεϙϯε࣌ʹ ಈը63-ʹߋ৽࣌ΛύϥϝʔλͰ͚ͭͯ ౉ͦ͏ʜʜ ! ͋ɺ;͊ʂʁͳΜ͔͓͔͍͠ʂʂʂ #EXTM3U #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-ALLOW-CACHE:YES

    #EXT-X-TARGETDURATION:13 #EXTINF:12.074367, hls_hi00000.ts #EXTINF:9.025267, hls_hi00001.ts #EXTINF:9.025611, hls_hi00002.ts #EXTINF:12.021333, hls_hi00003.ts #EXTINF:9.018667, hls_hi00004.ts #EXTINF:9.019011, hls_hi00005.ts #EXTINF:12.014733, hls_hi00006.ts #EXTINF:7.317022, hls_hi00007.ts #EXT-X-ENDLIST HLS のファイルの中には クエリパラメータ付かないし キャッシュに残ってる方 見ちゃう!!
  28. $SFBUF+PC Α͠ɺ"1*ͷϨεϙϯε࣌ʹ ಈը63-ʹߋ৽࣌ΛύϥϝʔλͰ͚ͭͯ ౉ͦ͏ʜʜ ! ͋ɺ;͊ʂʁͳΜ͔͓͔͍͠ʂʂʂ #EXTM3U #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-ALLOW-CACHE:YES

    #EXT-X-TARGETDURATION:13 #EXTINF:12.074367, hls_hi00000.ts #EXTINF:9.025267, hls_hi00001.ts #EXTINF:9.025611, hls_hi00002.ts #EXTINF:12.021333, hls_hi00003.ts #EXTINF:9.018667, hls_hi00004.ts #EXTINF:9.019011, hls_hi00005.ts #EXTINF:12.014733, hls_hi00006.ts #EXTINF:7.317022, hls_hi00007.ts #EXT-X-ENDLIST HLS のファイルの中には クエリパラメータ付かないし キャッシュに残ってる方 見ちゃう!! https://www.flickr.com/photos/60969081@N00/8292545493/