Ubuntu / Linux news and application reviews.

beets is a cross-platform command line music tagger and organizer which you can use to "get your music collection right once and for all".

It can improve your music collection metadata by using MusicBrainz, download cover art for all your albums, reorganize your music files, fix filenames and more.

Further more, beets is extensible through plugins which add extra functionality like  embedding or extracting album art from files, fetch lyrics for all your songs, clean up tags and and there's even a HTML5 web player (though it's very basic and can't do too much for now).


beets

While beets tries to automatically get the metadata based on already existing tags,  if the similarity is under 95%, beets will prompt you to select the best match so the process is not fully automated (though you can set it to automatically skip albums that need user input). Also, beets might not be able to automatically get the metadata if some albums don't have any tags at all.

In my test, beets worked great to fix bad or missing tags, but fetching the album art didn't work so great: it was able to download album art for only about 25% of the albums.


Beets introduction video


Here's a introduction video for beets, created by its developer:





Installation


To install beets in Ubuntu, you need to install its dependencies firstly:
sudo apt-get install python-dev python-setuptools python-pip

Then, install beets using the following command
sudo pip install beets

In Ubuntu 12.04 Precise Pangolin, you can install beets from the official repositories.

For Arch Linux, get the latest version via AUR.


beets installation for other Linux distributions, Windows and Mac OS X: Getting Started with beets.



How to use beets


Firstly, create a new file called '.beetsconfig' in your home directory and open it with a text editor. For instance, run this command if you have Gedit installed:
gedit ~/.beetsconfig

And in this file, copy/paste the following:
[beets]
directory: /path/to/music
library: /path/to/musiclibrary.blb

Where:
  • "directory" is the path to the directory where your music will be copied after it has been re-organized by beets (to get beets to use your current directory structure and don't copy your music, see below).
  • "library" is the path do your music library database (the file doesn't initially exist, so just enter the path to where you want it to be stored)

Then save the file. All available configuration options are available HERE.


Now you can start importing your music to the beets library. By default, beets will copy the imported music into the directory you specified in the config file - to start this process (it may take a long time!), use the command below:
beet import /path/to/music

If you want beets to use your current directory structure and don't copy the music to the directory defined in its configuration, use "-C":
beet import -C /path/to/music

To only import files, without autotagging, use "-A":
beet import -A /path/to/music

You can also set beets not to write the tags to the files but keep them in its database only ("-W"), never prompt for input when importing ("-q" - quiet mode) and more.


Enabling acoustic fingerprinting for beets


beets can use acoustic fingerprinting (through Chromaprint/Acoustid), a technique for identifying songs based on audio signal instead of using metadata information via a plugin. There is a downside to using it though: it uses a lot more CPU and memory than the default tagger. If this is not an inconvenient for you, install it using the following commands:
sudo apt-get install apt-get install python-gst0.10-dev gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly
sudo pip install pyacoustid

Then, to enable the Chromaprint/Acoustid plugin, open the beets config file (see above) and paste this under "[beets]":
plugins: chroma


For more info about beets, including: using the auto-tagger, more 'beet' commands (list, add, etc), plugins, etc., see the beets documentation.


Thanks to Pablo Jimeno for the tip!