Skip to content

unifiedstreaming/mpu

Repository files navigation


Warning

This repository and associated container images are for demo purposes only.

Please refer to our documentation on how to install Unified Streaming products on your desired operating system and architecture where addition configuration options maybe required.

What is Unified MPU?

Unified MPU (Media Processing Unit) is a powerful add-on designed to enhance media workflows centered around Unified Streaming. It simplifies video processing tasks such as precise content editing, thumbnail creation, and ad-ready media preparation. With MPU, you can:

  • Enhance content delivery: Improve the quality and efficiency of your media workflows.
  • Boost operational agility: Streamline media processing tasks with ease.
  • Unlock monetization opportunities: Prepare media for ads and other revenue-generating activities.
  • Future-facing approach: Stay ahead with scalable and flexible media processing solutions.

MPU is designed to work seamlessly across any infrastructure—on-premises or in the cloud—ensuring flexibility and efficiency.

Documentation and Resources

For more information, check out the following resources:

Installation

Prerequisites

  • Docker installed on your system.
  • A valid UspLicenseKey. You can create an account here to evaluate the software free for 7days.

Docker Images

The following Docker images are available for MPU:

  • docker.io/unifiedstreaming/mpu
  • docker.io/unifiedstreaming/x264-encoding-service

Deployment

  1. Clone this repository.
  2. Deploy the Docker stack using the following command:
docker compose up -d

This will create a Docker network called mpu and start the mpu and x264-encoding-service containers.

  1. Verify the containers are running:
docker compose ps -a

Configuration

Environment Variables

MPU requires specific environment variables for configuration. Below are the key variables:

MPU

Variable Usage Mandatory?
UspLicenseKey Your license key. Required for evaluation and production use. Yes
LOG_LEVEL Sets the Apache error log level (default: warn) No
LOG_FORMAT Sets a custom Apache log format No

X264 Encoding Service

Variable Usage Mandatory?
LOG_LEVEL Sets the Apache error log level (default: warning) No
LOG_FILE Log to file (default: /dev/stdout) No
MAX_CONCUR_REQS Sets max concurrent requests (default: 17; 0=unlimited). No
MAX_CONS Sets max connections (default: 128; 0=unlimited). No

Usage

Frame-Accurate Clipping

Create new video assets from an existing stream with frame accuracy. This is ideal for highlights, social sharing, or archiving.

Example: Capture a Clip

docker run \
    --network mpu \
    --rm \
    -it \
    -e UspLicenseKey \
    -v ${PWD}:/data \
    --workdir /data \
unifiedstreaming/unified_capture:latest --transcode_proxy_pass=http://mpu/transcoding/ \
    --frame_accurate \
    -o capture.ismv \
'https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.mpd?t=00:01:00.000-00:01:05.000'

Generate Tiled Thumbnails

Produce high-quality JPEG thumbnails for smooth video scrubbing.

This is achieved by using the --trickplay and --fourcc=jpeg options, along with the --transcode_proxy_pass argument, to process media through the deployed mpu container.

Example: Generate Thumbnails

docker run \
    --network mpu \
    --rm \
    -it \
    -e UspLicenseKey \
    -v ${PWD}:/data \
    --workdir /data \
unifiedstreaming/mp4split --transcode_proxy_pass=http://mpu/transcoding/ \
    --trickplay \
    --fourcc=jpeg \
    --thumbnail_interval=4 \
    --thumbnail_width=224 \
    --thumbnail_height=100 \
    --thumbnail_htiles=4 \
    --thumbnail_vtiles=5 \
    -o thumbnail.ismv \
'https://usp-s3-storage.s3.eu-central-1.amazonaws.com/virtual-channel-bbb/BigBuckBunny-avc1-300k.mp4'

Media Remixing and Monetization

Transform media for reuse and monetization using SMIL (Synchronized Multimedia Integration Language).

In a unified_remix workflow, the SMIL file supports the clipMode="sample" attribute to enable frame-accurate media conditioning. This option, combined with the --transcode_proxy_pass argument, allows the use of the deployed mpu container for processing.

Example: Remix Media

  1. Define a Remix SMIL file:
cat << EOF > input.smil
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
  <head>
  </head>
  <body>
    <seq>
      <video src="https://usp-s3-storage.s3.eu-central-1.amazonaws.com/tears-of-steel/tears-of-steel-avc1-1000k.mp4"
        clipMode="sample" clipEnd="wallclock(1970-01-01T00:00:05.000Z)" />
    </seq>
  </body>
</smil>
EOF
  1. Process the SMIL to create a remixed MP4:
docker run \
    --network mpu \
    --rm \
    -it \
    -e UspLicenseKey \
    -v ${PWD}:/data \
    --workdir /data \
unifiedstreaming/unified_remix --transcode_proxy_pass=http://mpu/transcoding/ \
-o output.mp4 \
input.smil
  1. Create a server manifest (.ism) for the remixed MP4:
docker run \
    --network mpu \
    --rm \
    -it \
    -e UspLicenseKey \
    -v ${PWD}:/data \
    --workdir /data \
unifiedstreaming/mp4split \
    --hls.client_manifest_version=4 \
    --hls.minimum_fragment_length=192/100 \
    -o output.ism \
    output.mp4
  1. Request an HLS media client manifest (.m3u8) for playback:
docker run \
    --network mpu \
    --rm \
    -it \
    -e UspLicenseKey \
    -v ${PWD}:/data \
    --workdir /data \
unifiedstreaming/mp4split \
    -o stdout:.xml \
    output.ism/.m3u8

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published