Search code examples
video-streamingstreaminglive-streaming

media streaming: when packaging take place


It's not clear for me when transcoding and packaging take place.

  • Transcoding:
    • Adapt input encoding to streaming delivery formats (fmp4 for example...).
    • Generates several bitrates and resolution.
  • Packaging:
    • Segmentation and metadata generation.

My question is:

  • Is packaging performed on demand?

Solution

  • Assuming you are talking about video, the simple answer is that packaging typically today is on demand as you say, using a 'Just in Time' packager or origin server.

    The delivery is usually via a CDN which will cache whatever it delivers - i.e. both HLS and DASH streams, and as an added complication different bit rate versions of each segment of the HLS and DASH streams.

    In the past this was further complicated by the need to encrypt differently the streams if they were using Widevine, PlayReady or FairPlay.

    The move to CENC common encryption, which allows multiple DRM's use the same encryption approach, and to CMAF Media Format which allows a common format for the media segments between HLS and DASH is moving the industry towards a single format for the media itself which can be stored as one copy and encrypted and streamed as either HLS or DASH as required by the requesting device.

    Some notes:

    • the output from the encoder is usually packaged in some way anyway, so the JIT origin server is often actually repackaging from one format to another. For example if the output of the encoder is packaged as Smooth Streaming, the JIT origin may re-package it to HLS or DASH depending on the needs of the requesting device/client.
    • For VOD, it is possible for content to be encoded and packaged in advance into both HLS and DASH and separate copies stored. Many cloud encoders will produce both formats if required. Similarly, separate HLS and DASH live streams could be output from an encoder, but this is not usual.
    • Encryption is typically applied 'Just in Time' also at the Origin server when it packages the content.