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

Video Streaming at Sky

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Video Streaming at Sky

Avatar for Andrew Jack

Andrew Jack

March 15, 2016
Tweet

More Decks by Andrew Jack

Other Decks in Technology

Transcript

  1. 6

  2. 10 Implementations • Smooth Streaming (Microsoft) • HTTP Dynamic Streaming

    (Adobe) • HLS - HTTP Live Streaming (Apple - RFC) • DASH - Dynamic Adaptive Streaming over HTTP (International Standard)
  3. 12 HLS differences between Live and VOD Live • Playlist

    includes 5-10 chunks • Playlist needs to be refreshed every n seconds • Seek very, very limited (only inside Player buffer) VOD • Playlist includes all chunks • Playlist is downloaded once at the beginning • Seek possible (time inside asset points to .ts chunk remember: continues index between chunks
  4. 13 HLS vs DASH Advantages • Enforces chuck sizes, meaning

    smoother & efficient bit rate switching • Native in Chrome/ Android Disadvantages • No native iOS support
  5. 27 Video Quality Analytics Help us to improve our configurations

    for: • Initial buffer time • Size of buffer • Device specific settings • ABR switching (Work with third parties)
  6. 33 Android’s support http://developer.android.com/guide/appendix/media-formats.html Streaming protocols • RTSP (RTP, SDP)

    • HTTP/HTTPS progressive streaming • HTTP/HTTPS live streamingdraft protocol: • MPEG-2 TS media files only • Protocol version 3 (Android 4.0 and above) • Protocol version 2 (Android 3.x) • Not supported before Android 3.0
  7. 34 Android’s support Video formats • H.263 • H.264/AVC •

    H.265/HEVC (5.0+) • MPEG-4 SP • VP8 (2.3.3+) • VP9 (4.4+) Audio formats • AAC LC • HE-AAC v1 • HE-AACv2 • AAC ELD (4.1+) • AMR-NB • AMR-WB • FLAC (3.1+) • MP3 • ….. http://developer.android.com/guide/appendix/media-formats.html
  8. 36 VideoView http://developer.android.com/reference/android/widget/VideoView.html android.widget.VideoView @Override protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState); setContentView(R.layout.activity_video_view); VideoView videoView = (VideoView) findViewById(R.id.view_video); // set media controller videoView.setMediaController(new MediaController(this)); // set video stream to play videoView.setVideoURI(Uri.parse(videoUri)); // start playback videoView.requestFocus(); videoView.start(); }
  9. 37 MediaPlayer & SurfaceView @Override protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState); setContentView(R.layout.activity_media_player); SurfaceView surfaceView = (SurfaceView) findViewById(R.id.surface_view); SurfaceHolder holder = surfaceView.getHolder(); // create media player object final MediaPlayer mp = new MediaPlayer(); holder.addCallback(new SurfaceHolder.Callback() { @Override public void surfaceCreated(SurfaceHolder holder) { mp.setDisplay(holder); try { mp.setDataSource(videoUri); mp.prepare(); } catch (Exception e) { } mp.start(); } // ... ommitted methods for example }); } android.media.MediaPlayer android.view.SurfaceView http://developer.android.com/reference/android/media/MediaPlayer.html http://developer.android.com/reference/android/view/SurfaceView.html
  10. 40 ExoPlayer https://github.com/google/ExoPlayer • Supports DASH, SmoothStreaming, and HLS •

    Customizable and extendable • Update the player with your app • Fewer device specific issues • Relies on Android’s MediaCodec api, which is available on Android 4.1, (API level 16) • 4.3 for Widevine DRM