Skip to content

Update to FFmpeg@6#38

Open
xaviliz wants to merge 3 commits intoMTG:masterfrom
xaviliz:feat/update-to-ffmpeg@6
Open

Update to FFmpeg@6#38
xaviliz wants to merge 3 commits intoMTG:masterfrom
xaviliz:feat/update-to-ffmpeg@6

Conversation

@xaviliz
Copy link

@xaviliz xaviliz commented Feb 5, 2026

Update the homebrew formula to FFmpeg-v6

PROBLEM

The current Essentia Homebrew formula fails to build Python bindings when six is not installed, and older FFmpeg versions prevent installing the latest Essentia version.

Users encounter ModuleNotFoundError: No module named 'essentia' when attempting to import the Python bindings.

SOLUTION

  • Ensure Python dependencies numpy and six are installed before building Essentia Python bindings using a virtual environment.
  • Update the formula to explicitly depend on ffmpeg@6 to allow building the current Essentia version.
  • Fix the .pth file creation so Python automatically discovers the installed bindings without overwriting existing files.
  • Keep optional dependencies for Gaia and TensorFlow configurable.

PREREQUISITES

  • Homebrew ≥ 4.0 (tested on macOS M4 with ARM64 machine)
  • Python 3.11 (formula installs python@3.11 if missing)
  • Xcode Command Line Tools (for compiling C++ dependencies)

No need to pre-install numpy or six manually — handled in the formula

CLOSES

HOW TO REPRODUCE

Attempt to install Essentia with the previous formula:

 brew install --build-from-source ./essentia.rb

Observe errors:

Missing six module
Python ModuleNotFoundError for essentia

HOW TO TEST

After updating the formula in the homebrew-essentia repository:

Option 1: From the local formula

Navigate to the directory containing the updated formula

brew install --build-from-source ./essentia.rb

Test Python bindings

python3.11 -c "import essentia.standard as estd; import essentia.streaming as estr; estd.MusicExtractor()('/System/Library/Sounds/Glass.aiff')"

Option 2: From the GitHub tap

Add the tap

brew tap xavierlizarraga/homebrew-essentia https://github.com/xavierlizarraga/homebrew-essentia.git

Install Essentia from the tap

brew install --build-from-source homebrew-essentia/essentia

Test Python bindings

python3.11 -c "import essentia.standard as estd; import essentia.streaming as estr; estd.MusicExtractor()('/System/Library/Sounds/Glass.aiff')"

Both methods ensure Essentia is compiled with FFmpeg-v6, and Python dependencies (numpy and six) are installed in a virtual environment so that the Python bindings work out of the box.

- Formula works properly with `brew install -HEAD`
- Issue with six package, install it later via pip
	- /opt/homebrew/Cellar/python@3.9/3.9.25/bin/python3.9 -m pip install six
- Essentia is properly installed:
	- >>> /opt/homebrew/Cellar/python@3.9/3.9.25/bin/python3.9
	- >>> import essentia
	- >>> from essentia.standard import AudioLoader, MonoLoader, EasyLoader, EqloudLoader, MonoWriter, AudioWriter
	- Update to ffmpeg@6
	- Install in a virtual environment
	- Fix six package issue
	- Prevents `will not overwrite` error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant