WTF is musicd?

You may have stumbled upon this scenario: You have a server with large, reliable storage, and a bunch of computers that you use, with limited disk space. So you decide to store your music files on the server, because they fit nicely in there.

You may be familiar with MPD. It is a thing that lets you do this:

MPD Usage

MPD Usage

…but how often do you actually want this? It’s useful only if your server is also your HTPC-kind of thing. My friend stumbled upon this issue, and came up with Musicd. It does this:

Musicd usage

Musicd usage

That is, it streams music from your server to your computer, letting the server transparently do the storage thing, and your computer do the playback thing.

It’s a bit like hosting your own Spotify, Magnatune or so.

The current stable version (0.2.0) of Musicd allows you to connect to it using the qmdc client, which plays stuff, shows a playlist and handles the UI part of searching.

(There are no Windows clients, and musicd only works on *NIX systems.)

Experimental Awesomeness: HTTP Support

There has been some interesting development going on recently. More namely, a HTTP-based protocol. The github version does not have full HTTP support yet, but a fairly well working version is available at http://tsundere.fi/b/musicdhttpdev.tar.

You may need to start it up with the –enable-http option. Input goes as GET parameters, output comes as JSON and audio streams.

You can test it by using eg. curl and mplayer:

curl "http://localhost:6800/tracks?search=Rick%20Astley"
curl "http://localhost:6800/tracks?album=derp&artist=herp"
curl "http://localhost:6800/artists"
curl "http://localhost:6800/albums"
curl "http://localhost:6800/albumimg?album=4"
mplayer "http://localhost:6800/open?id=39"

There is a browser client in the works, but it hasn’t been released yet.

Clementine Support
I picked up the awesome Clementine-player source code and added Musicd-HTTP support to it.

You can find my work here: https://github.com/celeron55/clementine/commits/master

After building it, launch it up and select the “Internet” side tab, right click “Musicd”, and then “Configure Musicd”. After setting the server address, use “Refresh library” from the same context menu, and you’re good to go.

Also, in case somebody wants to discuss stuff, we created the IRC channel #musicd @ Freenode.net. (beware of the occasional Finnish speaking in there)

6 Responses to “WTF is musicd?”

  1. landry Says:

    Just a sidenote… mpd has streaming output support since a while now, i use it daily to stream music from my mpd server to my laptop or to my desktop at work over ssh…

  2. Anonymous Says:

    Doesn’t MPD have a streaming server built in itself?
    http://mpd.wikia.com/wiki/Configuration#Built-in_HTTP_streaming

  3. Lumpio- Says:

    MPD does have streaming support but it drifts out of sync over time, just like web radios, and when it’s you pausing/changing songs/seeking it’s very noticeable. I’ve sometimes had up to a minute of lag. Restarting the stream every now and then helps but that’s kludgy and sounds nasty. This problem alone makes MPD much less useful as a personal music player.

    The built-in HTTP support in musicd (with features geared towards stateless clients, such as better server side search) also makes implementing browser clients trivial – MPD browser clients tend to require extra server software to work.

  4. Olivier M. Says:

    What is it streaming through HTTP? “raw” music files, without re-encoding?

    I suppose one could easily plug a little web-interface on top of it, with help of jsmad for the codecs, and play music without any client software (beside a browser, of course).

  5. Jon Says:

    mt-daapd (or forked-daapd) solves this problem for me years ago (supported decoding and streaming WAV to all clients over LAN, native iTunes support for DAAP too)

  6. http://bit.ly/ Says:

    This is a ttopic that is near to my heart…
    Many thanks! Where are your contact details though?

Leave a Reply