Getting Started

mp4ff is a collection of command-line tools for working with MP4/ISOBMFF files, with a focus on fragmented files used in MPEG-DASH, HLS fMP4, and CMAF streaming workflows. Tools include mp4ff-info for inspecting files, mp4ff-encrypt and mp4ff-decrypt for Common Encryption (CENC), mp4ff-crop for trimming, and mp4ff-nallister for listing NAL units. It is built from the Eyevinn/mp4ff open source library.

On OSC, mp4ff runs as an on-demand job: you create an instance with the command-line arguments you need and it exits when the job completes.

Prerequisites

  • An OSC account (sign up here)
  • An S3-compatible bucket (e.g. MinIO on OSC) if your input or output files are stored in object storage

Step 1: Store S3 credentials as secrets (if using object storage)

If your MP4 files are in a MinIO or S3 bucket, create secrets for your credentials before creating an mp4ff instance. Navigate to the mp4ff service page, go to the Service Secrets tab, and click New Secret for each value:

Secret name Value
accesskeyid Your S3/MinIO access key ID
secretaccesskey Your S3/MinIO secret access key

See the Working with Secrets guide for full instructions.

Step 2: Create an mp4ff instance

Go to the My mp4ffs tab and click Create mp4ff. Fill in:

  • Name: a unique name for this job (alphanumeric only, e.g. inspectclip)
  • cmdLineArgs: the full mp4ff command and arguments (see examples below)
  • awsAccessKeyId: {{secrets.accesskeyid}} (if using S3/MinIO)
  • awsSecretAccessKey: {{secrets.secretaccesskey}} (if using S3/MinIO)
  • s3EndpointUrl: your MinIO endpoint URL, e.g. https://myminio.minio-minio.auto.prod.osaas.io (if using MinIO on OSC)

Click Create. The instance runs the job and exits automatically.

CLI usage

Inspect a local MP4 file stored in MinIO:

osc create eyevinn-mp4ff inspectclip \
  -o cmdLineArgs="mp4ff-info -l s3://mybucket/clip.mp4" \
  -o awsAccessKeyId="{{secrets.accesskeyid}}" \
  -o awsSecretAccessKey="{{secrets.secretaccesskey}}" \
  -o s3EndpointUrl="https://myminio.minio-minio.auto.prod.osaas.io"

Available tools

Tool What it does
mp4ff-info Print a detailed report of a fragmented or progressive MP4 file
mp4ff-encrypt Encrypt a fragmented MP4 using Common Encryption (CENC/CBCS)
mp4ff-decrypt Decrypt a CENC/CBCS-encrypted fragmented MP4
mp4ff-crop Trim a fragmented MP4 to a time range
mp4ff-nallister List NAL units (video elementary stream analysis)

Run any tool with -h in cmdLineArgs to see its full usage, e.g. cmdLineArgs="mp4ff-info -h".

Resources