Modern & secure adaptive streaming on the Web by Katarzyna Dusza

Learn how modern web streaming works with adaptive bitrates and DRM. Explore protocols like DASH and HLS, Media Source Extensions, content segmentation and encryption.

Key takeaways
  • Modern web streaming requires segmentation, adaptive bitrate streaming and DRM to ensure smooth playback

  • Two main streaming protocols are used:

    • MPEG-DASH (Dynamic Adaptive Streaming over HTTP)
    • HLS (HTTP Live Streaming by Apple)
  • Media Source Extensions (MSE) enable:

    • Control over data buffering
    • Playing fragmented content
    • Switching between different bitrates
  • Key components for adaptive streaming:

    • Content split into small segments (typically 2 seconds)
    • Multiple bitrate versions of same content
    • DASH manifest file (.mpd) describing content structure
    • Client-side bitrate switching based on bandwidth
  • Three main DRM systems:

    • Google Widevine
    • Apple FairPlay
    • Microsoft PlayReady
  • Encrypted Media Extensions (EME) provides:

    • DRM functionality in the browser
    • Communication between web app and Content Decryption Module (CDM)
    • License acquisition and content decryption
  • MP4 file structure consists of:

    • File type atom (ftyp)
    • Movie metadata atom (moov)
    • Media data atom (mdat)
    • Protection info atom (sinf) for encrypted content
  • Smooth playback requires:

    • Proper content segmentation with consistent segment lengths
    • Multiple bitrate versions for adaptive streaming
    • DRM integration for protected content
    • Buffer management through MSE
  • Tools for content preparation:

    • FFmpeg for transcoding/encoding
    • Bento4 for MP4 manipulation and encryption
    • DASH manifest generators