After introducing the concept of media optimization and understanding its value –improving viewing experience for streaming services, reducing storage and delivery costs – we can focus on a more practical issue: How to integrate media optimization into an existing video processing workflow.

A typical video processing workflow begins with a high quality file, called a Master or Mezz file.  This is a high-resolution, high-bitrate version of content, which serves as the reference for creating all other versions.

The first step is to encode the video file into various profiles, which are sets of parameters (resolutions, bitrates, encoding modes) that fit a particular end-device or connectivity bandwidth. Typically, each video title is encoded into 10-15 different profiles, at different resolutions and bitrates.  The player app in each client device “pulls” the right version from the streaming server based on the capabilities of the device, and momentary data bandwidth available.  This method is called Adaptive Bitrate Streaming (ABR), and is commonly used for delivery of OTT video content.

The second step is packaging the video file for delivery.  ABR protocols, such as HLS and MPEG-DASH, divide each encoded file into small segments or packets, which flow over the network more easily and provide flexibility when switching between the different profiles. For paid streaming services, there is an additional step of encrypting the video content to ensure that only eligible customers gain access.

After the video is encoded, packaged and encrypted, it is placed on a server that delivers the streams to the end user.  The content from the server is typically cached by a CDN to enable better performance and lower delivery costs for global distribution.

Media optimization reduces the bitrate of video streams while preserving their quality.  Therefore, the best place to apply media optimization is right after encoding the file, and before packaging it.  The initial encode is required to provide a quality reference to the media optimizer, which then preserves this quality in its output.

Since packaging depends on the bitrate of the files, the packaging and encryption step is performed after optimizing them.  In such a workflow, you first encode the video with your chosen ABR profiles, and then optimize each one of them.  Finally, the streams are optimized, packaged, encrypted (if necessary) and delivered to the end user.

A good media optimization solution preserves all the attributes of its input file, so the packaging step can be applied to the optimized file in exactly the same way as it would have been performed for the regular encoded file.  It’s also important that a media optimization solution preserves the locations of the key frames (I-frames) in each ABR stream, so they are synchronized after optimization.  This ensures that the client device can seamlessly switch between the encoded ABR streams, based on available bandwidth.

As you can see, integrating media optimization into a workflow is pretty straightforward.  Once you have your content management and processing workflows in place, it’s just an additional process to run in the system.  Future posts will cover more advanced issues such as integrating watch folder functionality, eliminating unnecessary ABR profiles after optimization and controlling the workload of optimizing several files in parallel.