MP3-Stereo-Analyzer: Check, Fix, and Compare MP3 Earbud Audio

thumbnail
MP3-Stereo-AnalyzerMake sure both earbuds play the full audioAnalyze--fix--compare

MP3-Stereo-Analyzer is a Python tool that checks whether your MP3 files are correctly formatted to play in both earbuds. It is published on PyPI and catches a frustrating, common problem: a track where one earbud plays only the music and the other only the vocals, or where the channels are phase-inverted and cancel out.

Installation

pip install mp3-stereo-analyzer

It needs FFmpeg for audio decoding:

brew install ffmpeg        # macOS

Usage

# Analyze a single file
mp3-stereo-analyzer your_file.mp3

# Analyze every MP3 in a folder
mp3-stereo-analyzer *.mp3

# Detect AND fix files that play different audio in each ear
mp3-stereo-analyzer --fix your_file.mp3

# Compare versions and pick the best one
mp3-stereo-analyzer --compare old.mp3 new.mp3

What it checks

The analyzer reports the format (channels, sample rate, bit depth, bitrate) and runs five tests:

  • Channel count: the file actually contains audio channels.
  • Left channel signal: the left channel is not silent.
  • Right channel signal: the right channel is not silent.
  • Stereo balance: the left and right RMS levels are within range (not heavily panned).
  • Channel content match: both channels carry the same material, using cross-channel correlation to catch the case where each ear hears different or phase-inverted audio that earlier per-channel checks could not detect.

Fixing a problem file

If a file fails the channel content test, run it with --fix. The tool writes a corrected copy named your_file (fixed-bothears).mp3 in which both channels carry the full left-plus-right mix, so voice and music play in both earbuds. The original is left untouched and the bitrate is preserved.

Comparing two versions

With --compare, the tool prints a side-by-side table and an overall score, then recommends the best version. The score weighs bitrate, audio bandwidth, loudness, sample rate, bit depth, healthy stereo, and a clipping penalty, treating differences below a just-noticeable threshold as ties.

Troubleshooting

If the analyzer returns PASS but you still hear only one ear on an iPhone, check iOS Settings > Accessibility > Audio/Visual > Balance (centered at 0.00), and that your adapter or Bluetooth buds are properly paired and seated.

Links

Comments

Popular posts from this blog

[Solved] Error: No such keg: /usr/local/Cellar/gcc

[How To] Unfollow Non-followers on Instagram