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" decoder { plugin "wildmidi" config_file "/etc/wildmidi/wildmidi.cfg" } audio_output { type "pulse" name "PulseAudio" } filesystem_charset "UTF-8"
And change music_directory to 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. Starting from mpd 0.23.5, libpcre2-8 is also needed and not to be found in the jolla repos, so this is also added. -> pcre2 is added in SFOS 4.6.
MPD is not started automatically. It is meant to be socket activated by a client, SMPC is the most obvious candidate for that on your 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
MPD features compiled (remark: wma is one of the formats not supported):
Database plugins: simple upnp Storage plugins: local udisks Neighbor plugins: upnp udisks Decoders plugins: [mad] mp3 mp2 [mpg123] mp3 [vorbis] ogg oga [oggflac] ogg oga [flac] flac [opus] opus ogg oga [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2 [dsdiff] dff [dsf] dsf [hybrid_dsd] m4a [faad] aac [wavpack] wv [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm [sidplay] sid mus str prg P00 [wildmidi] mid [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve rtp:// rtsp:// rtsps:// [pcm] Filters: Tag plugins: id3tag Output plugins: null fifo pipe alsa openal solaris pulse httpd snapcast recorder Encoder plugins: null opus wave flac Archive plugins: [bz2] bz2 Input plugins: file io_uring archive alsa curl ffmpeg Playlist plugins: extm3u m3u pls xspf asx rss flac cue embcue Protocols: file:// alsa:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mmsh:// mmst:// rtmp:// rtmpt:// rtp:// rtsp:// rtsps:// smb:// srtp:// Other features: dbus udisks epoll icu inotify ipv6 systemd tcp un
Attachment | Size | Date |
---|---|---|
mpd-0.23-6.i486.rpm | 587.06 KB | 15/03/2022 - 01:03 |
mpd-0.23-6.aarch64.rpm | 503.49 KB | 15/03/2022 - 01:03 |
mpd-0.23-6.armv7hl.rpm | 483.62 KB | 15/03/2022 - 01:03 |
mpd-0.23-7.i486.rpm | 587.05 KB | 10/05/2022 - 10:55 |
mpd-0.23-7.aarch64.rpm | 503.7 KB | 10/05/2022 - 10:55 |
mpd-0.23-7.armv7hl.rpm | 483.86 KB | 10/05/2022 - 10:55 |
mpd-0.23-8.aarch64.rpm | 520.69 KB | 09/07/2022 - 16:03 |
mpd-0.23-8.i486.rpm | 605.51 KB | 09/07/2022 - 16:03 |
mpd-0.23-8.armv7hl.rpm | 499.56 KB | 09/07/2022 - 16:03 |
mpd-0.23-9.armv7hl.rpm | 499.84 KB | 19/08/2022 - 00:26 |
mpd-0.23-9.i486.rpm | 605.83 KB | 19/08/2022 - 00:26 |
mpd-0.23-9.aarch64.rpm | 520.8 KB | 19/08/2022 - 00:26 |
mpd-0.23-10.aarch64.rpm | 522.99 KB | 15/10/2022 - 16:53 |
mpd-0.23-10.armv7hl.rpm | 501.22 KB | 15/10/2022 - 16:53 |
mpd-0.23-11.aarch64.rpm | 522.88 KB | 29/11/2022 - 01:34 |
mpd-0.23-11.armv7hl.rpm | 501.76 KB | 29/11/2022 - 01:34 |
mpd-0.23-12.i486.rpm | 655.85 KB | 05/02/2023 - 18:32 |
mpd-0.23-12.aarch64.rpm | 598.44 KB | 05/02/2023 - 18:55 |
mpd-0.23-12.armv7hl.rpm | 553.84 KB | 05/02/2023 - 18:55 |
mpd-0.23-13.armv7hl.rpm | 558.72 KB | 23/05/2023 - 01:41 |
mpd-0.23-13.aarch64.rpm | 599.15 KB | 23/05/2023 - 01:41 |
mpd-0.23-13.i486.rpm | 656.29 KB | 23/05/2023 - 01:41 |
mpd-0.23-14.armv7hl.rpm | 524.34 KB | 08/10/2023 - 18:33 |
mpd-0.23-14.aarch64.rpm | 563.59 KB | 08/10/2023 - 18:33 |
mpd-0.23-14.i486.rpm | 624.04 KB | 08/10/2023 - 18:33 |
mpd-0.23-15.i486.rpm | 624.33 KB | 21/12/2023 - 02:32 |
mpd-0.23-15.aarch64.rpm | 563.53 KB | 21/12/2023 - 02:32 |
mpd-0.23-15.armv7hl.rpm | 531.38 KB | 21/12/2023 - 02:32 |
mpd-0.23-15.1.armv7hl.rpm | 549.3 KB | 08/01/2024 - 00:23 |
mpd-0.23-15.1.aarch64.rpm | 580.83 KB | 08/01/2024 - 01:04 |
mpd-0.23-15.1.i486.rpm | 642.88 KB | 08/01/2024 - 01:31 |
mpd-0.23-15.2.i486.rpm | 646.89 KB | 11/01/2024 - 01:41 |
mpd-0.23-15.2.aarch64.rpm | 583.94 KB | 11/01/2024 - 01:41 |
mpd-0.23-15.2.armv7hl.rpm | 546.22 KB | 11/01/2024 - 01:41 |
mpd-0.23-15.3.aarch64.rpm | 584.86 KB | 14/01/2024 - 00:08 |
mpd-0.23-15.3.i486.rpm | 648.31 KB | 14/01/2024 - 00:08 |
mpd-0.23-15.3.armv7hl.rpm | 546.62 KB | 14/01/2024 - 00:08 |
mpd-0.23-15.4.i486.rpm | 654.96 KB | 17/01/2024 - 14:11 |
mpd-0.23-15.4.aarch64.rpm | 591.69 KB | 17/01/2024 - 14:11 |
mpd-0.23-15.4.armv7hl.rpm | 561.51 KB | 17/01/2024 - 14:11 |
mpd-0.23-15.5.i486.rpm | 628.38 KB | 19/06/2024 - 22:05 |
mpd-0.23-15.5.aarch64.rpm | 570.82 KB | 19/06/2024 - 22:05 |
mpd-0.23-15.5.armv7hl.rpm | 531.56 KB | 19/06/2024 - 22:05 |
mpd-0.23-16.armv7hl.rpm | 537.28 KB | 03/12/2024 - 22:25 |
mpd-0.23-16.i486.rpm | 629.99 KB | 03/12/2024 - 22:25 |
mpd-0.23-16.aarch64.rpm | 572.14 KB | 03/12/2024 - 22:25 |
https://github.com/MusicPlayerDaemon/MPD/blob/master/NEWS
0.23.15.5 Compiled for SFOS 4.6
0.23.15.4 added mad mp3 decoder and enabled mpg123 mp3 decoder
0.23.15.3 added wildmidi decoder for midi file -> see config above!
0.23.15.2 added sidplay decoder for C64 SID file.
[sidplay] sid mus str prg P00
0.23.15.1 added the following decoders:
[opus] opus ogg oga
[faad] aac
[wavpack] wv
[mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm
[gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz
Comments
Ezreal
Thu, 2022/02/24 - 04:45
Permalink
There is a problem that when using usb dac there is too much noise playing dsd audio
ade
Thu, 2022/02/24 - 10:42
Permalink
Does the problem also manifest itself on other non sailfish devices? Even if it looks SailfishOS related I don't think there is much I can do, besides sending you to the github develop site of mpd (https://github.com/MusicPlayerDaemon/MPD/issues)
Ezreal
Fri, 2022/02/25 - 04:18
Permalink
Yes. This problem only exists on Sailfish devices. Dsd audio playback works fine on raspberry pi.
levone1
Fri, 2021/12/24 - 00:33
Permalink
Small issue - I set music path for local server in mpd.conf, and worked fine. Then, later, I wanted to change the path, but it still reads from the same path. How to force it to forget? Also, I've been mainly using it with SMPC, and I set SMPC settings to kill server on exit, but whenever I try to run mpd from command line, it says address in use, even afyer reboot, when SMPC shows disconnected...
ade
Fri, 2021/12/24 - 01:18
Permalink
You should choose "Update server database" after changing your path.
Does SMPC display a notification that the local MPD service is stopped after closing the app? Check if mpd is running and/or the port is in use, is the mpd services services enabled for some reason? Please check chose basic things first.
kan
Mon, 2021/11/01 - 22:15
Permalink
I get "ffmpeg: Unsupported audio codec" for wma. Does it work?
ade
Mon, 2021/11/01 - 23:48
Permalink
No, it does not seem to support it, sorry. It is not MPD's fault, but most likely related to the used ffmpeg-devel package of SFOS, which has disabled support.
The few WMA files I had I have converted to MP3 some time ago, as WMA is so poorly supported in general.
Ezreal
Mon, 2021/07/19 - 10:32
Permalink
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
Sun, 2021/07/18 - 07:43
Permalink
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
Sun, 2021/07/18 - 09:56
Permalink
I did not notice I uploaded an older aarch64 MPD build I created in april. Updated version now uploaded for aarch64!
razcampagne
Sun, 2021/07/18 - 22:39
Permalink
Great, I confirm it is working fine now, thanks for your quick handling