ffmpeg-audio-spatial

Generate binaural headphone mixes or multichannel surround outputs with FFmpeg.

15|4|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/damionrashford/media-os --skill ffmpeg-audio-spatial
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ffmpeg-audio-spatial
Source: https://github.com/damionrashford/media-os/tree/main/skills/ffmpeg-audio-spatial
Command: npx skills add https://github.com/damionrashford/media-os --skill ffmpeg-audio-spatial

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Turning stereo or multichannel audio into headphone-friendly binaural mixes or immersive surround layouts can be challenging and inconsistent; this Skill provides a FFmpeg-based workflow to reliably produce spatial audio outputs.

Core Features & Use Cases

  • Binaural conversion from 5.1/7.1 to stereo using built-in headphone or custom SOFA-based sofalizer filters.
  • Stereo-to-multichannel upmix (e.g., 5.1/7.1) and multichannel remapping with pan and channel maps.
  • Widening, earwax, and crossfeed effects to improve headphone listening comfort.
  • Channel splitting, merging, and re-assembly into new layouts using amerge and pan.
  • Script-based automation via scripts/spatial.py that prints the exact ffmpeg command for reproducible results.

Quick Start

Convert a stereo input to a binaural headphone mix or a 5.1/7.1 surround output using the spatial.py script.

Frequently Asked Questions about ffmpeg-audio-spatial

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert 5.1 surround audio to binaural for headphones using FFmpeg?

Binaural conversion from 5.1 surround to stereo uses FFmpeg's built-in headphone filter or custom SOFA-based sofalizer filters. This Skill generates the exact FFmpeg command to produce headphone-ready binaural mixes from multichannel sources.

Can I upmix stereo audio to 7.1 multichannel surround with FFmpeg?

Stereo-to-multichannel upmix to 5.1 or 7.1 is supported using FFmpeg's pan and channel maps. The workflow splits, merges, and reassembles audio channels into new immersive layouts via amerge and pan.

Does FFmpeg support custom HRTF profiles for spatial audio processing?

Custom HRTF profiles are supported through the sofalizer filter, which accepts SOFA files. This enables accurate binaural spatial audio rendering for headphone listening from standard surround inputs.

What is the best way to improve headphone listening comfort for stereo audio in FFmpeg?

Widening, earwax, and crossfeed effects improve headphone listening comfort. This Skill automates these FFmpeg audio filters to reduce fatigue and enhance spatial perception during headphone playback.

How do I remap specific audio channels in FFmpeg for surround sound?

Channel remapping for surround sound uses explicit channel maps and ClockWise maps in FFmpeg. This allows precise routing of audio channels into multichannel layouts for spatial outputs.

Is scripting required to automate spatial audio processing with FFmpeg?

No, the included spatial.py script automates spatial audio processing by printing the exact, reproducible FFmpeg command. You simply execute the generated command to produce binaural or surround outputs.