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.
Issues encountered
No song displayed ✅
Success
I needed to manually add the songs from ${HOME}/Music folder:
$ cd "${HOME}/Music"$ for f in *.mp3; do; mpc add "${f}"; done
When I’m trying to play a song, nothing comes out.
$ mpcvolume:100% repeat: off random: off single: off consume: off
$ mpd --no-daemon --stderr --verbose...client: [0] opened from 127.0.0.1:60496client: [0] process command listclient: process command "status"client: command returned 0client: process command "currentsong"client: command returned 0client: [0] process command list returned 0client: [0] closed
When trying to search for any song, nothing came out:
$ mpc lsfoobar.mp3L.Louis$ mpc search any Louis | wc -l0
Looking at this answer, I must not use absolute path.
So by going to the ~/Music folder then adding the songs:
$ cd ~/Music$ mpc add foobar.mp3$ # Music is live!!!$ mpc playfoobar.mp3[playing] #1/2 0:00/4:13 (0%)volume:100% repeat: off random: off single: off consume: off$ # Adding all musics$ for f in *.mp3; do mpc add "$f"; done
The documentation is really not clear that we need to manually add the songs…
RTIOThread could not get realtime scheduling ❌
Fail
Could not get rid of this error. I did not investigate longer as it seems to be useful when the computer is under load so that the audio can be well sync, which I do not really need.
When trying to run mpd, I got the following error:
$ mpd --no-daemon --stderr --verboseconfig_file: loading file /home/l-lin/.config/mpd/mpd.conflibsamplerate: libsamplerate converter 'Fastest Sinc Interpolator'vorbis: Xiph.Org libVorbis 1.3.7opus: libopus 1.5.2hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabledsimple_db: reading DBinput: Input plugin 'qobuz' is not configured: No Qobuz app_id configuredcurl: version 8.8.0curl: with OpenSSL/3.0.13event: RTIOThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permittedinotify: initializing inotifyinotify: watching music directory
$ # Same error as above.$ ulimit -HS -r 40; mpd --no-daemon --stderr --verboseulimit: can't raise hard limitsconfig_file: loading file /home/l-lin/.config/mpd/mpd.conflibsamplerate: libsamplerate converter 'Fastest Sinc Interpolator'vorbis: Xiph.Org libVorbis 1.3.7opus: libopus 1.5.2hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabledsimple_db: reading DBinput: Input plugin 'qobuz' is not configured: No Qobuz app_id configuredcurl: version 8.8.0curl: with OpenSSL/3.0.13inotify: initializing inotifyevent: RTIOThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permittedinotify: watching music directory
✅ No music available on reboot
When starting my computer, I cannot start playing music directly. I still need to:
$ cd "${HOME}/Music"$ for f in *.mp3; do mpc add "${f}"; done
That’s not really convenient…
I’m not sure why, maybe it’s because I’m launching mpd with hyprland and not with systemd?
A better way to add songs is to execute the following:
$ mpc add $(mpc ls)
That will include all the folders in ${HOME}/Music.
Knowing this, I can update the script that launch mpd to execute this command afterwards.