Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Live Streaming for Android wasabeef Shibuya.apk #10
Slide 2
Slide 2 text
About me Daichi Furiya Google Developer Expert AbemaTV, Inc. wasabeef @wasabeef_jp
Slide 3
Slide 3 text
Streaming?
Slide 4
Slide 4 text
HLS MPEG-DASH Microsoft Smooth Streaming RTMP Streaming?
Slide 5
Slide 5 text
Streaming? HLS HLS Encryption, Ads, Meta Encode, BroadCast Transcode, HLS RTMP
Slide 6
Slide 6 text
Video compression
Slide 7
Slide 7 text
Video compression 30fps 1sec 60KB × 30 = 1.8MB 1min 1.8MB × 60 = 108MB 1hour 108MB × 10 = 1.1GB 60KB 65KB 55KB 50KB
Slide 8
Slide 8 text
Video compression 60KB 5KB 2KB 7KB 30fps 1sec 60KB + (4KB × 30) = 180KB 1min 60KB + (4KB × 1800) = 7.2MB 1hour 7.2MB × 10 = 72MB
Slide 9
Slide 9 text
Video compression Be impossible ;(
Slide 10
Slide 10 text
Key Frame Be possible :)
Slide 11
Slide 11 text
Video structure Video Audio Meta Butterfly…? Discovered
Slide 12
Slide 12 text
Format
Slide 13
Slide 13 text
Container format
Slide 14
Slide 14 text
.avi .mp4 .mkv .ogg .flv etc.. Container format Video H.264 H.265 Divx VP9 Audio AAC WMA Voribis PCM Caption SAMI, SMIL Hi-Caption CMML, DXFP Meta Date Author Title
Slide 15
Slide 15 text
Video codec
Slide 16
Slide 16 text
H.264/MPEG-4 AVC H.265/HEVC VP9 Video Codec
Slide 17
Slide 17 text
8K 300fps Half the size of AVC Android 5.+ H.265/HEVC
Slide 18
Slide 18 text
Audio codec
Slide 19
Slide 19 text
MP3 AAC Vorbis Audio Codec
Slide 20
Slide 20 text
HTTP Live Streaming
Slide 21
Slide 21 text
Apple Adaptive bitrate streaming MPEG2-TS H.264/AAC HLS
Slide 22
Slide 22 text
playlist.m3u8
Slide 23
Slide 23 text
#EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=200000 gear1/prog_index.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=311111 gear2/prog_index.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=484444 gear3/prog_index.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=737777 gear4/prog_index.m3u8 playlist.m3u8
Slide 24
Slide 24 text
playlist.m3u8 gear1/prog_index.m3u8 BANDWIDTH: 200000 Header gear2/prog_index.m3u8 BANDWIDTH: 311111 gear3/prog_index.m3u8 BANDWIDTH: 484444 gear4/prog_index.m3u8 BANDWIDTH: 737777
Slide 25
Slide 25 text
#EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:10, no desc fileSequence0.ts #EXTINF:10, no desc fileSequence1.ts #EXTINF:10, no desc ~~~ 2-179.ts ~~~ fileSequence180.ts #EXT-X-ENDLIST playlist.m3u8
Slide 26
Slide 26 text
ts?
Slide 27
Slide 27 text
Transport Stream (ts) fileSequence0.ts Container (2sec 〜 10sec)
Slide 28
Slide 28 text
playlist.m3u8 FileSequence1.ts Length: 5sec FileSequence2.ts Length: 5sec FileSequence3.ts Length: 5sec FileSequence4.ts Length: 5sec Header Footer
Slide 29
Slide 29 text
playlist.m3u8 FileSequence1.ts Length: 5sec FileSequence2.ts Length: 5sec ad.ts Length: 5sec FileSequence3.ts Length: 5sec Header Footer
Slide 30
Slide 30 text
Dynamic Adaptive Streaming over HTTP
Slide 31
Slide 31 text
Microsoft, Netflix, Google, Ericsson, Samsung, Adobe Adaptive bitrate streaming MP4, WebM, MPEG2-TS MPEG-DASH
Slide 32
Slide 32 text
- Root manifest.mdp - A start time and duration. - Audio/Video content - Bitrate and Aspect
Slide 33
Slide 33 text
DRM
Slide 34
Slide 34 text
WideVine
Slide 35
Slide 35 text
Google Modular (Android 4.3+) Classic (Android 3+) MPEG-DASH SurfaceView WideVine
Slide 36
Slide 36 text
PlayReady
Slide 37
Slide 37 text
MicroSoft PlayReady HLS Android 3+ TextureView PlayReady
Slide 38
Slide 38 text
ExoPlayer
Slide 39
Slide 39 text
Google OSS HLS, MPEG-DASH, SmoothStreaming WideVine (4.3+) https://github.com/google/ExoPlayer ExoPlayer
Slide 40
Slide 40 text
Amazon OSS Bug fix https://github.com/amzn/exoplayer-amazon-port ExoPlayer Amazon Port
Slide 41
Slide 41 text
Conclusion
Slide 42
Slide 42 text
Thank you. twitter.com/wasabeef_jp wasabeef.jp github.com/wasabeef