5 min read
The abso-briefest guide to media processing, featuring the Unified MPU

Unified Streaming’s MPU (Media Processing Unit) enhances streaming workflows by enabling media generation and processing capabilities.
This functionality benefits those who are stitching content, inserting ads, and creating personalized streams. (That’s where precise control over media segments is crucial.)
Overview of the tech
Media processing (also called transcoding) is the manipulation of raw, uncompressed media data. In general, this involves the following steps.
༄ Decoding (decompression)
Compressed samples are translated to some non-compressed format, such as raw video frames.
༄ Manipulating the stream of uncompressed data
༄ Re-encoding (compression)
The uncompressed data gets compressed, possibly to a different compression format.
The media processing step is usually part of a larger workflow initiated from one of Unified Streaming’s command line tools such as the static packager (mp4split), unified_remix, and unified_capture.
Example use cases of media processing include:
𓃶 inserting keyframes (for frame-accurate clipping);
𓃶 resizing video frames; and
𓃶 generating jpeg images from a video track.
Use a dedicated MPU and you get software that is deployable in any cloud, installed and configured separately, and which clients access via HTTP.
Unified Streaming’s MPU gives you control, flexibility, scalability, and better performance. All sorts of bells and whistles can make your workflows hum along nicely. Now, and in the future.
What advancements are we talking about, here?
One or more dedicated MPUs, instead of local transcoding, can provide scalability in dealing with transcoding workloads that may be hard to estimate in advance.
The transcoding protocol

The protocol used between the transcoding client (i.e., a command-line application or Unified Origin server) and the MPU uses a single HTTP POST request for each transcoding operation.
On the MPU side, the requested operation is handled by first constructing a processing pipeline. This pipeline is then used to transcode an arbitrary, and potentially large, amount of media data. The data to be transcoded is sent in the request body, and the transcoded data is returned in the reply body.
In both directions, the protocol uses HTTP chunked transfer encoding. To reduce both latency and memory pressure, the MPU will start returning chunks of transcoded data as soon as they become available, even before the end of the request body is received. During the transcoding operation, then, the HTTP connection between the transcoding client and the MPU is used as a fully bidirectional pipe.

Under these conditions, request-level caching between the transcoding client and the MPU makes little sense: it would just lead to high memory pressure on the cache and extra latency for the client.
Multiple clients sharing an MPU

This is an appropriate lightweight deployment when the transcoding clients are usually busy handling other tasks, and transcoding is used only occasionally. Its main advantage is simplicity: only a single MPU (with a single media processing license) is required.
Multiple MPUs per client

When the transcoding clients rely heavily on transcoding, spending most of their time waiting for transcoded media data, a request- or connection-level load balancer is used to distribute the transcoding workload over multiple MPUs. The main advantage: the ability to scale up by simply adding another MPU.
Future innovations
MPU's flexible architecture opens up exciting prospects. Features like JIT (just-in-time) generation of AV1/HEVC variants, watermarking, and even fade-in/fade-out effects could potentially become part of MPU’s toolkit.
Use cases like thumbnails for social media from a webserver doing dynamic just-in-time packaging may also prove possible.
To sum up, then
Enhance user experiences. Repurpose content. Prep for future innovations. Safe to say that MPU can boost your media game.
You didn’t think we’d leave you hangin’, did you?
No chance. Here’s more info. For the nitty-gritty documentation on MPU, head here. For the MPU solution page, head here. More blogs about the topic: here.
To nudge one of our experts, who can discuss just how MPU can help condition your media better, please drop them a line.