This plugin adds support for ReplayGain, a technique for normalizing audio playback levels.
This plugin can use one of four backends to compute the ReplayGain values: GStreamer, mp3gain (and its cousin, aacgain), Python Audio Tools and bs1770gain. mp3gain can be easier to install but GStreamer, Audio Tools and bs1770gain support more audio formats.
Once installed, this plugin analyzes all files during the import process. This can be a slow process; to instead analyze after the fact, disable automatic analysis and use the beet replaygain command (see below).
To use GStreamer for ReplayGain analysis, you will of course need to install GStreamer and plugins for compatibility with your audio files. You will need at least GStreamer 1.0 and PyGObject 3.x (a.k.a. python-gi).
Then, enable the replaygain plugin (see Using Plugins) and specify the GStreamer backend by adding this to your configuration file:
replaygain:
backend: gstreamer
In order to use this backend, you will need to install the mp3gain command-line tool or the aacgain fork thereof. Here are some hints:
Then, enable the plugin (see Using Plugins) and specify the “command” backend in your configuration file:
replaygain:
backend: command
If beets doesn’t automatically find the mp3gain or aacgain executable, you can configure the path explicitly like so:
replaygain:
command: /Applications/MacMP3Gain.app/Contents/Resources/aacgain
This backend uses the Python Audio Tools package to compute ReplayGain for a range of different file formats. The package is not available via PyPI; it must be installed manually (only versions preceding 3.x are compatible).
On OS X, most of the dependencies can be installed with Homebrew:
brew install mpg123 mp3gain vorbisgain faad2 libvorbis
To use this backend, you will need to install the bs1770gain command-line tool. Follow the instructions at the bs1770gain Web site and ensure that the tool is on your $PATH.
Then, enable the plugin (see Using Plugins) and specify the backend in your configuration file:
replaygain:
backend: bs1770gain
For Windows users: the tool currently has issues with long and non-ASCII path names. You may want to use the asciify_paths configuration option until this is resolved.
To configure the plugin, make a replaygain: section in your configuration file. The available options are:
These options only work with the “command” backend:
These options only works with the “bs1770gain” backend:
By default, the plugin will analyze all items an albums as they are implemented. However, you can also manually analyze files that are already in your library. Use the beet replaygain command:
$ beet replaygain [-a] [QUERY]
The -a flag analyzes whole albums instead of individual tracks. Provide a query (see Queries) to indicate which items or albums to analyze.
ReplayGain analysis is not fast, so you may want to disable it during import. Use the auto config option to control this:
replaygain:
auto: no