Live Streaming for Android

Live Streaming for Android

Introduction to Live Streaming

6dd0483f1353a4a359e92633cfd65c64?s=128

Daichi Furiya (Wasabeef)

September 16, 2016
Tweet

Transcript

  1. Live Streaming for Android wasabeef Shibuya.apk #10

  2. About me Daichi Furiya Google Developer Expert AbemaTV, Inc. wasabeef

    @wasabeef_jp
  3. Streaming?

  4. HLS MPEG-DASH Microsoft Smooth Streaming RTMP Streaming?

  5. Streaming? HLS HLS Encryption, Ads, Meta Encode, BroadCast Transcode, HLS

    RTMP
  6. Video compression

  7. Video compression 30fps 1sec 60KB × 30 = 1.8MB 1min

    1.8MB × 60 = 108MB 1hour 108MB × 10 = 1.1GB 60KB 65KB 55KB 50KB
  8. Video compression 60KB 5KB 2KB 7KB 30fps 1sec 60KB +

    (4KB × 30) = 180KB 1min 60KB + (4KB × 1800) = 7.2MB 1hour 7.2MB × 10 = 72MB
  9. Video compression Be impossible ;(

  10. Key Frame Be possible :)

  11. Video structure Video Audio Meta Butterfly…? Discovered

  12. Format

  13. Container format

  14. .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
  15. Video codec

  16. H.264/MPEG-4 AVC H.265/HEVC VP9 Video Codec

  17. 8K 300fps Half the size of AVC Android 5.+ H.265/HEVC

  18. Audio codec

  19. MP3 AAC Vorbis Audio Codec

  20. HTTP Live Streaming

  21. Apple Adaptive bitrate streaming MPEG2-TS H.264/AAC HLS

  22. playlist.m3u8

  23. #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
  24. 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
  25. #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
  26. ts?

  27. Transport Stream (ts) fileSequence0.ts Container (2sec 〜 10sec)

  28. playlist.m3u8 FileSequence1.ts Length: 5sec FileSequence2.ts Length: 5sec FileSequence3.ts Length: 5sec

    FileSequence4.ts Length: 5sec Header Footer
  29. playlist.m3u8 FileSequence1.ts Length: 5sec FileSequence2.ts Length: 5sec ad.ts Length: 5sec

    FileSequence3.ts Length: 5sec Header Footer
  30. Dynamic Adaptive Streaming over HTTP

  31. Microsoft, Netflix, Google, Ericsson, Samsung, Adobe Adaptive bitrate streaming MP4,

    WebM, MPEG2-TS MPEG-DASH
  32. <mdp> - Root manifest.mdp <period> - A start time and

    duration. <AdaptationSet> - Audio/Video content <Representation> - Bitrate and Aspect
  33. DRM

  34. WideVine

  35. Google Modular (Android 4.3+) Classic (Android 3+) MPEG-DASH SurfaceView WideVine

  36. PlayReady

  37. MicroSoft PlayReady HLS Android 3+ TextureView PlayReady

  38. ExoPlayer

  39. Google OSS HLS, MPEG-DASH, SmoothStreaming WideVine (4.3+) https://github.com/google/ExoPlayer ExoPlayer

  40. Amazon OSS Bug fix https://github.com/amzn/exoplayer-amazon-port ExoPlayer Amazon Port

  41. Conclusion

  42. Thank you. twitter.com/wasabeef_jp wasabeef.jp github.com/wasabeef