How to Create IMF MXF Files with FFmpeg

This article explains how to use FFmpeg to generate media files that comply with the Interoperable Master Format (IMF) standard. You will learn the specific FFmpeg commands required to encode video to IMF-compliant JPEG 2000 or ProRes formats inside the necessary MXF (Material Exchange Format) container.

Understanding FFmpeg and IMF

The Interoperable Master Format (IMF) is not a single file, but a package (an Interoperable Master Package, or IMP) consisting of MXF-wrapped audio and video tracks, along with XML metadata files.

While FFmpeg cannot generate the XML packaging files (like the Composition Playlist or Packing List), it is the primary tool used to encode the high-quality, compliant video and audio MXF files that populate the IMF package.


Option 1: Encoding IMF App 2 (JPEG 2000 in MXF)

IMF Application 2 typically uses JPEG 2000 (J2K) video encoding. To create an IMF-compliant J2K MXF file, use the OpenJPEG library (libopenjpeg) in FFmpeg.

The Command:

ffmpeg -i input.mp4 -c:v libopenjpeg -pix_fmt yuv422p10le -colorspace bt709 -color_primaries bt709 -color_trc bt709 -c:a pcm_s24le output.mxf

Parameter Breakdown:


Option 2: Encoding IMF App 2e (ProRes in MXF)

IMF Application 2e allows the use of Apple ProRes instead of JPEG 2000. This is highly common for post-production workflows.

The Command:

ffmpeg -i input.mp4 -c:v prores_ks -profile:v 3 -vendor ap10 -pix_fmt yuv422p10le -c:a pcm_s24le output.mxf

Parameter Breakdown:


Next Steps: Creating the IMP

Once you have generated your IMF-compliant MXF files using FFmpeg, you must use an IMF authoring or packaging tool (such as Netflix’s Photon, Claire, or DaVinci Resolve) to import these MXF files and generate the final XML metadata files (CPL, PKL, OPL, and ASSETMAP) required to complete the Interoperable Master Package.