Music Player Daemon

From Unconscious

Jump to: navigation, search

I am currently using a Ubuntu box to play music from our big playlist all over our house. This setup, although it is fairly primitive, allows us some control over playback via our android phones.

The player is Rhythmbox. I'm not all that impressed by rhythmbox, but ubuntu has a long string of bad relationships with various music players and this is the one that seems to be the most stable and best maintained at this point. Rhythmbox has a command line interface that allows the user under whom the player is running to control player in a limited fashion. I have exploited this somewhat, making it available via a UDP socket service that accepts commands of a known specific format on a known specific port. The commands originate from a wsgi web interface running on my http server, which is also a ubuntu box.

Recently I have read up on the Music Player Daemon. It can operate as a system service, and provides its own daemon for handling commands. It should be quite simple to convert my wsgi ui to use mpd. Next rainy day for sure. Note however, that there aren't many rainy days here in Sac.

...s 20110613


Well we haven't had a rainy day yet, but I have managed to get a music player daemon web client running using node.js. MPD is running as a system service under /etc/init.d, as is the client /etc/init.d/mpc. Oh, an I learned a cool trick for catching all those catastrophic exceptions, that blow node.js entirely out of the water...

 node index.js >>/var/log/mpd/mpc.log 2>&1

Once I get the code cleaned up, I'll tell you all about it.

...s 20110718

Personal tools