ReplayGain: trouble getting GStreamer to work

Hello. Can anyone, please, help me to get ReplayGain to work?

My goal is to analyze FLAC files. I figured that that format could be handled by the GStreamer backend. So, on my macOS I installed both GStreamer and its dependency – PyGObject 3.x (python-gi):

$brew ls

But when I enable the ReplayGain plugin, beets throws an error:

$ beet
error: replaygain initialization failed: Failed to load GStreamer: python-gi not found

What am I doing wrong? Is there an easier way to analyze FLACs?

Huh! GStreamer dependencies can be tricky. Can you check that the Python versions agree—i.e., that both beets and pygobject are installed for either Python 2.x or 3.x?

Here’s what I get:

$ beet version
beets version 1.4.5
Python version 3.6.2

$ brew info pygobject
pygobject: stable 2.28.6 (bottled)
GLib/GObject/GIO Python bindings for Python 2

$ brew info pygobject3
pygobject3: stable 3.26.0 (bottled)

Is pygobject for Pyton 2 in conflict with pygobject3? Shall I delete it?

Hmm—I’m not familiar enough with the vagaries of Homebrew to know if there’s any manner of conflict. It might be useful to ask there! The goal should be to be able to open a python3 prompt and type import gi without triggering an error.

Thanks, Adrian. You’ve pointed me in the right direction and I googled my way to victory:

  1. To achieve an errorless $ python3 -c "import gi, I did this.
  2. Then GStreamer started to complain about missing plugins. I did $ homebrew install gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav and GStreamer shut up.

Now I must learn to actually use ReplayGain. In your experience, is GStream the best backend for equalizing the loudness of FLACs?

Aha! That’s tricky. Maybe we should mention that extra flag in the docs for the RG plugin?

I actually don’t have a solid opinion about which backend produces the best RG results. This actually seems hard to measure—a thorough comparison could be an interesting project if anyone’s interested!