Music and Audioscrobbler on the Linux Console

March 30, 2006

I’ve been working in the console a lot more lately but I kept finding myself going back to X to play music since I have the Audioscrobbler plugin for Rhythmbox which posts all the songs I play to I had been using mp3blaster on the console for streaming and podcasts but when I played something from my music library I wanted to be able to submit it to my profile.

I posted a message to the Debian Linux group on and a couple of people told me about mpd (Music Player Daemon) and XMMS2. Both are based on a client-server model where there is a music server running on a machine which has access to the music library and is connected to some sort of output device (computer speakers, stereo, etc.). This framework allows you to run a playback client on the same machine, equivalent to the typical music player setup, or to access the server remotely, letting you do things like control the playback from a laptop across the room or from a handheld PC across the country, independent of platform or operating system.

I decided to try mpd since it was already in the Ubuntu repositories and seemed to be the most active of the two projects. Together with the ncmpc this makes for a killer combination. mpd handles the library mangement, playlist storage, and actual playback while ncmpc lets you control the server from the console, telling it what to play, submitting new streams or playlists, and controlling the volume. You can even load a playlist and exit then ncmpc alltogether. The server will keep playing until the playlist ends (or keep playing forever if you put it on repeat). Of course mpd also has an Audioscrobbler plugin (technically speaking, it’s just another client) called mpdscribble which monitors what songs are played and submits the tracks to

Although I haven’t tried it yet, this setup will allow you to play music from X as well with a different client program but using the same mpd backend to manage my library. This was one of the drawbacks of using both Rhythmbox and mp3blaster. Rhythmbox was great at managing my library but mp3blaster had a totally independent system. I also worried about putting too much effort into organizing my music in Rhythmbox in case I ever switched to something else. This shouldn’t be a problem any longer. There is definitely no shortage of mpd clients.