Music Player Daemon (MPD)

Rating: 
5
Your rating: None Average: 5 (3 votes)

Music Player Daemon (MPD) is a flexible, powerful, server-side application for playing music. Through plugins and libraries it can play a variety of sound files while being controlled by its network protocol.

MPD sources on github

Warning: you will need a bit of terminal voodoo to configure stuff, so only install if you are comfortable with that.

Terminal (defaultuser or nemo) steps before installation (we choose ~/.config/mpd as mpd config location):

cd ~/.config
mkdir mpd
cd mpd

Now create the config file mpd.conf over here, with the following content:

music_directory         "/path/to/your/music"
playlist_directory      "~/.config/mpd/playlists"
db_file                 "~/.config/mpd/database"
log_file                "~/.config/mpd/log"
pid_file                "~/.config/mpd/pid"
state_file              "~/.config/mpd/state"
sticker_file            "~/.config/mpd/sticker.sql"
bind_to_address         "127.0.0.1"
port                    "6600"
auto_update "yes"

audio_output {
type        "pulse"
name        "PulseAudio"
}
filesystem_charset      "UTF-8"

And change music_directory yo you music location (~/Music/ for example) or make other tweaks if desired.

Now start with installing MPD itself. MPD needs the liburing library, which is in my repository.

MPD is not started automatically. It is meant to be socket activated by a client, SMPC is the most obvious candidate for that on you SailfishOS device itself, but you could also control it by another device with another MPD client. MPC is the default command line client.

I added an option in SMPC to stop the MPD service when closing smpc. Normally it stays active after a socket activation.
SMPC would need a new server entry using 127.0.0.1 as ip address and 6600 (default) as the port to control MPD on your device.

Troubleshooting:
If the socket was not started because of some issue:
Status:

systemctl --user status mpd.socket

Start:

systemctl --user start mpd.socket

Start MPD manually if desired:

systemctl --user start mpd.service

Keywords:

Application versions: 
AttachmentSizeDate
File mpd-0.22.6-1.aarch64.rpm443.2 KB17/07/2021 - 11:31
File mpd-0.22.9-1.armv7hl.rpm424.64 KB17/07/2021 - 11:31
File mpd-0.22.9-1.i486.rpm516.27 KB17/07/2021 - 11:31
File mpd-0.22.9-1.aarch64.rpm443.38 KB18/07/2021 - 09:57
File mpd-0.22.10-1.aarch64.rpm444.12 KB06/08/2021 - 21:56
File mpd-0.22.10-1.armv7hl.rpm424.07 KB06/08/2021 - 21:56
File mpd-0.22.10-1.i486.rpm517.05 KB06/08/2021 - 21:56
File mpd-0.22.11-1.aarch64.rpm444.76 KB26/08/2021 - 20:06
File mpd-0.22.11-1.armv7hl.rpm424.28 KB26/08/2021 - 20:06
File mpd-0.22.11-1.i486.rpm517.46 KB26/08/2021 - 20:06

Comments

Ezreal's picture

The audio can bypass all resampling and be output to a USB dac, which is really great.

Thanks a lot for bringing it to SailfishOS and letting us hear HIFI music!

 

razcampagne's picture

Yes! I was looking for mpd on sfos for a long time, thank you very much!
Although... It fails to install on aarch64 because it needs libicui18n.so.66 but version installed is 68

ade's picture

I did not notice I uploaded an older aarch64 MPD build I created in april. Updated version now uploaded for aarch64!

razcampagne's picture

Great, I confirm it is working fine now, thanks for your quick handling