Navigation ( archives ›› 2007 ›› July ›› 15 ›› How-To compile MPlayer under Windows )

How-To compile MPlayer under Windows

Posted on July 15, 2007, 5:32 pm EST


How-To install the newest build of MPlayer in Windows directly from SVN. Since MPlayer does not compile the binary every time, the binary version which is downloaded from their website is outdated. So one time, I was going to dump a live RTSP stream from the net, but it was stuck at 2.5% and the dumpstream size was only 16K, which was totally incorrect. The reason why it doesn't work in windows is there is a bug for RealPlayer codecs. As discussed on their webpage ( dows.html), "If you have a Pentium 4 and are experiencing a crash using the RealPlayer codecs, you may need to disable hyperthreading support." So we have to disable runtime CPU detection when compiling it. So we have to recompile the binaries without the '--enable-runtime-cpudetection' parameter flag. So I will explain how to compile MPlayer in Windows. Compiling it on Linux is relatively simple, look at my previous post


Download MPlayer from SVN (newest build)

  1. Download SVN utility for Windows. Download it from . And Install it!
  2. Lets create a directory to install the source code of MPlayer. Create a new directory anywhere, and go inside that directory.
  3. Right click inside that directory and choose 'Checkout'. Enter this Url of Repository: 'svn://'. Press ok and wait till finishes.

Download MinGW and MSYS

MinGW as stated on the website is "A collection of freely available and freely distributable Windows specific header files and import libraries combined with GNU toolsets that allow one to produce native Windows programs that do not rely on any 3rd-party C runtime DLLs."

  1. Download MinGW from By selecting the 'Current' Package then the 'MinGW' Release.
  2. Install it to 'C:\'
  3. Now we need to load the DirectX header files. Download the tar from
  4. Extract the contents of the tar to 'C:\MinGW\include'
  5. We are done installing MinGW

MSYS as stated on the website is "A Minimal systems to provide POSIX/Bourne configure scripts the ability to execute and create a Makefile used by make."

  1. Download MinGW from By selecting the 'Current' Package then the 'MSYS' Release.
  2. Install MSYS by just running the installer
  3. It will tell you if you want to 'postinstall', select 'yes'
  4. It will tell you where MinGW is installed, type 'c:/mingw'
  5. That is it! MSYS is installed!

Now, MPlayer told us that "MOV compressed header support requires zlib, which MinGW does not provide by default. Configure it with --prefix=/mingw and install it before compiling MPlayer." Let us do that now.

  1. Download zlib from
  2. Move 'zlib-1.2.3.tar.gz' to 'C:\msys\1.0\home\[username]', where [username] is the name of the computer, in my case it is 'Mohamed Mansour'
  3. Run MSYS by going to clicking on 'START -> All Programs -> MinGW -> MSYS -> msys
  4. Now in the MSYS window, type 'ls'. You will see 'zlib-1.2.3.tar.gz'. Great!
  5. Untar the archive:
    CODE:$ tar xvfz zlib-1.2.3.tar.gz
  6. Now change to the zlib directory:
    CODE:$ CD zlib-1.2.3 
  7. Configure zlib with mingw:
    CODE:$ ./configure --prefix=/mingw 
  8. Build zlib:
    CODE:$ make && make install 
  9. We are done compiling zlip into mingw!

Now it is time to compile MPlayer :) Yaay. Now MOVE the MPlayer folder from where we downloaded at Step one (SVN) to 'C:\msys\1.0\home\[username]'

  1. If CD into the 'mplayer' directory.
  2. Now we need to configure without the runtime cpu detection flag type in:
    CODE:$ ./configure
  3. Now we need to build it by:
    CODE:$ make 
  4. Now what you could do, is download the binary from the website and skip one huge step, and just overwrite mplayer.exe and mencoder.exe from current directory. And it will work fine :) Or you could follow this huge txt of how to compile codecs from this website HOW-TO

So we are done! Just download the MPlayer directly from and overwrite 'mplayer.exe' and 'mencoder.exe' from what we compiled! And here you have it, a full working Windows Compiled version of MPlayer :)

I hope it helped you as much it helped me!

Download compiled MPlayer Binary without runtime cpudetection

About this Article:

Comments (11) - Add yours, or View the replies

Categoy (Software)

Views (36264)

Digg it: Digg this article