User Tools

Site Tools


mpd

This is an old revision of the document!


MPD

MPD (Music Player Daemon) is a light-weight server for streaming music.

Notes on Clients

  • ncmpcpp - Curses-based client that seems more full-featured than any of the available GUI ones. Good tag management, which includes being Picard-friendly. I think you still need a Music Player that can handle streams (Mplayer, FFmpeg, VLC, etc.) to actually hear the audio though; unless I'm not understanding something?
  • MPDroid - It's the only Android client in F-Droid that works on my old tablet (Android 4.4).

Guide

QNAP

Notes on using MPD on a QNAP TS-231P. Setup to work on my local network only.

I used this package from a third-party repository (see: Install our repository, if needed).

The files you need are in /opt/MPD/, to start you'll want to get into the config. file at /opt/MPD/etc/mpd.conf

)It's also worth mentioning that the error log file is at /opt/MPD/var/log/mpd/mpd.log)

A lot of the defaults of fine, but:

  • Check your music_directory and playlist_directory
  • Check your user
  • I can't remember what was set initially, but you can comment out bind_to_address, as the default works.
  • Review log_level, gapless_mp3_playback, restore_paused, save_absolute_paths_in_playlists, auto_update.
  • Check the password stuff.
  • Curl input plugin's just for Internet stuff so I disabled it.
  • audio_output depends on your usage. My NAS has no soundcard, so I disabled ALSA and enabled HTTPD. If you want to use it to host an Internet accessible stream look at Shout. Yo ucan have multiple, and select which are active with your client.
    • Give your stream a fun name :)
    • Check the quality settings.
    • Default format was only mono! Change it to “44100:16:2”
    • And the rest of the file is up to you again.
    • If you don't want your output to be resampled you can add and set to “no” auto_resample, auto_channels, and auto_format

When the config's ready you can start or restart MPD through the NAS's web interface, or through running ./mpd –kill from /opt/MPD/bin (it will restart itself).

You don't need to forward ports unless you want to access MPD from outside the local network.

My Config

Here's the contents of mine, for reference:

music_directory         "/share/Multimedia/Music"
playlist_directory      "/share/Multimedia/Music/playlists"
db_file                 "/opt/MPD/var/lib/mpd/tag_cache"
log_file                "/opt/MPD/var/log/mpd/mpd.log"
pid_file                "/opt/MPD/var/run/mpd/pid"
state_file              "/opt/MPD/var/lib/mpd/state"
sticker_file            "/opt/MPD/var/lib/mpd/sticker.sql"
 
user                    "[...]"
password                "[...]"
#default_permissions    "[...]"

#log_level                              "default"
gapless_mp3_playback                    "no"
#restore_paused                         "no"
save_absolute_paths_in_playlists        "no"
auto_update                             "yes"

audio_output {
        type            "httpd"
        name            "MPD QNAP HTTPD"
        port            "8000"
#       quality         "5.0"
        bitrate         "320"
        format          "44100:16:2"
        max_clients     "0"
        always_on       "yes"
        tags            "yes"
}

#replaygain                     "album"
#replaygain_preamp              "0"
#replaygain_missing_preamp      "0"
#replaygain_limit               "yes"
#volume_normalization           "no"

filesystem_charset              "UTF-8"

Playlists

Got stuck on this for a bit because it's weird. .m3u8 playlists don't seem to work, but no big deal. More annoying and unusual is that if the paths in the playlist are relative it uses the configured music directory as the base instead of the playlist directory.

See Also

mpd.1620424397.txt.gz · Last modified: 2021/05/08 07:53 by rjt