Windows Compatibility

# Server

## Native

The current stable release is also distributed as an archive containing Windows binaries. There is no included mpd.conf and no included documentation. I recommend getting the source as well and viewing the examplempd.conf as well as trying to view the man page for mpd.conf.

When specifying paths in configuration file either forward or backslash can be used.
When using backslashes they should be escaped with extra backslash.

Examples:

```
music_directory "C:/music"

```

```
music_directory "C:\\music"

```

For audio\_output you can use either libao or winmm. I was only able to get multiple outputs to function with winmm.

```
audio_output {
  type "winmm"
  name "Speakers"
  device "Speakers (Realtek High Definition Audio)"
}

```

The 'device' is optional unless you want multiple outputs to work. In Windows 7 to get a list of outputs, open the volume mixer and activate the 'Device' drop-down. This list is exactly how you need to format the content of 'device' to use a specific output. The given example is the built-in audio from a Gigabyte EP45-UD3R.

Native streaming outputs with both the vorbis and lame encoders have also worked for me.

The below instructions for server compilation under windows are ***experimental*** and are not recommended unless you know what you're doing.

## coLinux

Cooperative Linux is the first working free and open source method for optimally running Linux on Microsoft Windows natively. More generally, Cooperative Linux (short-named coLinux) is a port of the Linux kernel that allows it to run cooperatively alongside another operating system on a single machine.

*This method is comfirmed to work by me. Had to install esd both Windows and CoLinux and it streams audio now nicely through virtual network.*-tv

## Cygwin

***Your mileage may vary and is not yet recommended except for testing, as it doesn't play on my computer, although it does compile and execute in cygwin now as of SVN rev. 2840.***

* Install dependencies. Cygwin packages are available: make, gcc, autoconf, automake, glib, pkg-config. At least one audio input dependency must be installed, flac is available as a cygwin package.

* Compile without libao support and with OSS support. (replace configure with autogen.sh if configure doesn't exist)

```
./configure --enable-oss --disable-ao && make && make install

```

* Start the cygserver

* Don't forget to:

```
export CYGWIN=server

```

* Copy the configuration file

```
cp -av /usr/local/doc/mpd/mpd.conf /etc/mpd.conf

```

on more recent versions, the file has a different location:

```
cp -av /usr/local/share/doc/mpd/mpdconf.example /etc/mpd.conf

```

* Edit /etc/mpd.conf to suit your needs

```
nano /etc/mpd.conf

```

* Create the database

```
/usr/local/bin/mpd.exe --create-db

```

* Finally, start the MPD daemon, for the time being it will not start unless you --no-daemon, but this is put here for reference.

```
/usr/local/bin/mpd.exe

```

# Client

## coLinux

As is mentioned above coLinux should be able to run anything that runs in linux, meaning all MPD clients should be able to be run in windows.

## Other ways

Since Microsoft provides a UNIX subsystem for Windows NT 5.x (Windows 2000 (SP3 and above), XP (Profesional Edition only) and Windows 2003) there's also a method, other than MinGW, to run unix software on Windows NT. However, it's not Linux and it's only available as free (in the meaning of free beer) since about one or two years ago. SfU (Services for UNIX) provides a complete UNIX subsystem so that it's like Cygwin - only faster and native.

## Cygwin and ESD

It's possible to listen to your mpd-music on your Windowsbox via esd with cygwin.

* Configure the audo\_output, to stream to a remote esd-daemon.
* On your windows-box you have to install cygwin with cygrunsrv and esound ( esound ist in the Gnome-Section, cygrunsrv is in Admin )
* Install the /usr/bin/esd.exe as a WindowsService :

```
cygrunsrv.exe --install esd --path=/usr/bin/esd.exe --args='-tcp -public -nobeeps -trust -port 16001 -noterminate'

```

* Start the Service ( net start esd )
* Enjoy your Music ...

## Streaming

This is technically off-topic but this may help some MPD users that feel stranded in MS Windows. Icecast streaming will work to winamp and many other music players support icecast's outbound formats.

# libmpdclient

Support for libmpdclient windows support is fully implemented.