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
160
ニコニコ動画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
530
Xcode Previews でUIKitベースのアプリ開発を効率化する - iOSDC Japan 2020
kenmaz
12
13k
モバイル決済アプリの作り方 / How to develop a mobile payment app
kenmaz
6
7.9k
Developing Apple Pay In-App Provisioning in merpay
kenmaz
6
2.1k
Developing Apple Pay In-App Provisioning
kenmaz
6
2.2k
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
shadcn/uiを使ってReactでの開発を加速させよう!
lef237
0
300
Beyond ORM
77web
11
1.6k
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
130
DMMオンラインサロンアプリのSwift化
hayatan
0
190
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
0
100
Package Traits
ikesyo
1
210
HTML/CSS超絶浅い説明
yuki0329
0
190
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
1.3k
技術的負債と向き合うカイゼン活動を1年続けて分かった "持続可能" なプロダクト開発
yuichiro_serita
0
300
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
360
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
280
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
GitHub's CSS Performance
jonrohan
1030
460k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
Raft: Consensus for Rubyists
vanstee
137
6.7k
We Have a Design System, Now What?
morganepeng
51
7.3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Fireside Chat
paigeccino
34
3.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
180
Mobile First: as difficult as doing things right
swwweet
222
9k
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ΞϓϦέʔγϣϯΛ։ൃ͍ͨ͠ʂ • ͳͲͳͲ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠