Convert 1st-Order Ambisonics to Stereo with FFmpeg

This article explains how to downmix 1st-order Ambisonics (4-channel audio) to a standard stereo (2-channel) format using the FFmpeg pan audio filter. You will learn the exact command-line syntax and mathematical coefficients needed to map both AmbiX and FuMa formats into a balanced stereo field.

Understanding the Channel Mapping

First-order Ambisonics contains four channels: W (omni-directional pressure), X (front-to-back velocity), Y (left-to-right velocity), and Z (up-to-down velocity). To mix this down to stereo, we discard the Z (height) channel and combine W, X, and Y to simulate two virtual cardioid microphones angled at 45 degrees to the left and right.

Depending on how your Ambisonics file was encoded, it will use either the AmbiX (ACN/SN3D) or FuMa (Furse-Malham) standard. You must use the correct channel order for your specific format:


The Stereo Downmix Equations

To create a natural stereo spread without clipping the audio, we use the following mixing coefficients for virtual cardioid microphones pointed at \(\pm45^\circ\):


FFmpeg Commands

Use the following commands in your terminal, choosing the one that matches your input file’s Ambisonics format.

Option 1: For AmbiX Format (Most Common)

If your input file is in the modern AmbiX format (standard for YouTube spatial audio and modern spatial microphones), use this command:

ffmpeg -i input_ambix.wav -filter_complex "pan=stereo|c0=0.5*c0+0.353*c3+0.353*c1|c1=0.5*c0+0.353*c3-0.353*c1" output_stereo.wav

Option 2: For FuMa Format

If your input file is in the legacy FuMa format, use this command:

ffmpeg -i input_fuma.wav -filter_complex "pan=stereo|c0=0.5*c0+0.353*c1+0.353*c2|c1=0.5*c0+0.353*c1-0.353*c2" output_stereo.wav

How the pan Filter Syntax Works