12.4. Windows
Prev | Chapter 12. Ports | Next

## 12.4. Windows

Yes, MPlayer runs on Windows under Cygwin and MinGW. It does not have an official GUI yet, but the command line version is completely functional. You should check out the MPlayer-cygwin mailing list for help and latest information. Official Windows binaries can be found on the download page. Installer packages and simple GUI frontends are available from external sources, we have collected then in the Windows section of our projects page.

If you wish to avoid using the command line, a simple trick is to put a shortcut on your desktop that contains something like the following in the execute section:

    c:\path\to\mplayer.exe %1

This will make MPlayer play any movie that is dropped on the shortcut. Add `-fs` for fullscreen mode.

Best results are achieved with the native DirectX video output driver (`-vo directx`). Alternatives are OpenGL and SDL, but OpenGL performance varies greatly between systems and SDL is known to distort video or crash on some systems. If the image is distorted, try turning off hardware acceleration with `-vo directx:noaccel`. Download DirectX 7 header files to compile the DirectX video output driver. Furthermore you need to have DirectX 7 or later installed for the DirectX video output driver to work.

VIDIX now works under Windows as `-vo winvidix`, although it is still experimental and needs a bit of manual setup. Download dhahelper.sys or dhahelper.sys (with MTRR support) and copy it to the `libdha/dhahelperwin` directory in your MPlayer source tree. Open a console and change to that directory. Then type

    gcc -o dhasetup.exe dhasetup.c

and execute

    dhasetup.exe install

as Administrator. After that you will have to reboot. When you are done, copy the `.so` files from `vidix/drivers` to the `mplayer/vidix` directory relative to your `mplayer.exe`.

For best results MPlayer should use a colorspace that your video card supports in hardware. Unfortunately many Windows graphics drivers wrongly report some colorspaces as supported in hardware. To find out which, try

    mplayer -benchmark -nosound -frames 100 -vf format=colorspace movie

where `colorspace` can be any colorspace printed by the `-vf format=fmt=help` option. If you find a colorspace your card handles particularly bad `-vf noformat=`colorspace`` will keep it from being used. Add this to your config file to permanently keep it from being used.

There are special codec packages for Windows available on our download page to allow playing formats for which there is no native support yet. Put the codecs somewhere in your path or pass `--with-codecsdir=`c:/path/to/your/codecs`` (alternatively `--with-codecsdir=`/path/to/your/codecs`` only on Cygwin) to `configure`. We have had some reports that Real DLLs need to be writable by the user running MPlayer, but only on some systems (NT4). Try making them writable if you have problems.

You can play VCDs by playing the `.DAT` or `.MPG` files that Windows exposes on VCDs. It works like this (adjust for the drive letter of your CD-ROM):

    mplayer d:/mpegav/avseq01.dat

DVDs also work, adjust `-dvd-device` for the drive letter of your DVD-ROM:

    mplayer dvd://<title> -dvd-device d:

The Cygwin/MinGW console is rather slow. Redirecting output or using the `-quiet` option has been reported to improve performance on some systems. Direct rendering (`-dr`) may also help. If playback is jerky, try `-autosync 100`. If some of these options help you, you may want to put them in your config file.

### Note

On Windows the runtime CPU detection disables SSE support because of recurring and hard-to-trace SSE-related crashes. If you wish to have SSE support under Windows, you will have to compile without runtime CPU-detection.

If you have a Pentium 4 and are experiencing a crash using the RealPlayer codecs, you may need to disable hyperthreading support.

### 12.4.1. Cygwin

You need to run Cygwin 1.5.0 or later in order to compile MPlayer.

DirectX header files need to be extracted to `/usr/include/` or `/usr/local/include/`.

Instructions and files for making SDL run under Cygwin can be found on the libsdl site.

### 12.4.2. MinGW

Installing a version of MinGW that could compile MPlayer used to be quite tricky, but it works out of the box now. Just install MinGW 3.1.0 or later and MSYS 1.0.9 or later and tell the MSYS postinstall that MinGW is installed.

Extract DirectX header files to `/mingw/include/`.

MOV compressed header support requires zlib, which MinGW does not provide by default. Configure it with `--prefix=/mingw` and install it before compiling MPlayer.

Complete instructions for building MPlayer and necessary libraries can be found in the MPlayer MinGW HOWTO.

Prev | Up | Next
12.3. Commercial Unix | Home | 12.5. Mac OS