Convert Dolby 5.1/7.1 surround sound to binaural stereo for TWS earbuds and headphones.
- Binaural Conversion - Convert 5.1/7.1 surround to stereo for headphones
- HRTF/SOFA Support - Personalized Head-Related Transfer Functions
- 3D Head Model Import - Generate SOFA files from STL/OBJ head scans
- HeSuVi Integration - Import/export HeSuVi headphone virtualization profiles
- Foobar Audio Convolver - Use Atmos 48kHz/44.1kHz impulse response files
- Stereo Convolver IR Workflow - Export 44/48kHz L/R impulse responses or convert with Equalizer APO / HeSuVi exports (foobar2000 style)
- Virtual Speaker Shifter - Drag speakers to adjust positions with distance-based volume
- Volume Visualizer - Real-time VU meters and waveform display
- Channel Visualizer - Play any file and watch 5.1/7.1/Atmos per-channel levels (GUI tab + TUI CLI), or capture live system audio
- Multi-Codec Support - AAC, MP3, FLAC, Opus, Vorbis, WAV, AC3, E-AC-3, AC-4, TrueHD, DTS, ALAC
- Multi-Container Support - M4A, MP4, MKV, MKA, OGG, WebM, FLAC, WAV, AC-4, DTS
- AC-4 Support - Remux/stream-copy Dolby AC-4 (Atmos) files (stock FFmpeg builds ship no AC-4 decoder, so AC-4 is passthrough-only here)
- Surround Suite Methods - Stereoβ5.1/7.1 upmix, 7.1β5.1 downmix, stream-copy passthrough
- π΅ Media Player - Play audio aloud (ffplay or sounddevice) with live multichannel VU meters, waveform, playlist & real-time conversion preview
- Batch Processing - Convert multiple files at once
- Cross-Platform - Windows (EXE), Linux (AppImage), macOS
- Python 3.8+
- FFmpeg in PATH
pip install -r requirements.txtbuild_exe.batchmod +x build_appimage.sh
./build_appimage.shpython gui_app.pyThe GUI now includes a π΅ Player tab: load a playlist, play with sound output
(ffplay by default, or pip install sounddevice for precise block-level
playback), and watch per-channel VU meters + waveforms. Enable
"Preview conversion" to audition the currently selected conversion method
in real time before exporting.
# Stereo -> 5.1 upmix
python convert_atmos.py stereo.m4a --method upmix51 --codec aac --container m4a
# Stereo -> 7.1 upmix
python convert_atmos.py stereo.m4a --method upmix71 --codec eac3 --container mkv
# 7.1 -> 5.1 downmix
python convert_atmos.py movie71.mkv --method downmix51 --codec eac3 --container mkv
# AC-4 / TrueHD / DTS passthrough (stream copy, no re-encode)
python convert_atmos.py atmos.ac4 --method passthrough --container ac4
python convert_atmos.py truehd.mkv --method passthrough --container mkv
# Lossless TrueHD encode
python convert_atmos.py input.m4a --codec truehd --container mkvVisualize per-channel audio levels (5.1 / 7.1 / Atmos / any layout) for any file FFmpeg can decode (M4A, MP4, MKV, FLAC, WAV, OGG, ...), or capture and visualize live system playback.
Open the Visualizer tab in the main app, click "Open Audio", pick a song, then Play/Pause/Seek while watching the per-channel VU meters and waveforms.
# Live per-channel visualization (playhead follows the song)
python visualize_audio.py song.m4a
# Static ASCII level chart (great for scripting)
python visualize_audio.py song.flac --snapshot
# Accelerated scanning
python visualize_audio.py song.mkv --speed 10
# Live system playback capture (needs sounddevice)
python visualize_audio.py --systemSystem capture uses the optional sounddevice package:
pip install sounddevice (WASAPI loopback on Windows, PulseAudio monitor on Linux).
# Basic conversion
python convert_atmos.py input.m4a
# With specific quality and method
python convert_atmos.py input.m4a --quality ultra --method spatial
# Batch convert all M4A files
python convert_atmos.py --batch /path/to/music
# With HRTF SOFA file
python convert_atmos.py input.m4a --method hrtf --sofa my_hrtf.sofa
# Custom codec and container
python convert_atmos.py input.m4a --codec flac --container flac- Open GUI β Converter tab
- Click "Import SOFA" button
- Select your SOFA file
- Profile appears in HeSuVi dropdown
- Open GUI β Speaker Shifter tab
- Adjust speaker positions
- Export creates WAV files in HeSuVi format
- Supports Atmos impulse response files (48kHz/44.1kHz)
- Place IR files in the
impulse_responses/directory - Select from the IR dropdown in the GUI
- Get your head scan as STL or OBJ file
- Open GUI β Speaker Shifter tab
- Click "Import 3D Model"
- System extracts measurements automatically
Enter these measurements for best results:
- Head circumference (54-62 cm typical)
- Ear-to-ear distance (15-20 cm typical)
- Head width (14-18 cm typical)
audio-atmos-converter/
βββ gui_app.py # GUI application
βββ convert_atmos.py # CLI conversion tool
βββ speaker_shifter.py # Virtual speaker positioning
βββ hrtf_generator.py # HRTF/SOFA generation
βββ head_model_parser.py # 3D STL/OBJ parsing
βββ hesuvi_support.py # HeSuVi format support
βββ volume_visualizer.py # VU meters and waveform
βββ audio_codecs.py # Codec/container config (NOT the Python stdlib codecs)
βββ build_exe.bat # Windows EXE builder
βββ build_appimage.sh # Linux AppImage builder
βββ requirements.txt # Python dependencies
βββ impulse_responses/ # Atmos IR files directory
Instead of applying filter chains to every file, you can capture your processing once as impulse responses and then apply it with fast convolution:
-
Export IR files (GUI: Atmos IR tab β "Export IR Files", or CLI):
python convert_atmos.py --export-ir MyProfile --method spatial
This runs a stereo dirac delta through the selected processing and creates four files in
impulse_responses/stereo/:MyProfile_44_left.wav MyProfile_44_right.wav MyProfile_48_left.wav MyProfile_48_right.wavThese contain all of the processing for stereo content and work with foobar2000's Stereo Convolver component (
foo_dsp_stereoconv.dll). -
Convert with IR pairs (GUI: "Stereo Convolver (IR)" method, or CLI):
python convert_atmos.py input.m4a --convolve MyProfile
The 44 kHz pair is used for 44.1 kHz content, the 48 kHz pair otherwise (audio is resampled to match). 5.1/7.1 input is downmixed to stereo first.
You can also import IR pairs exported from HeSuVi/Equalizer APO (the
*_44_left/right.wav, *_48_left/right.wav benchmark files) via the GUI
"Import Pair" button, or place them in impulse_responses/stereo/.
- M4A, MP4, MKV, MP3, FLAC, WAV, AAC, OGG
- Dolby 5.1, 7.1, and Atmos
| Format | Container | Quality |
|---|---|---|
| AAC | M4A/MP4 | Lossy |
| MP3 | MP3 | Lossy |
| FLAC | FLAC | Lossless |
| Opus | OGG/WebM | Lossy |
| Vorbis | OGG | Lossy |
| PCM | WAV | Lossless |
| AC-4 | AC4/MP4/MKV | Lossy (Atmos) |
| TrueHD | MKV | Lossless |
| DTS | DTS/MKV | Lossy |
| ALAC | M4A/MKV | Lossless |
- Standard - ITU-R BS.775 downmix
- Enhanced - Downmix with bass boost
- Spatial - HRTF-like binaural effect
- HRTF - Personalized with SOFA file
- Custom - User-defined speaker positions
- Upmix 5.1 / 7.1 - Surround upmix from stereo with FFmpeg's
surroundfilter - Downmix 7.1β5.1 - Fold side channels into rears
- Passthrough - Stream copy / remux (AC-4, TrueHD, DTS, ...)
Speakers automatically attenuate volume when moved away from center using inverse distance law.
MIT License
- FFmpeg - Audio processing engine
- HeSuVi - Headphone virtualization format
- Foobar2000 - Audio convolver reference