GTKC Knowledgebase
A little bit of wisdom
Building MPD (Music Player Daemon) for Windows
Posted by  Admin on


NB: Page is a work in progress. (3rd February 2026)

How to build MPD (Music Player Damon) for Windows.

I used Linux to build MPD for Windows, as I already had a working environment to build MPD on Linux.

To build for Windows on Linux I had to install:
apt install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64
apt install quilt patch tar xz-utils wget
apt install nasm yasm


The MPD source distribution provides a Python script which will download most pre-requisites.

In the MPD source directory, navigate to build:

cd ~/mpd-0.24.3/build/


mkdir win64


Change to the win64 directory:

I wanted flac support, disabled upnp, and enabled id3tag support.
python3 ../../win32/build.py --64 -Dflac=enabled -Did3tag=enabled -Dupnp=disabled --wrap-mode=forcefallback


Sit and wait, and hope there are no errors...

When complete, there should be an mpd.exe executable in the build/win64 directory.

Configuring MPD for Windows:

I put the binary in c:\Utility\MPD\ then I added it as a service: (after initial testing of course).

sc.exe create mpd binPath= "C:\Utilities\MPD\mpd.exe C:\Utilities\MPD\mpd.conf" DisplayName= "Music Player Daemon" start= auto


mpd.conf:

My music library is on my NAS hence the UNC path - if yours is on the local PC then just use the path to C:/mymusic

A note on audio output: I used wasapi exclusive mode for bit perfect output.

# --- Paths ---
music_directory    "//NAS/Media//Music//flac"
playlist_directory "//NAS/Media//Music//playlist"
db_file            "C:/Utility/MPD/tag_cache"
log_file           "C:/Utility/MPD/mpd.log"
log_level			"notice"
save_absolute_paths_in_playlists        "no"
metadata_to_use         "artist,album,title,track,name,genre,date,composer,performer,disc"
restore_paused          "yes"
#
filesystem_charset      "UTF-8"
connection_timeout      "60"
max_connections         "50"
max_playlist_length     "18222"
max_command_list_size   "2277"
max_output_buffer_size  "131072"
#
replaygain              "off"
#
input_cache {
        size    "1 GB"
}
#
decoder {
        plugin "wildmidi"
        enabled "no"
}

decoder {
        plugin "hdcd"
        enabled "yes"
}

decoder {
        plugin "flac"
        enabled "yes"
}

decoder {
        plugin "audiofile"
        enabled "yes"
}

decoder {
        plugin "mad"
        enabled "yes"
}

input {
        plugin "qobuz"
        enabled "no"
}

input {
        plugin "ffmpeg"
        enabled "no"
}

# --- Network ---
bind_to_address    "0.0.0.0"
port               "6600"

# --- Audio Output (WASAPI is the best for Windows) ---
audio_output {
    type        "wasapi"
    name        "Sound Blaster Digital"
    device      "SPDIF-Out (Sound Blaster Live! 24-bit External)"
    exclusive   "yes"          # Set to "yes" for bit-perfect (blocks other apps)
    replay_gain_handler "none"
    mixer_type      "disabled" 
}


Tags: Windows , Audio , MPD

Return to home page: Home