While the recent rename of XBMC to Kodi did really not raise any of my eyebrowse, the question was resolved for me another way: Before the rename reached the package name of my preferred OS, Debian testing, it stopped working altogether. Reason: My cupboard laptop does not have a graphics card that is supported. Which is a pity, as it did work just before the update. My usage scenario is as follows: start XBMC and close the Laptop, then listen music via the home stereo and remote control XBMC with Yatse. So I'm not interested in graphics at all. But, searching the web quickly made the ugly truth appearent, it will not work without a nice graphics adapter. The minimum requirements are shown here. Which shows us once more that monolithic systems are bad, if not outright evil. Why should the machine that must just decode the files and sent the audio to the jack have a graphics card?

Replacements, any?

Then started the look for a replacement. Google for XBMC alternatives. Found this list of music players, home media centers, etc. with the usual nice little icons indicating support for Linux, Windows, and Mac. But the main question for me is: Does it exist as a package in Debian testing? The usual suspects. Some new faces. For example Enna. Looks nice but not quite what I want.

Then I found it: mpd. How? Well, I typed into Google the search term linux music player remote control and the top result was this page: http://www.instructables.com/id/Linux-music-server-controlled-by-an-Android-device/ Another example how good Google can work sometimes. In the last few years I started using DuckDuckGo as often as possible. This means, whenever I feel there is a good chance that the Duck will find what I am looking for. Which is the case for example when I look for something on stackoverflow. However, whenever I have a really complicated search task, or maybe semantically challenging, I tend to go to Google directly. Of course you sometimes need good intuition to ask the right question, which in this case I luckily did.

Setting up mpd

On my work laptop mpd was set up very easily:

  • install mpd and mpc
    sudo aptitude install mpd mpc

    mpd is the daemon and mpc is a console client program

  • Edit file:///etc/mpd.conf and change the setting for the music directory
    music_directory         "/home/user/Music"
  • Restart mpd
    sudo service mpd restart
  • To update the library, you can use mpc
    mpc update
  • For remote access, you must also change the TCP listen address in file:///etc/mpd.conf, for example:
    bind_to_address         ""

    This allows anyone to connect to the MPD, so this is for a home network only

On my cupboard laptop I needed to figure out the correct setting for the device setting in the audio_output section for ALSA before I could hear anything. It now looks like this:

audio_output {
        type            "alsa"
        name            "My ALSA Device"
        device          "hw:1,0"

I had to more or less guess and piece together this setting from other examples I saw on the net and by looking at the output of the command aplay -l on my computer. Is there any command that prints the available ALSA devices in the form as in the MPD config?

Using mpd

With mpc

Using mpd with mpc is as easy as

mpc search artist garret album vs | mpc add

which adds the tracks of David Garrett's Garrett Vs. Paganini album, but not the Devil's Violinist soundtrack to the playlist, followed by

mpc play

which starts playback.

With GUI programs

There is a whole series of GUI programs for managing an MPD server, music playlists, etc. I did not have the time to try them all. Have a look at http://mpd.wikia.com/wiki/Clients.

From a remote computer

On another computer, just set MPD_HOST to the server name where mpd is running:

export MPD_HOST=family_server

and then mpc can be used exactly as on the server.

As a streaming service

In file:///etc/mpd.conf (on the server) just uncomment and edit the audio_output section for the builtin streaming server, for example like this

audio_output {
        type            "httpd"
        name            "My HTTP Stream"
        port            "8987"
        bind_to_address ""
        bitrate         "128"
        format          "44100:16:2"

Then you can open the URL http://family_server:8987 with an audio player such as Audacious.

With MPDroid

MPDroid is an app which allows remote control of and streaming from an mpd server, though there seem to be several others. It works just great as a remote control and with the streaming feature I can also hear the music on the phone.

There are many other MPD-related apps in the stores, however. Have a look at http://mpd.wikia.com/wiki/Clients.

blog comments powered by Disqus