FFmpeg: Multiplex Multiple Mono Audio Tracks in MXF

This guide explains how to use FFmpeg to multiplex multiple audio tracks as discrete mono streams within an MXF (Material Exchange Format) container. You will learn the exact command-line syntax, channel mapping techniques, and stream configurations required to output broadcast-compliant MXF files with individual, isolated audio channels.

Multiplexing Independent Mono Input Files

When you have a video file and several independent mono audio files (such as separate microphone tracks or language tracks), you must map each file to its own output stream and define the channel layout as mono.

Run the following command to multiplex a video and four separate mono WAV files into an MXF container:

ffmpeg -i video.mp4 -i track1.wav -i track2.wav -i track3.wav -i track4.wav \
-map 0:v \
-map 1:a -map 2:a -map 3:a -map 4:a \
-c:v copy \
-c:a pcm_s24le -channel_layout mono \
output.mxf

Command Breakdown:


Splitting a Stereo Input into Discrete Mono Tracks

If your source file has a single stereo audio track, you must split the stereo channels into two individual mono streams using the channelsplit filter before wrapping them into the MXF container.

Use this command to split a stereo track into two discrete mono tracks:

ffmpeg -i input.mp4 \
-filter_complex "[0:a]channelsplit=channel_layout=stereo[left][right]" \
-map 0:v \
-map "[left]" -map "[right]" \
-c:v copy \
-c:a pcm_s24le \
output.mxf

Command Breakdown:


Verifying the Output File

To ensure that the MXF container contains discrete mono tracks rather than a multi-channel stereo track, analyze the output file using ffprobe:

ffprobe -i output.mxf

In the output metadata, you should see multiple stream entries for audio, each designated as mono:

Stream #0:0: Video: mpeg2video ...
Stream #0:1: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit)
Stream #0:2: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit)