MPD is essential software for me. It’s one of the few music players out there for Unix that does gapless playback and ReplayGain. It’s also nice that, because it’s a daemon, I’m not bound to any particular interface. Fortunately, there is a really good one in the form of Sonata.
MPD is not included in OpenSolaris yet, so last weekend I built some packages for it. The build has been stable for me and I’m happy with the state of the packages so I thought I’d share them. First add my package repository:
$ pfexec pkg set-authority -O http://pkg.thestaticvoid.com/ thestaticvoid
MPD
This package and its dependencies require OpenSolaris 2009.06 or newer. Install it by typing pfexec pkg install mpd. The following formats are supported:
$ mpd -V ... Supported decoders: [mad] mp3 mp2 [vorbis] ogg oga [oggflac] ogg oga [flac] flac [audiofile] wav au aiff aif [faad] aac [mp4] m4a mp4 [mpcdec] mpc [wavpack] wv Supported outputs: shout null fifo ao solaris httpd Supported protocols: file:// http://
I plan on adding ffmpeg support soon which will add support for even more codecs.
To run MPD, create a configuration file in your home directory like
music_directory "~/music"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/mpd.db"
log_file "~/.mpd/mpd.log"
Create any directories from the configuration file that don’t exist, such as ~/.mpd/playlists and start the daemon by running mpd ~/.mpdconf as your user. It will immediately build a library of your music.
Alternatively, mpd can be run system-wide, which just seems more appropriate to me for whatever reason. The only complicated part about this is that you have to give MPD permission to write to the audio device. Edit /etc/logindevperms, find the /dev/sound/* lines and change the mode to 0666 so that they look like:
/dev/vt/active 0666 /dev/sound/* # audio devices
Logout and log back in for the settings to take effect. Then modify /etc/mpd.conf to your liking and start the daemon by typing svcadm enable mpd. You may have to svcadm refresh manifest-import for SMF to load the mpd manifest.
mpdscribble
I also built a package for mpdscribble which is a mature, well-maintained scrobbler for Last.fm. Install it by typing pfexec pkg install mpdscribble. Set your Last.fm or Libre.fm username and password in /etc/mpdscribble.conf and start the daemon with svcadm enable mpdscribble. That’s all there is to it.
Sonata
Sonata is a lightweight cilent for MPD. Looks pretty nice too:
Because Sonata requires Python 2.5, and OpenSolaris 2009.06 only really supports Python 2.3, this package requires build 127 or newer. Install it by typing pfexec pkg install sonata. It can be launched from the Applications->Sound & Video menu.
libmpdclient2 and mpc?
Hey, was wondering if you could look into putting libmpdclient2 and mpc into your repo, that would be really useful for scripting and remote control.
winston 🙂
Hey,
I’m trying to use your package, but I’m having trouble because the mpd process seems to be eating all my memory..
It gets to about 2GB before my swap runs out and I have to kill it.
Any ideas why this is happening?