WTF is musicd?
November 24th, 2012 by celeron55You 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:
…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:
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)