6.6. Windows
Előző | 6. fejezet - Portok | Következő

## 6.6. Windows

Yes, MPlayer runs on Windows under Cygwin and MinGW. It does not have a GUI yet, but the command line version is almost completely functional. Patches are always welcome. You should check out the mplayer-cygwin mailing list for help and latest information.

Best results are achieved with the native DirectX video output driver (`-vo directx`) and the native Windows waveout audio driver (`-ao win32`). Alternatives are OpenGL and SDL, but OpenGL performance varies greatly between systems and SDL is known to distort sound and 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.

VIDIX now works under Windows as `-vo winvidix`, although it is still experimental and needs a bit of manual setup. Download dhahelper.sys 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.

You can use Win32 codecs and Real Win32 codecs (not Real Linux codecs) if you want to. 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. Try making them writable if you have problems. QuickTime DLLs also work, but you will have to put them in your Windows system directory (``C:\Windows\system\`` or similar). As a last resort, try putting them in the same directory as MPlayer.

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. You can prevent OSD flicker through double buffering with the `-double` option. If playback is jerky, try `-autosync 100`. If some of these options help you, you may want to put them in your config file.

Sascha Sommer releases official Windows binaries from time to time, Joey Parrish makes unofficial Windows packages complete with installer. Look for these in the Windows section of our projects page.

### 6.6.1. Cygwin

Cygwin versions prior to 1.5.0 do not include `inttypes.h`. Put this inttypes.h in `/usr/include/` in order to make MPlayer compile.

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.

### 6.6.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.

If you use a version of MinGW before 3.1.0, you need to replace `/mingw/include/sys/types.h` with this `types.h`.

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.

Előző | Fel | Következő
6.5. QNX | Tartalom | 6.7. Mac OS