Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ニコニコ動画iPhoneアプリの作り方
Search
kenmaz
October 12, 2011
Programming
0
150
ニコニコ動画iPhoneアプリの作り方
2011/10/12に開催された「スマートフォン2011春」での講演資料です。
http://expo.nikkeibp.co.jp/sma/spring/
kenmaz
October 12, 2011
Tweet
Share
More Decks by kenmaz
See All by kenmaz
iOSアプリ開発者がテスラを買って色々調べたりアプリを作ったりしつつまだ見ぬApple Carを想像する
kenmaz
2
4.2k
Xcode PreviewsからSnapshotテストを自動生成する
kenmaz
1
510
Xcode Previews でUIKitベースのアプリ開発を効率化する - iOSDC Japan 2020
kenmaz
12
13k
モバイル決済アプリの作り方 / How to develop a mobile payment app
kenmaz
6
7.8k
Developing Apple Pay In-App Provisioning in merpay
kenmaz
6
2k
Developing Apple Pay In-App Provisioning
kenmaz
6
2.1k
Super Resolution with CoreML (Long Version)
kenmaz
3
34k
Super Resolution with CoreML @ try! Swift Tokyo 2018
kenmaz
5
40k
CoreMLでアイドル顔認識アプリを作ろう
kenmaz
6
13k
Other Decks in Programming
See All in Programming
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
Remix on Hono on Cloudflare Workers
yusukebe
1
280
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
110
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
Outline View in SwiftUI
1024jp
1
320
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
65
11k
Code Review Best Practice
trishagee
64
17k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
The Cult of Friendly URLs
andyhume
78
6k
Become a Pro
speakerdeck
PRO
25
5k
For a Future-Friendly Web
brad_frost
175
9.4k
How GitHub (no longer) Works
holman
310
140k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Writing Fast Ruby
sferik
627
61k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Transcript
χίχίಈը iPhoneΞϓϦͷ࡞Γํ dwango দલ݈ଠ
ࣗݾհ • দલ݈ଠ (id: kenmaz) • υϫϯΰ χίχίࣄۀຊ෦ اը։ൃ෦ χίχίiPhone
։ൃϦʔμʔ • 2010/06 த్ೖࣾ • લ৬େखϝʔΧʔܥSIerͰݚڀ։ൃ
͜Μͳਓ͚ʹ͠·͢ • ಈըɾԻͳͲϚϧνϝσΟΞίϯςϯ πΛѻ͏iPhoneΞϓϦΛ։ൃ͠Α͏ͱߟ ͍͑ͯΔਓ • PC͚ͷwebαʔϏεΛiPhone/εϚʔτ ϑΥϯ͚ʹఏڙ͠Α͏ͱߟ͍͑ͯΔਓ • χίಈͷཪଆ͕ؾʹͳΔਓ
Agenda 1. χίχίಈըɾχίχίੜ์ૹͱ 2. χίχίಈը iPhoneΞϓϦ 3. χίχίੜ์ૹ iPhoneΞϓϦ 4.
Appleͷن 5. HTTP Live Streamingৄࡉ 6. ࣮ͱࠓޙ
Agenda 1. χίχίಈըɾχίχίੜ์ૹͱ 2. χίχίಈը iPhoneΞϓϦ 3. χίχίੜ์ૹ iPhoneΞϓϦ 4.
Appleͷن 5. HTTP Live Streamingৄࡉ 6. ࣮ͱࠓޙ
None
(ג)χϫϯΰ͕ӡӦ͢Δಈըڞ༗αʔϏε
࠷େͷಛɿίϝϯτ
• ΈΜͳͰΘ͍Θ͍ίϝϯτ͠ͳ͕Βಈ ըΛݟָͯ͠Ή • “ඇಉظܕίϛχϡέʔγϣϯ”
ಈը࠶ੜॲཧ • ಈը࠶ੜϓϨΠϠʔFlashͰ։ൃ • ಈը࠶ੜϨΠϠʔ • ίϝϯτඳըϨΠϠʔ • UIϨΠϠʔ
ΘΖͨɹɹɹɹɹɹɹɹɹɹɹ WWWW ɹɹɹɹɹɹɹɹɹ͜ΕͻͲ͍ Ωλʔʔʔʔʔʔʔʔʔɹɹɹɹɹɹɹ ΧΦε͆͆͆ wwwwwwwɹɹɹɹɹɹɹɹɹɹɹͺͶ͐ ɹɹɹɹɹ࡞ऀωਃ ಈը࠶ੜॲཧ
ΘΖͨɹɹɹɹɹɹɹɹɹɹɹ WWWW ɹɹɹɹɹɹɹɹɹ͜ΕͻͲ͍ Ωλʔʔʔʔʔʔʔʔʔɹɹɹɹɹɹɹ ΧΦε͆͆͆ wwwwwwwɹɹɹɹɹɹɹɹɹɹɹͺͶ͐ ɹɹɹɹɹ࡞ऀωਃ ಈը࠶ੜॲཧ
None
(ג)χϫϯΰ͕ӡӦ͢Δ ಈըϥΠϒετϦʔϛϯάαʔϏε
ެࣜੜ์ૹ • ӡӦ͕൪੍࡞ɾ৴͢Δੜ์ૹ • ͓স͍ɺԻָɺΞχϝɺήʔϜɺ࣏ɺ౼ɺใಓɺ etc... • ຖ݄400ʙ500൪์ૹ͍ͯ͠Δ
Ϣʔβੜ์ૹ • ҰൠͷϢʔβ͕ੜ์ૹΛ৴ • ์ૹ͢Δਓʹʮੜओʯ • ຖສ൪͕์ૹ͞Ε͍ͯΔ
ͪΖΜίϝϯτ • χίಈͱಉ͘͡ɺίϝϯτʹΑΔί ϛχϡέʔγϣϯ͕Մೳ • χίੜಉظܕίϛχϡέʔγϣϯ ʢχίಈඇಉظܕʣ
ϏδωεϞσϧ • ϓϨϛΞϜձһऩೖ • ֹ݄525ԁ • ઌϓϨϛΞϜձһ120ສਓಥഁ • ༗ྉ൪ɾ༗ྉੜ์ૹ •
ࠂ • etc..
ϞόΠϧରԠ • χίχίಈըϞόΠϧʢχίϞόʣ • υίϞɾιϑτόϯΫɾAU • ΩϟϦΞ՝ۚʹରԠ • ϓϨϛΞϜձһͷ͕ΩϟϦΞ՝ۚ iPhone/Andoridɾɾʁ
χίχίಈը ͱ iPhone • ͋ΒΏΔσόΠεͰχίಈΛָ͠ΊΔΑ ͏ʹ͍ͨ͠ • iPhoneͰχίಈΛݟ͍ͨʂ • χίಈɺχίੜͱʹɺಈը࠶ੜʹ
FlashΛ͍ͬͯΔ • →iPhoneͰχίಈΛࢹௌͰ͖ͳ͍ʂ
χίχίಈը ͱ iPhone • ͱ͍͏͜ͱͰઐ༻ΞϓϦΛ։ൃ • 2009/4 χίχίಈըiPhoneΞϓϦ • 2010/5
χίχίੜ์ૹiPhoneΞϓϦ
Agenda 1. χίχίಈըɾχίχίੜ์ૹͱ 2. χίχίಈը iPhoneΞϓϦ 3. χίχίੜ์ૹ iPhoneΞϓϦ 4.
Appleͷن 5. HTTP Live Streamingৄࡉ 6. ࣮ͱࠓޙ
χίχίಈըiPhoneΞϓϦ
None
ओͳػೳ • ಈը࠶ੜ • ίϝϯτදࣔɾߘ • ϥϯΩϯάදࣔ • ϚΠϦετදࣔɾฤू •
ݕࡧ
ಈը࠶ੜ • ̎छྨͷ࠶ੜϞʔυ͕͋Δ • ը࣭Ϟʔυ • ߴը࣭Ϟʔυ ϓϨϛΞϜձһ +WiFiଓͷΈ
None
ը࣭Ϟʔυ • χίχίಈըϞόΠϧͷಈը৴γε ςϜΛͬͯಈըΛ࠶ੜ͢ΔϞʔυ • ಈըσʔλosecܗࣜ
osecܗࣜʁ • Ψϥέʔͷಈը࠶ੜॲཧʹ͍Ζ͍Ζ੍ݶ͕͋Δ • ΨϥέʔͰFlash࠶ੜͰ͖Δ͕ಈըͷ্ʹί ϝϯτΛॏͶͯඳըͰ͖ͳ͍ • σʔλ௨৴ྔ੍͕ݶ͞Ε͍ͯΔ • χίϞόಠࣗͷಈըϑΥʔϚοτ͕ඞཁ
→ osecܗࣜΛಠࣗ։ൃ ͓ͤͪ
• ύϥύϥອըͷΑ͏ʹJPEGΛ̍ίϚͣͭ࠶ੜͯ͠ಈ ըͬΆ͘ݟͤΔ • ө૾ = JPEGɺԻ = ADPCM •
ಈըσʔλΛ̍ඵ (One-Sec)͝ͱʹׂɾύέοτ Խ ը૾ ը૾ ը૾ ը૾ ը૾ Ի ̍ඵ ը૾ ը૾ ը૾ Ի ̍ඵ ૾ ը૾ ը૾ ը૾ Ի ̍ඵ osecܗࣜʁ ͓ͤͪ
ը࣭Ϟʔυ χίಈ ಈըετϨʔδ χίϞό ৴αʔόʔ osecܗࣜม 1.ಈըσίʔυ 2.ϑϨʔϜը૾औΓग़͠ɾॖখɾJPEGѹॖ 3.ԻADPCMม 4.ύέοτԽ
mp4/flv mp4/flv osec over http osec over http
ը࣭Ϟʔυ • χίϞόͷΠϯϑϥΛྲྀ༻͢Δ͜ͱͰɺ ίετͰiPhoneʹରԠͰ͖ͨ... • ͔͠͠ಈըͱͯ͠ͷ࣭˚ • ϞʔγϣϯJPEGͰΓͭΒ͍
ߴը࣭Ϟʔυ • mp4/H.264/AACͷಈըΛͦͷ··iPhone Ͱ࠶ੜ͢ΔϞʔυ • χίಈͷಈըετϨʔδ͔ΒಈըΛ औಘɾ࠶ੜ • PCͱಉͷը࣭ͰಈըΛָ͠ΊΔ
• mp4/H.264/AACͷಈըΛͦͷ··iPhone Ͱ࠶ੜ͢ΔϞʔυ • χίಈͷಈըετϨʔδ͔ΒಈըΛ औಘɾ࠶ੜ • PCͱಉͷը࣭ͰಈըΛָ͠ΊΔ ߴը࣭Ϟʔυ
دΓಓɿ̍Ͱ͔Δಈը ܗࣜ • mp4 : ίϯςφϑΥʔϚοτ • H.264 : ϏσΦίʔσοΫ
• AAC : ΦʔσΟΦίʔσοΫ mp4 H.264 ϏσΦ AAC ΦʔσΟΦ
دΓಓɿ̍Ͱ͔Δಈը ܗࣜ ίϯςφ ϑΥʔϚοτ mp4, m4v, flv, f4v, swf, avi,
mov, 3gpp, webm ϏσΦ ίʔσοΫ H.264 (MPEG4-AVC), H.263, On2 VP6, VP8, Theora, MPEG-1/2, WMV ΦʔσΟΦ ίʔσοΫ AAC, MP3, ADPCM, Nellymoser, Speex, Apple Lossless, Vorbis, WMA
• mp4/H.264/AACͷಈըΛͦͷ··iPhone Ͱ࠶ੜ͢ΔϞʔυ • χίಈͷಈըετϨʔδ͔ΒಈըΛ औಘɾ࠶ੜ • PCͱಉͷը࣭ͰಈըΛָ͠ΊΔ ߴը࣭Ϟʔυ
ߴը࣭Ϟʔυ χίಈ ಈըετϨʔδ ͍͔ͭ͘ͷ্࣮ͷ mp4 mp4/flv
̍. ࠶ੜՄೳͳಈըܗ ࣜ • iPhoneͰ࠶ੜՄೳͳܗࣜ • ಈըίʔσοΫɿH.264 • ԻίʔσοΫɿmp3/AAC •
Ϣʔβ͔Βߘ͞ΕΔಈըܗࣜଟछଟ༷ (flv/mp4/ DivX/MPEG1,2/WMV..) • iPhoneͰ࠶ੜͰ͖ͳ͍Մೳੑ͕͋Δ ߘ͞ΕͨಈըαʔόαΠυͰશͯH.264/ AACͰ࠶Τϯίʔυ͢Δ͜ͱʹͨ͠
̎ɿMPMoviePlayerͷ༷ • ҰճͷಈըऔಘͰෳճͷHTTPϦΫΤετ (RangeϦΫΤετ)͕ൃੜ͢Δ • ಈըετϨʔδͷαʔόʔෛՙ૿େ • CookieΛࣗ༝ʹ੍ޚͰ͖ͳ͍ • χίಈͷಈըετϨʔδCookieʹΑΔ
ೝূΛߦ͍ͬͯΔ • ೝূʹࣦഊͯ͠ಈը͕औಘͰ͖ͳ͍ ※MPMoviePlayer: iOS͕ఏڙ͢Δಈը࠶ੜ༻Ϋϥε
ΞϓϦ෦ʹϩʔΧϧϓϩΩγΛ࣮ ̎ɿMPMoviePlayerͷ༷ MPMoviePlayer ϩʔΧϧϓϩΩγ χίಈ ಈըετϨʔδ ಈըऔಘ ಈըऔಘ ಈըऔಘ ಈըऔಘ
ಈըऔಘ ಈըσʔλฦ৴ ೝূ
ߴը࣭Ϟʔυ • χίχίಈըH.264Λੵۃతʹαϙʔ τ • χίχίiPhoneࠓޙߴը࣭ϞʔυΛ த৺ͱ͢Δ • ը࣭Ϟʔυʢosecܗࣜʣঃʑʹഇࢭ ͍ͯ͘͠༧ఆ
ओͳػೳ • ಈը࠶ੜ • ίϝϯτදࣔɾߘ • ϥϯΩϯάදࣔ • ϚΠϦετදࣔɾฤू •
ݕࡧ
ίϝϯτදࣔ • ಈը্ʹίϝϯτΛॏͶͯදࣔ • ίϝϯτʹχίಈͷΩϞ • PC൛ΑΓΒ͔ͳදࣔʂ • PC൛ɿҰఆִؒͰίϝϯτදࣔҐஔΛͣΒͯ͠ඳ ը
• iPhone൛ɿCoreAnimation FrameworkΛͬͯίϝ ϯτඳըΛGPUʹ͓·͔ͤ • σϞ wwwwww wwwwwwww ͜ΕͻͲ͍w Ωλʔʔʔʔʔʔ
CoreAnimationͰίϝϯτඳըΛψϧψϧ [comment posX:480.0]; [UIView beginAnimations:@"comment" context:NULL]; [UIView setAnimationDuration:4.0f]; [UIView setAnimationCurve:
UIViewAnimationCurveLinear]; [comment posX: -comment.width]; [UIView commitAnimations]; wwwww 480px wwwww 480.0 0.0 120px -120.0 600.0 ̐ඵ
ओͳػೳ • ಈը࠶ੜ • ίϝϯτදࣔɾߘ • ϥϯΩϯάදࣔ • ϚΠϦετදࣔɾฤू •
ݕࡧ
WebAPIʹΑΔαʔϏεؒ࿈ ܞ • ϚΠϦετɺݕࡧɺϥϯΩϯά • χίχίಈըͷ෦WebAPIΛ༻͍࣮ͯ ͍ͯ͠Δ • χίχίಈըʹؔ࿈͢ΔαʔϏεؒͷ࿈ ܞجຊWebAPI
• →ૄ݁߹ͳઃܭ
χίχίiPhone APIαʔόʔ χίχίಈը ڞ௨ೝূAPI χίχίಈը API χίϞό API WebAPIʹΑΔαʔϏεؒ࿈ ܞ
χίχί νϟϯωϧAPI
Agenda 1. χίχίಈըɾχίχίੜ์ૹͱ 2. χίχίಈը iPhoneΞϓϦ 3. χίχίੜ์ૹ iPhoneΞϓϦ 4.
Appleͷن 5. HTTP Live Streamingৄࡉ 6. ࣮ͱࠓޙ
χίχίੜ์ૹiPhoneΞϓϦ
• ࢹௌػೳ • ը࣭Ϟʔυ • ߴը࣭Ϟʔυ • ์ૹػೳ • iPhone͔Βੜ์ૹΛ৴
ओͳػೳ ϓϨϛΞϜձһ +WiFiଓ࣌ͷΈ ϓϨϛΞϜձһ ͷΈ
• ࢹௌػೳ • ը࣭Ϟʔυ • ߴը࣭Ϟʔυ • ์ૹػೳ • iPhone͔Βੜ์ૹΛ৴
ओͳػೳ
ࢹௌػೳɿը࣭Ϟʔυ • χίϞόͷΠϯϑϥΛͬͯੜ์ૹΛ ࢹௌ͢Δػೳ • ಈըΞϓϦͱಉ༷osecܗࣜ • ө૾࣭͋·Γྑ͘ͳ͍
ࢹௌػೳɿը࣭Ϟʔυ χίੜ ৴αʔόʔ χίϞόੜ ৴αʔόʔ RTMP→osecม RTMP RTMP ocec over
HTTP ocec over HTTP Flash Media Server
RTMP (Real Time Messaging Protocol) • ಈըɾԻͷϥΠϒετϦʔϛϯάͷͨΊͷ ϓϩτίϧ • Adobe͕༷Λࡦఆ
• FlashϓϨΠϠʔͰ࠾༻͞Ε͍ͯΔ • χίੜ(PC)શ໘తʹRTMPΛ࠾༻ • iPhoneɾΨϥέʔRTMPͷ࠶ੜෆՄ
• ࢹௌػೳ • ը࣭Ϟʔυ • ߴը࣭Ϟʔυ • ์ૹػೳ • iPhone͔Βੜ์ૹΛ৴
ओͳػೳ
ࢹௌػೳɿߴը࣭Ϟʔυ • H.264Ͱ৴͞Ε͍ͯΔੜ์ૹΛ iPhoneͰࢹௌ͢ΔϞʔυ • PCͱಉͷը࣭Ͱੜ์ૹΛࢹௌͰ͖Δ • ์ૹݩͰ໌ࣔతʹH.264Ͱ৴͢Δඞཁ͕͋ΔʢσϑΥϧτͷίʔσο ΫVP6ʣɻ •
χίಈΞϓϦͷߴը࣭ϞʔυͰͯ͢ͷಈըΛ࠶ม͠H.264Խͯ͠ ͍͕ͨɺੜ์ૹͰίετֻ͕Γա͗ΔͨΊɺݱࡏH.264ͷΈରԠɻ
ࢹௌػೳɿߴը࣭Ϟʔυ χίੜ ৴αʔόʔ Wowza Media Server RTMP→HLSม RTMP RTMP HLS
Flash Media Server
HLS (HTTP Live Streaming) • HTTP͚ͩͰٖࣅతʹϥΠϒετϦʔϛ ϯάΛ࣮ݱ͢Δϓϩτίϧ • iPhoneͰಈըϥΠϒετϦʔϛϯάʹ HLSͷ༻Λਪ͍ͯ͠Δ
Wowza Media Server • Wowza Media Systems͕ࣾ։ൃ͢Δ༻ ͷετϦʔϛϯάαʔόʔ • Flash
Media ServerͷΫϩʔϯ • RTMP → HLSมػೳ
• ࢹௌػೳ • ը࣭Ϟʔυ • ߴը࣭Ϟʔυ • ์ૹػೳ • iPhone͔Βੜ์ૹΛ৴
ओͳػೳ
์ૹػೳ • iPhone͔Βੜ์ૹ͢Δػೳ • PCΧϝϥ㱻iPhoneΧϝϥΓସ͑ػೳ • લ໘ɾഎ໘ΧϝϥΓସ͑
None
์ૹػೳ • Ͳ͏࣮ͬͯ͢Δ͔ʁ
PC ์ૹػೳͷΈ χίੜ(PC൛)Ͱ... WebΧϝϥͷ ө૾ΛΩϟϓνϟ ϑϨʔϜը૾ χίੜ ৴αʔόʔ RTMP Flash
Media Server RTMP ಈըσʔλ ಈըѹॖ (Τϯίʔυ)
iPhone iPhone൛ϓϩτλΠϓ̍ ΫϥΠΞϯταΠυѹॖํࣜ iPhoneΧϝϥͷ ө૾ΛΩϟϓνϟ ϑϨʔϜը૾ χίੜ ৴αʔόʔ RTMP Flash
Media Server RTMP ಈըσʔλ ಈըѹॖ (Τϯίʔυ)
தܧαʔόʔ iPhone iPhone൛ϓϩτλΠϓ̎ αʔόʔαΠυѹॖํࣜ iPhoneΧϝϥͷ ө૾ΛΩϟϓνϟ ϑϨʔϜը૾ χίੜ ৴αʔόʔ RTMP
Flash Media Server RTMP ಈըσʔλ ಈըѹॖ (Τϯίʔυ) HTTP
̎ํࣜͷൺֱ • ΫϥΠΞϯταΠυѹॖํࣜ • ॴɿதܧαʔόʔ͕ෆཁ • ॴɿiPhoneͰѹॖ͢ΔͷͰCPUෛՙߴ • αʔόʔαΠυѹॖํࣜ •
ॴɿiPhoneΧϝϥө૾ΛΩϟϓνϟ͠ૹ ৴͢Δ͚ͩͳͷͰCPUෛՙ • ॴɿதܧαʔόʔ͕ඞཁ
αʔόʔαΠυѹॖํࣜΛ࠾༻ • ΫϥΠΞϯταΠυѹॖํࣜ • ॴɿதܧαʔόʔ͕ෆཁ • ॴɿiPhoneͰѹॖ͢ΔͷͰCPUෛՙߴ • αʔόʔαΠυѹॖํࣜ •
ॴɿiPhoneΧϝϥө૾ΛΩϟϓνϟ͠ૹ ৴͢Δ͚ͩͳͷͰCPUෛՙ • ॴɿதܧαʔόʔ͕ඞཁ iPhone3GSiPod TouchͳͲ CPUੑೳͷ͍Ͱ ͑ΔΑ͏ʹ͍ͨ͠ʂ
Agenda 1. χίχίಈըɾχίχίੜ์ૹͱ 2. χίχίಈը iPhoneΞϓϦ 3. χίχίੜ์ૹ iPhoneΞϓϦ 4.
Appleͷن 5. HTTP Live Streamingৄࡉ 6. ࣮ͱࠓޙ
Appleͷن • iOSΞϓϦΛ։ൃ͢Δ্ͰAppleͷن ΛकΔ͜ͱඞਢ • App Store Review Guidelines (※1)
• HTTP Live Streaming Overview (※2) ※1 ) http://developer.apple.com/appstore/resources/approval/guidelines.html ※2 ) http://developer.apple.com/library/ios/#documentation/NetworkingInternet/ Conceptual/StreamingMediaGuide/Introduction/Introduction.html
Appleͷنʢൈਮʣ • 3GճઢڥԼͰɺ10Ҏ্·ͨ5Ͱ5MBΛ ͑ΔಈըΛετϦʔϛϯά࠶ੜ͢Δ߹ɺ HTTP Live StreamingΛ༻͠ͳ͚ΕͳΒͳ ͍ɻͦͷ߹ʹ࠷64kbpsͷԻͷΈετ ϦʔϜΛඞؚͣΊΔඞཁ͕͋Δɻ
Ξοϓϧͷن͕༩͑ΔӨڹ • 3GճઢڥԼͰɺ10Ҏ্·ͨ5Ͱ5MBΛ ͑ΔಈըΛετϦʔϛϯά࠶ੜ͢Δ߹ɺ HTTP Live StreamingΛ༻͠ͳ͚ΕͳΒͳ ͍ɻͦͷ߹ʹ࠷64kbpsͷԻͷΈετ ϦʔϜΛඞؚͣΊΔඞཁ͕͋Δɻ 3GճઢڥԼͰࣄ্࣮HLSରԠ͕ඞਢ
WiFi௨৴࣌HLSͰͳͯ͘Α͍
Ξοϓϧͷن͕༩͑ΔӨڹ • 3GճઢڥԼͰɺ10Ҏ্·ͨ5Ͱ5MBΛ ͑ΔಈըΛετϦʔϛϯά࠶ੜ͢Δ߹ɺ HTTP Live StreamingΛ༻͠ͳ͚ΕͳΒͳ ͍ɻͦͷ߹ʹ࠷64kbpsͷԻͷΈετ ϦʔϜΛඞؚͣΊΔඞཁ͕͋Δɻ HLSʹରԠ͢Δࡍɺ64kbpsͷԻετϦʔϜΛ
ผ్ੜ͢Δඞཁ͕͋Δ → Πϯϑϥίετ૿
Ξοϓϧͷن͕༩͑ΔӨڹ HLSʹશʹରԠ͠Α͏ͱ͢Δͱίετߴ ↓ 3GճઢͰಈը࠶ੜΛҰ෦੍ݶ͍ͯ͠Δ ࠓޙରԠ༧ఆ
Agenda 1. χίχίಈըɾχίχίੜ์ૹͱ 2. χίχίಈը iPhoneΞϓϦ 3. χίχίੜ์ૹ iPhoneΞϓϦ 4.
Appleͷن 5. HTTP Live Streamingৄࡉ 6. ࣮ͱࠓޙ
HTTP Live Streaming ৄࡉ • HTTP͚ͩͰٖࣅతʹϥΠϒετϦʔϛϯά Λ࣮ݱ͢Δϓϩτίϧ • Apple͕༷Λࡦఆ •
IETFͷΠϯλʔωοτυϥϑτͱͯ͠ఏग़ • iPhone,QuickTimeͳͲͰ࠾༻ • Adobe FMS͕HLSΛαϙʔτ͢Δ༧ఆ(!)
HTTPαʔόʔ (ApacheͳͲ) HTTP Live Streaming ͷΈ H.264 ಈըϑΝΠϧ sample_0001.ts sample_0002.ts
sample_0003.ts ಈըϑΝΠϧΛ 10ඵ͝ͱʹׂ #EXTM3U #EXT-X-TARGETDURATION:10 #EXTINF:10, sample_0001.ts #EXTINF:10, sample_0002.ts #EXTINF:10, sample_0003.ts ϓϨΠϦετ(m3u8) Λੜ ϓϨΠϦετͲ͓Γʹ ࿈ଓ࠶ੜ
HTTPαʔόʔ (ApacheͳͲ) HTTP Live Streaming ͷΈ sample_0001.ts sample_0002.ts sample_0003.ts ө૾σʔλΛ
10ඵ͝ͱʹׂ #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE: 0 #EXTINF:10, sample_0001.ts #EXTINF:10, sample_0002.ts #EXTINF:10, sample_0003.ts ϓϨΠϦετ(m3u8) ͕ಈతʹߋ৽͞ΕΔ ϓϨΠϦετͲ͓Γʹ ࿈ଓ࠶ੜ
HLSͷಛ • ࣌ؒͷಈըͰ͋ͬͯҰͷ௨৴Ͱ औಘ͢Δͷ10ඵͷಈըσʔλ͚ͩ • ଳҬΛѹഭ͠ͳ͍ • Πϯϑϥ௨৴ΩϟϦΞʹ༏͍͠
HLSͷಛ • ಈըσʔλHTTPͰసૹ • ApacheͷΑ͏ͳී௨ͷwebαʔόʔͩ ͚ͰಈըετϦʔϛϯά͕࣮ݱͰ͖Δɻ Adobe FMSͳͲͷߴՁͳαʔόʔෆཁ • HTTPͳͷͰଟ͘ͷڥͰ༻Ͱ͖Δ
ʢHTTPҎ֎ͷ௨৴ΛϒϩοΫ͍ͯ͠Δ ڥଟ͍ʣ
HLSͷಛ • ଳҬ෯ʹԠͨ͡ը࣭ࣗಈΓସ͑ • ଳҬ͕ࡉͯ͘շదʹಈըΛࢹௌͰ͖Δ ը࣭ಈը sample_0001.ts sample_0002.ts sample_0003.ts ߴը࣭ಈը
sample_0001.ts sample_0002.ts sample_0003.ts ௨৴ঢ়گ͕ ྑ͍࣌ ௨৴ঢ়گ͕ ѱ͍࣌ ଳҬ෯ʹԠͯࣗ͡ಈ͑
Agenda 1. χίχίಈըɾχίχίੜ์ૹͱ 2. χίχίಈը iPhoneΞϓϦ 3. χίχίੜ์ૹ iPhoneΞϓϦ 4.
Appleͷن 5. HTTP Live Streamingৄࡉ 6. ࣮ͱࠓޙ
࣮
ΞϓϦDL • ྦྷܭ100ສDLҎ্
ϢχʔΫϢʔβ • 4~5ສUU/day ࡂ࣌NHK αΠϚϧ์ૹ
iPhone͔Βੜ์ૹ৴ • 600൪/day
ࠓޙ
৹ࠪίετͷݮ • ը໘ϨΠΞτΛগ͠มߋ͢Δ͚ͩͰ৹͕ࠪඞ ཁͳͷͰίετ͕͔͔Δ • ΞϓϦͷചΓ্͛ͷ30%ΛΞοϓϧʹऔΒΕΔɻ άʔάϧैͷྲྀΕ • ΞϓϦ৭ʑͭΒ͍ʂ •
WebͰͰ͖Δ͜ͱWeb • HTML5 !
HTML5ରԠ • HTML5ͷvideoλάʹΑΔಈը࠶ੜ • Safari͚ͩͰχίಈΛࢹௌͰ͖Δ • iPadͰରԠࡁΈ • ΞϓϦ͕ෆཁʂ •
৹ࠪෆཁʂ
HTML5ରԠ • ͨͩ͠iPhoneͰ • Safariͷ༷ʹΑΓಈըͷ্ʹίϝϯ τΛॏͶΔ͜ͱ͕ෆՄೳͳͨΊɺݱ ঢ়Ͱ࣮ݱෆՄೳ • ͦ͜Ͱɾɾɾ
ΞϓϦUIͷwebԽ • ಈը࠶ੜॲཧҎ֎Λweb(HTML/CSS/JS)Ͱ։ൃ • iPhoneΞϓϦΈࠐΈͷUIWebViewͰදࣔ • ಈը࠶ੜϘλϯΛԡͨ͠ΒΞϓϦωΠςΟϒ ͷػೳΛݺͼग़ͯ͠ಈը࠶ੜ
ΞϓϦUIͷwebԽ
ΞϓϦUIͷwebԽ HTML/CSS/JavaScript Ͱ࣮
ΞϓϦUIͷwebԽ <a href=”nicovideo://play/sm9”> [UIWebView stringByEvaluatingJavaScriptFromString: @"videoList.show();"];
AndroidରԠ • UIweb • ಈը࠶ੜFlash
·ͱΊ • χίಈ / χίੜiPhoneΞϓϦΛࢧ͑Δٕज़ʹ͍ͭͯ հ • ಈըԻָͳͲϝσΟΞίϯςϯπΛѻ͏ΞϓϦΛ։ ൃ͢Δ߹ɺΞοϓϧͷنʹҙ͢Δඞཁ͕͋Δ •
iPhoneΞϓϦͷ৹ࠪίετΛճආ͢Δʹ෦తʹ webԽ͢Δͷ͕༗ޮ • χίχίಈըͰεϚʔτϑΥϯͷॏཁੑ࣮֬ʹߴ ·͖͍ͬͯͯΔ
One more thing...
υϫϯΰΤϯδχΞืू த • υϫϯΰͰҎԼͷΑ͏ͳΤϯδχΞΛืू ͍ͯ͠·͢ • χίχίಈըͷ։ൃʹؔΘΓ͍ͨʂ • εϚʔτϑΥϯΞϓϦ։ൃʹڵຯ͕͋Δʂ •
େنwebΞϓϦέʔγϣϯΛ։ൃ͍ͨ͠ʂ • ͳͲͳͲ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠