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.

To build MPD for Linux, see the excellent document from Bob Rathbone which explains how to compile from source (for Linux) and covers installing the required dependencies (which are also required to compile 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: (see bottom of page for a full list of packages I had to install - you may need more)
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


If your music is on a network share which is accessed using your local credentials, then you will need to change the service to log on using the same local credentials - this can be done by accessing the service in services.msc, "Log On" tab and check the "This account" box - then select the account (local credentials) you wish the service to log on as - after a brief pause, you will see a message " has been granted the log on as a service right". Now your MPD service will be able to access your network shares using your local credentials.

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.

You can also use 'winmm' instead of 'wasapi' - simply change the 'type' in 'audio_output to 'winmm'

# --- 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" 
}


Packages installed:
    binutils-mingw-w64-x86-64:amd64 2.40-2+10.4
    diffstat:amd64 1.65-1
    ed:amd64 1.19-1
    g++-mingw-w64-x86-64-posix:amd64 12.2.0-14+deb12u1+25.2+b1
    g++-mingw-w64-x86-64-win32:amd64 12.2.0-14+deb12u1+25.2+b1
    g++-mingw-w64-x86-64:all 12.2.0-14+25.2
    gcc-mingw-w64-base:amd64 12.2.0-14+deb12u1+25.2+b1
    gcc-mingw-w64-x86-64-posix-runtime:amd64 12.2.0-14+deb12u1+25.2+b1
    gcc-mingw-w64-x86-64-posix:amd64 12.2.0-14+deb12u1+25.2+b1
    gcc-mingw-w64-x86-64-win32-runtime:amd64 12.2.0-14+deb12u1+25.2+b1
    gcc-mingw-w64-x86-64-win32:amd64 12.2.0-14+deb12u1+25.2+b1
    gcc-mingw-w64-x86-64:all 12.2.0-14+25.2
    mingw-w64-common:all 10.0.0-3
    mingw-w64-tools:amd64 10.0.0-3
    mingw-w64-x86-64-dev:all 10.0.0-3
    nasm:amd64 2.16.01-1
    quilt:all 0.67+really0.66-1
    yasm:amd64 1.3.0-4


Tags: Windows , Audio , MPD

Return to home page: Home