Project

General

Profile

Support #764

Updated by Daniel Curtis about 8 years ago

This is a guide on how I setup beets on FreeBSD to tidy up my music library. 

 h2. Prepare the Environment 

 * Make sure the system is up to date 
 <pre> 
 pkg update && pkg upgrade 
 </pre> 

 h2. Install Beets 

 * Install Beets: 
 <pre> 
 pkg install beets 
 </pre> 
 #* *NOTE*: @audio/beets@ has many useful additions in its port package. I found *ACOUSTICBRAINZ*, *BADFILES*, *BEETPORT*, *CHROMA*, *DISCOGS*, *ECHONEST*, *EMBYUPDATE*, *FETCHART*, *FFMPEG*, *IMAGEMAGICK*, *LASTFM*, *LYRICS*, and *MPDSTATS* to be useful: 
 <pre> 
 pkg install py27-discogs-client py27-setuptools27 py27-oauth2 py27-httplib2 py27-requests py27-mpd py27-mutagen py27-pyacoustid chromaprint cmake libarchive lzo2 cmake-modules py27-sphinx py27-Jinja2 py27-babel py27-pytz py27-MarkupSafe py27-docutils py27-pygments py27-pylast py27-unidecode py27-sqlite3 py27-enum34 py27-pyechonest py27-yaml ImageMagick-nox11 gmake libltdl pkgconf jbigkit jpeg lcms2 tiff libfpx liblqr-1 pcre libwmf-nox11 png openjpeg webp fftw3 ghostscript9-base autoconf autoconf-wrapper m4 help2man gmake-lite p5-Locale-gettext jbig2dec svgalib cups-image cups-client mDNSResponder gsfonts libpaper py27-munkres glib flac mp3val py27-mpd2 python27 py27-pathlib py27-xdg python2 

 portmaster audio/beets 
 </pre> 

 * Create a directory for the beets library metadata database: 
 <pre> 
 mkdir ~/.beets 
 </pre> 

 h3. Using Beets 

 * Edit the config: 
 <pre> 
 beet config -e 
 </pre> 
 #* And add the following to configure an existing music library: 
 <pre> 
 directory: ~/music 
 library: ~/.beets/musiclibrary.blb 
 import: 
     copy: no 
 </pre> 

 * Import the library to correct the music file tags: 
 <pre> 
 beet import ~/music 
 </pre> 
 #* NOTE: For larger libraries, using the @-q@ (quiet) flag. This will allow beets to update the music file metadata without asking for user input: 
 <pre> 
 beet import -q ~/music 
 </pre> 

 * Adding more music later on can be done with the @-c@ flag which will copy and correct music from @~/some_great_album@ folder to the @~/music@ folder: 
 <pre> 
 beet import -c ~/some_great_album 
 </pre> 

 h2. Plugins 

 h3. FetchArt 

 The fetchart plugin retrieves album art images from various sources on the Web and stores them as image files. 

 * Edit the beets config file: 
 <pre> 
 beet config -e 
 </pre> 
 #* And add the plugin definitions: 
 <pre> 
 plugins: fetchart 

 fetchart: 
     auto: yes 
 </pre> 

 * Then run the fetchart function: 
 <pre> 
 beet fetchart 
 </pre> 

 h3. Lyrics 

 The lyrics plugin fetches and stores song lyrics from databases on the Web. 

 * Edit the beets config file: 
 <pre> 
 beet config -e 
 </pre> 
 #* And add the plugin definitions: 
 <pre> 
 plugins: lyrics 

 lyrics: 
     fallback: '' 
     auto: yes 
 </pre> 

 * Then run the lyrics function: 
 <pre> 
 beet lyrics 
 </pre> 

 h3. EmbyUpdate 

 embyupdate is a plugin that lets you automatically update Emby‘s library whenever you change your beets library. 

 * Edit the beets config file: 
 <pre> 
 beet config -e 
 </pre> 
 #* And add the plugin definitions: 
 <pre> 
 plugins: embyupdate 

 emby: 
     host: localhost 
     port: 8096 
     username: user 
     password: password 
 </pre> 

 h3. EmbedArt 

 Typically, beets stores album art in a “file on the side”: along with each album, there is a file (named “cover.jpg” by default) that stores the album art. You might want to embed the album art directly into each file’s metadata. While this will take more space than the external-file approach, it is necessary for displaying album art in some media players (iPods, for example). 

 * Edit the beets config file: 
 <pre> 
 beet config -e 
 </pre> 
 #* And add the plugin definitions: 
 <pre> 
 plugins: embedart 

 embedart: 
     auto: yes 
     remove_art_file: yes 
 </pre> 

 * Then run the import function: 
 <pre> 
 beet import 
 </pre> 

 h3. AcousticBrainz 

 The acousticbrainz plugin gets acoustic-analysis information from the AcousticBrainz project. 

 * Edit the beets config file: 
 <pre> 
 beet config -e 
 </pre> 
 #* And add the plugin definitions: 
 <pre> 
 plugins: acousticbrainz 

 acousticbrainz: 
     auto: yes 
 </pre> 

 * Then run the import function: 
 <pre> 
 beet import 
 </pre> 

 h3. Bad Files 

 The badfiles plugin adds a beet bad command to check for missing and corrupt files. 

 * Edit the beets config file: 
 <pre> 
 beet config -e 
 </pre> 
 #* And add the plugin definitions: 
 <pre> 
 plugins: badfiles 

 badfiles: 
     auto: yes 
 </pre> 

 * Then run the bad function: 
 <pre> 
 beet bad 
 </pre> 

 h3. Chromaprint 

 Acoustic fingerprinting is a technique for identifying songs from the way they “sound” rather from their existing metadata. That means that beets’ autotagger can theoretically use fingerprinting to tag files that don’t have any ID3 information at all (or have completely incorrect data). This plugin uses an open-source fingerprinting technology called Chromaprint and its associated Web service, called Acoustid. 

 Turning on fingerprinting can increase the accuracy of the autotagger—especially on files with very poor metadata—but it comes at a cost. First, it can be trickier to set up than beets itself (you need to set up the native fingerprinting library, whereas all of the beets core is written in pure Python). Also, fingerprinting takes significantly more CPU and memory than ordinary tagging—which means that imports will go substantially slower. 

 * Edit the beets config file: 
 <pre> 
 beet config -e 
 </pre> 
 #* And add the plugin definitions: 
 <pre> 
 plugins: chroma 

 chroma: 
     auto: yes 
 </pre> 

 * Then run the import function: 
 <pre> 
 beet import 
 </pre> 

 h3. Discogs 

 The discogs plugin extends the autotagger’s search capabilities to include matches from the Discogs database. 

 You will also need to register for a Discogs account. The first time you run the import command after enabling the plugin, it will ask you to authorize with Discogs by visiting the site in a browser. Subsequent runs will not require re-authorization. 

 * Edit the beets config file: 
 <pre> 
 beet config -e 
 </pre> 
 #* And add the plugin definitions: 
 <pre> 
 plugins: discogs 

 discogs: 
     auto: yes 
 </pre> 

 * Then run the import function: 
 <pre> 
 beet import 
 </pre> 

 h3. Duplicates 

 This plugin adds a new command, duplicates or dup, which finds and lists duplicate tracks or albums in your collection. 

 * Edit the beets config file: 
 <pre> 
 beet config -e 
 </pre> 
 #* And add the plugin definitions: 
 <pre> 
 plugins: duplicates 
 </pre> 

 * Then run the duplicates function: 
 <pre> 
 beet duplicates 
 </pre> 

 h2. Resources 

 * http://beets.readthedocs.org/en/v1.3.17/guides/main.html 
 * http://beets.readthedocs.org/en/v1.3.17/plugins/index.html#using-plugins

Back