Managing music with beets

In a previous post, I talked about how I use Subsonic in order to make my entire music collection available over the internet to either my phone, or any computer via its web-interface. I’m still using Subsonic to achieve this, but had one fairly major gripe left with the set-up – I was managing the library on disk manually. Subsonic is great for editing ID3 tags on individual songs, but it relies on files being in sensible per-album folders in order to populate its library, something which I very quickly got fed up of doing manually.

I’ve known for some time about the Musicbrainz project, which maintains a database of all music releases, and has a number of applications built on top of it which will scan, tag and move your music collection as desired. I recall using Musicbrainz Picard back in the day to sort my library before I moved to hosting music on my own server, but never found anything similar that I could run on my Ubuntu server, until now. Enter beets.

Beets is a program that will manage your entire music library, allowing command line access, and interfaces directly with the Musicbrainz API to tag tracks appropriately. Plugins for beets also allow you to update genres according to Last.fm, download cover art (which Subsonic will quite nicely pick up!), and even acoustically fingerprint unknown files to figure out what they are!

Installing Beets was as simple as following the instructions on their getting started guide, however importing my existing music proved a little more tricky, and I had a few false-starts at doing this. I eventually found that the easiest way to do this was to move my existing collection into a separate folder, and set up beets to sort my collection back into the original place. The ~/.config/beets/config.yaml file I ended up using looks like this:

directory: /media/music
library: /media/backup/beets/musiclibrary.blb
import:
    write: yes
    move: yes
    resume: yes
replace:
    '[\\/]': _
    '^\.': _
    '[\x00-\x1f]': _
    '[<>:"\?\*\|]': _
    '\.$': _
    '\s+$': ''
art_filename: cover
plugins: fetchart embedart lastgenre

Put simply, my music lives in /media/music (an NFS share), with my library file on a separate backup share. When importing files, I want them writing (moving) to their new location, so all I need to do is run beet import New\ Album/ and the files will be tagged and moved into place (with most dodgy characters removed – unfortunately some special characters still seem to slip through). Album art is also downloaded into the new folder as cover.jpg, embedded into the files themselves, and also the genre field is populated using Last.fm. A nightly scan configured in Subsonic picks up the new files and adds them into the library, making them available to listen!

The next step for me is to integrate importing into the same process as my automatic sorting of TV shows, as I currently still need to manually import newly downloaded tracks. However, even this is a massive improvement on the tedious processed previously needed for getting OCD-quality tags on new music!!

Dishing up music

I’ve been meaning for a long time to continue my line of posts about my home media set up. Anyone who vaguely knows me (or stalks this blog) will know that I recently moved down to London, into a flat I can (sort of) call my own, so for the first time I’ve been able to play about with AV equipment in my way!

In this first post, I’m going to talk a bit about how I’m currently using the set up to serve my music collection around the flat, to work, and to my phone for on-the-go listening. It’s worth noting at this point that everything here relies on an old machine running Ubuntu server that’s currently sat in my cupboard, a solution that won’t work for everyone…

I’ve mentioned previously that I was looking into using DAAP to get at my music. This ended pretty quickly when I realised the clients available for listening are fairly crap. The actual configuration is fiddly, and I was after a nice functional GUI to access my music through. DAAP failed at pretty much all of this, so I went in search of another solution. After trying many different software packages (commercial and otherwise), I struck upon Subsonic, which seemed at first glance to do everything I was after. Essentially, it requires a server (available for all platforms) with access to your music collection, and will then spit the content back out to its own web UI (accessible through a personal URL if you’re not like me and running some kind of dynamic DNS service) plus it has a number of native players available for different platforms (including mobile). Best of all – it’s free! They withhold some features until you’ve given a small donation, but it’s entirely usable as a free package!

The web UI is basic, but skinnable (I’m still working with the basic skin – works well), and gives you access at a glance to all your artists, albums and playlists (although I’ve not done much with playlists yet, that part does seem a bit tricky). This UI also lets you play with the ID3 tags on your music, including the grabbing of album artwork off the internet, so if you’re as OCD as me about music tagging, your needs are well catered for! Within the web application your play queue appears at the bottom, with the current playing song in a lovely flash player. From the main window you can add things onto the end of the play queue, or change the playing song entirely. It’s basic, but functional, and if you want anything more advanced there are a number of native players available for all operating systems.

What interested me most was the quality of the iOS native applications. I’ve tried all of the ones recommended on Subsonics App page, and a couple that are in the app store but not endorsed officially, but I have now struck upon iSub as a favourite. It allows the caching of songs on your phone for playback when no data signal is available (although you have to have played the song for it to be cached – I’d like a feature where you could pre-cache songs to the phone), plus it integrates nicely with the iOS player API (play/pause whilst locked etc).

One other massive bonus was my discovery of a XMBC plugin for Subsonic (XMBC is what I use to browse media on my TV, as I’ve mentioned previously, more in a future post). This lets me listen to songs through my TV in the flat without having to bother turning a computer on – a massive bonus, and much more sociable if you have company!

The only downside of Subsonic is the reliance on a stable internet connection to an always-on music server. There are commercially hosted solutions available, but since I already had a machine running 24/7, and have recently splashed out on Virgin Media’s 30Mb fibre connection, it made sense to run the package from home.

So there it is – a whole-hearted recommendation for Subsonic (they’re honestly not paying me for this!) and it’s associated other applications. Tune in soon for a peek into the world of my TV/Movie system!

Last.fm Boffin

http://www.last.fm/group/Audioscrobbler+Beta/forum/30705/_/510180

Been trying out the ‘Boffin’ tool from Last.fm this evening – and I’m astounded!

Basically, it scans your PC for music, groups it by tag, and then lets you play only music with a specific tag. For instance, I’ve had “Trance” selected for a while now, and it just keeps shoving on amazing tunes I didn’t even know I had!

Obviously, its on an Alpha release, but the technology demonstrated behind it is superb. Didn’t take long to scan my entire music library, and did a pretty good job (so far) of getting the tags and grouping them.

Its also nice to see what my music library mainly consists of (hope the picture works!):

boffin

Can’t wait to see this incorporated into the main Last.fm program!

Invaders must Die

Downloaded the new Prodigy album yesterday, and I’m currently in two minds as to whether I like it or not.

The title track is pretty awesome, and ‘Omen’ is epic (I owned that before), however a lot of the other stuff just isn’t their style, neither old school Prodigy or new-electro Prodigy.

I’d say I do regret buying this one, but its definitely one to get for free (not that I encourage that!)

Musical Tastes

Rather disturbed at my own musical tastes at the moment:

Daniel Bedingfield – Gotta Get Thru This – He Don’t Love You Like I Love You

And I’m enjoying… catchy lyrics, and he’s got a pretty good voice. I’m sure this is Music Tech eating me from the inside out!

Someone kill me or make me do something manly – QUICK!