MPlayer - The Movie Player for LINUX

© 2000-2003 Arpad Gereoffy (A'rpi/ESP-team)
http://www.mplayerhq.hu

[ English ] [ Hungarian ] [ German ] [ French ] [ Polish ] [ Italian ] [ Chinese ]


Table of Contents



0. How to read this documentation

If you are a first-time installer: be sure to read everything from here to the end of the Installation section, and follow the links you will find. If you have any other questions, return to the Table of Contents and search for the topic, read the FAQ, or try grepping through the files. Most questions should be answered somewhere here and the rest has probably already been asked on our mailing lists. Check the archives, there is a lot of valuable information to be found there. And for another good advice, let me quote Chris Phillips from the mplayer-users mailing list:

I said a while ago that there is such a difference between a newbie and a dumbass. No matter what you actually know about a system (linux, cars, girls :D) you should ALWAYS be able to take a step back and be objective, otherwise, you're just dumb IMHO. A girl i live with assumed the vacuum cleaner was broken because it didn't suck things up. never thought to change the bag, becasue she'd never done it before... now that's just stupid, not a case of simply not knowing what to do... Simply not being that familiar with your surroundings is no excuse for a) laziness and b) ignorance. So many people seem to see the word "error" and then stop... few seem to actually read the words on the OTHER side of the colon.

1. Introduction

MPlayer is a movie player for LINUX (runs on many other Unices, and non-x86 CPUs, see the ports section). It plays most MPEG, VOB, AVI, OGG/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM, RoQ, PVA, Matroska files, supported by many native, XAnim, RealPlayer, and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, 3ivx, RealMedia, Sorenson, Theora and DivX movies too (and you don't need the avifile library at all!). Another big feature of MPlayer is the wide range of supported output drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, AAlib, DirectFB, but you can also use GGI and SDL (and this way all their drivers) and some lowlevel card-specific drivers (for Matrox, 3Dfx and Radeon, Mach64, Permedia3) too! Most of them supports software or hardware scaling, so you can enjoy movies in fullscreen. MPlayer supports displaying through some hardware MPEG decoder boards, such as the DVB and DXR3/Hollywood+. And what about the nice big antialiased shaded subtitles (10 supported types) with European/ISO 8859-1,2 (Hungarian, English, Czech, etc), Cyrillic, Korean fonts, and the onscreen display (OSD)?

The player is rock solid playing damaged MPEG files (useful for some VCDs), and it plays bad AVI files which are unplayable with the famous windows media player. Even AVI files without index chunk are playable, and you can temporarily rebuild their indexes with the -idx option, or permanently with MEncoder, thus enabling seeking! As you see, stability and quality are the most important things, but the speed is also amazing.

MEncoder (MPlayer's Movie Encoder) is a simple movie encoder, designed to encode MPlayer-playable movies (AVI/ASF/OGG/DVD/VCD/VOB/MPG/MOV/VIV/FLI/RM/NUV/NET/PVA) to other MPlayer-playable formats (see below). It can encode with various codecs, like DivX4 (1 or 2 passes), libavcodec, PCM/MP3/VBR MP3 audio. Also has powerful plugin system for video manipulation.

MEncoder features

Planned features

MPlayer and MEncoder can be distributed under the terms of the GNU General Public License Version 2.

1.1 History

"This began a year ago... I have tried lots of players under linux (mtv,xmps,dvdview,livid/oms,videolan, xine,xanim,avifile,xmmp) but they all have some problem. Mostly with special files or with audio/video sync. Most of them is unable to play both MPEG1, MPEG2 and AVI (DivX) files. Many players have image quality or speed problems too. So I've decided to write/modify one..." A'rpi, 2001

1.2 Installation

In this chapter I'll try to guide you through the compiling and configuring process of MPlayer. It's not easy, but it won't necessarily be hard. If you experience a different behavior than what I explain, please search through this documentation and you'll find your answers. If you see links, please follow them and read carefully what they contain. It will take some time, but it IS worth it.

You need a fairly recent system. On Linux, 2.4.x kernels are recommended.

Software requirements:

Codecs:

Video Cards

There are generally two kind of video cards. One kind (the newer cards) has hardware scaling and YUV acceleration support, the other cards don't.

YUV cards

They can display and scale (zoom) the picture to any size that fits in their memory, with small CPU usage (even when zooming), thus fullscreen playing is nice and very fast.

Non-YUV cards

Fullscreen playing can be achieved by either enabling software scaling (use the -zoom or -vf scale option, but I warn you: this is slow), or switching to a small resolution video mode, for example 352x288. If you don't have YUV acceleration, the latter method is recommended. Video mode switching can be enabled by using the -vm option and it works with the following drivers:

Some cards:

Sound cards:

Features:

Then build MPlayer:

    ./configure
    make
    make install

At this point, MPlayer is ready to use. The $PREFIX/etc/mplayer/codecs.conf file is needed only when you want to change its properties, as the main binary contains an internal copy of it.
Check if you have codecs.conf in your home directory (~/.mplayer/codecs.conf) left from old MPlayer versions, and remove it.

Note that if you have a codecs.conf in ~/.mplayer/, the builtin and system codecs.conf will be ignored completely. Do not do this unless you want to fiddle with MPlayer internals as this can can cause many problems. If you want to change the codecs search order, use the -vc, -ac, -vfm, or -afm options either on the command line or in your config file (see the manual page).

Debian users can build a .deb package for themselves, it's very simple. Just exec fakeroot debian/rules binary in MPlayer's root directory. See Debian packaging for detailed instructions.

Always browse the output of ./configure, and the configure.log file, they contain information about what will be built, and what will not. You may also want to view config.h and config.mak files.
If you have some libraries installed, but not detected by ./configure, then check if you also have the proper header files (usually the -dev packages) and their version matches. The configure.log file usually tells you what is missing.

Though not mandatory, the fonts should be installed in order to gain OSD, and subtitle functionality. The recommended method is installing a TTF font file and telling MPlayer to use it. See the Subtitles and OSD section for details.

1.3 What about the GUI?

The GUI needs GTK 1.2.x (it isn't fully GTK, but the panels are). The skins are stored in PNG format, so gtk, libpng (and their devel stuff, usually called gtk-dev and libpng-dev) has to be installed. You can build it by specifying --enable-gui during ./configure. Then, to turn on GUI mode, you have to

execute the gmplayer binary.

Currently you can't use the -gui option on the command line, due to technical reasons.

As MPlayer doesn't have a skin included, you have to download them if you want to use the GUI. See the download page. They should be extracted to the usual system-wide directory ($PREFIX/share/mplayer/Skin), or to $HOME/.mplayer/Skin. MPlayer by default looks in these directories for a directory named default, but you can use the -skin newskin option, or the skin=newskin config file directive to use the skin in */Skin/newskin directory.

1.4 Subtitles and OSD

MPlayer can display subtitles along with movie files. Currently the following formats are supported:

MPlayer can dump the previously listed subtitle formats (except the three first) into the following destination formats, with the given options:

MEncoder can dump DVD subtitles into VobSub format.

The command line options differ slightly for the different formats:

VobSub subtitles

VobSub subtitles consist of a big (some megabytes) .SUB file, and optional .IDX and/or .IFO files.
Usage: If you have files like sample.sub, sample.ifo (optional), sample.idx - you have to pass MPlayer the -vobsub sample [-vobsubid <id>] options (full path optional). The -vobsubid option is like -sid for DVDs, you can choose between subtitle tracks (languages) with it. In case that -vobsubid is omitted, MPlayer will try to use the languages given by the -slang option and fall back to the langidx item in the .IDX file to set the subtitle language. If that fails, there will be no subtitles.

Other subtitles

The other formats consist of a single text file containing timing, placement and text information.
Usage: If you have a file like sample.txt, you have to pass the option -sub sample.txt (full path optional).

Adjusting subtitle timing and placement:

-subdelay <sec>
Delays subtitles by <sec> seconds. Can be negative.
-subfps <rate>
Specify frame/sec rate of subtitle file (float number)
-subpos <0 - 100>
Specify the position of subtitles.

If you experience a growing delay between the movie and the subtitles when using a MicroDVD subtitle file, most likely the frame rate of the movie and the subtitle file are different.
Please note that the MicroDVD subtitle format uses absolute frame numbers for its timing, and therefore the -subfps option cannot be used with this format. As MPlayer has no way to guess the frame rate of the subtitle file, you have to manually convert the frame rate. There is a little perl script in the contrib directory of the MPlayer FTP site to do this conversion for you.

MPlayer will try to guess the subtitle files you want to use when playing a movie. If, like in most cases, subtitle and movie files have the same name and are in the same place, you do not need to set the subtitle options. Just play the movie, MPlayer will handle the subtitles automatically.

About DVD subtitles, read the DVD section.

1.4.1 MPlayer's own subtitle format (MPsub)

MPlayer introduces a new subtitle format called MPsub. It was designed by Gabucino. Basically its main feature is being dynamically time-based (although it has frame-based mode too). Example (from DOCS/tech/mpsub.sub):

FORMAT=TIME
# first number : wait this much after previous subtitle disappeared
# second number : display the current subtitle for this many seconds

15 3
A long long, time ago...

0 3
in a galaxy far away...

0 3
Naboo was under an attack.

So you see, the main goal was to make subtitle editing/timing/joining/cutting easy. And, if you - say - get an SSA subtitle but it's badly timed/delayed to your version of the movie, you simply do a mplayer dummy.avi -sub source.ssa -dumpmpsub. A dump.mpsub file will be created in the current directory, which will contain the source subtitle's text, but in MPsub format. Then you can freely add/subtract seconds to/from the subtitle.

Subtitles are displayed with a technique called 'OSD', On Screen Display. OSD is used to display current time, volume bar, seek bar etc.

1.4.2 Installing OSD and subtitles

You need an MPlayer font package to be able to use OSD/SUB feature. There are many ways to get it:

If you chose non-TTF fonts, UNZIP the file you downloaded to ~/.mplayer or $PREFIX/share/mplayer. Then rename or symlink one of the extracted directories to font (like: ln -s ~/.mplayer/arial-24 ~/.mplayer/font). Now you have to see a timer at the upper left corner of the movie (switch it off with the "o" key).

OSD has 4 states: (switch with 'o')

(subtitles are always enabled, for disabling them please read the man page)

You can change default behaviour by setting osdlevel= variable in config file, or the -osdlevel command line option.

1.4.3 OSD menu

MPlayer has a completely user definiable OSD Menu interface.

NOTE: the Preferences menu is currently UNIMPLEMENTED!

Installation

  1. compile MPlayer by passing the --enable-menu parameters to ./configure
  2. make sure you have an OSD font installed
  3. copy etc/menu.conf to your .mplayer directory
  4. copy etc/input.conf to your .mplayer directory, or to the system-wide MPlayer config dir (default: /usr/local/etc/mplayer)
  5. check and edit input.conf to enable menu movement keys (it is described there).
  6. start MPlayer by the following example:
    $ mplayer -menu file.avi
  7. push any menu key you defined

1.5 RTC

There are three timing methods in MPlayer. Note: NEVER install a setuid root MPlayer binary on a multiuser system! It's a clear way for everyone to become root.

2. Features

2.1 Supported formats

2.2 Supported codecs

2.3 Video & Audio output devices

2.4 TV input

This section is about how to enable watching/grabbing from V4L compatible TV tuner. See the man page for a description of TV options and keyboard controls.

2.4.1 Compilation

  1. First, you have to recompile. ./configure will autodetect kernel headers of v4l stuff and the existence of /dev/video* entries. If they exist, TV support will be built (see the output of ./configure).
  2. Make sure your tuner works with another TV software in Linux, for example xawtv.

2.4.2 Usage tips

The full listing of the options is available on the manual page. Here are just a few tips:

2.4.3 Examples

Dummy output, to AAlib :)
    mplayer -tv driver=dummy:width=640:height=480 -vo aa tv://

Input from standard V4L
    mplayer -tv driver=v4l:width=640:height=480 -vo xv tv://

A more sophisticated example. This makes MEncoder capture the full PAL image, crop the margins, and deinterlace the picture using a linear blend algorithm. Audio is compressed with a constant bitrate of 64kbps, using LAME codec. This setup is suitable for capturing movies.
    mencoder -tv driver=v4l:width=768:height=576 \
    -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 \
    -oac mp3lame -lameopts cbr:br=64 \
    -vf crop=720:544:24:16,pp=lb -o output.avi tv://


This will additionally rescale the image to 384x288 and compresses the video with the bitrate of 350kbps in high quality mode. The vqmax option looses the quantizer and allows the video compressor to actualy reach so low bitrate even at the expense of the quality. This can be used for capturing long TV series, where the video quality isn't so important.
    mencoder -tv driver=v4l:width=768:height=576 \
    -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=350:vhq:vqmax=31:keyint=300 \
    -oac mp3lame -lameopts cbr:br=48 \
    -vf crop=720:540:24:18,pp=tn/lb,scale=384:288 -sws 1 -o output.avi tv://

It's also possible to specify smaller image dimensions in the -tv option and omit the software scaling but this approach uses the maximum available information and is a little more resistant to noise. The bt8x8 chips can do the pixel averaging only in the horizontal direction due to a hardware limitation.

2.5 Edit Decision Lists (EDL)

The edit decision list (EDL) system allows you to automatically skip or mute sections of videos during playback, based on a movie specific EDL configuration file.

This is useful for those who may want to watch a film in "family-friendly" mode. You can cut out any violence, profanity, Jar-Jar Binks .. from a movie according to your own personal preferences. Aside from this, there are other uses, like automatically skipping over commercials in video files you watch.

The EDL file format is pretty bare-bones. Once the EDL system has reached a certain level of maturity, an XML-based file format will probably be implemented (keeping backwards compatibility with previous EDL formats).

The maximum number of EDL entries for the current incarnation of EDL is 1000. If you happen to need more, change the #define MAX_EDL_ENTRIES in the edl.h file.

2.5.1 Using an EDL file

Include the -edl <filename> flag when you run MPlayer, with the name of the EDL file you want applied to the video.

2.5.2 Making an EDL file

The current EDL file format is:

[begin second] [end second] [action]

Where the seconds are floating-point numbers and the action is either 0 for skip or 1 for mute. Example:

5.3   7.1    0
15    16.7   1
420   422    0

This will skip from second 5.3 to second 7.1 of the video, then mute at 15 seconds, unmute at 16.7 seconds and skip from second 420 to second 422 of the video. These actions will be performed when the playback timer reaches the times given in the file.

To create an EDL file to work from, use the -edlout <filename> flag. During playback, when you want to mark the previous two seconds to skip over, hit i. A corresponding entry will be written to the file for that time. You can then go back and fine-tune the generated EDL file.

3. Usage

3.1 Command line

MPlayer utilizes a complex playtree. It consists of global options written as first (for example mplayer -vfm 5), and options written after filenames, that apply only to the given filename/URL/whatever (for example mplayer -vfm 5 movie1.avi movie2.avi -vfm 4).
You can group filenames/URLs together using { and }. It's useful with option -loop: mplayer { 1.avi -loop 2 2.avi } -loop 3 will play files in this order: 1 1 2 1 1 2 1 1 2

  file  mplayer [options] [path/]filename
filesmplayer [default options] [path/]filename1 [options for filename1] filename2 [options for filename2] ...
VCDmplayer [options] vcd:// trackno [-cdrom-device /dev/cdrom]
DVDmplayer [options] dvd:// titleno [-dvd-device /dev/dvd]
WWWmplayer [options] http://site.com/file.asf (playlists can be used, too)
RTSPmplayer [options] rtsp://server.example.com/streamName
  mplayer -vo x11 /mnt/Films/Contact/contact2.mpg
  mplayer vcd://2 -cdrom-device /dev/hdc
  mplayer -afm 3 /mnt/DVDtrailers/alien4.vob
  mplayer dvd://1 -dvd-device /dev/hdc
  mplayer -abs 65536 -delay -0.4 -nobps ~/movies/test.avi

3.2 Control

MPlayer has a fully configurable, command driven, control layer which lets you control MPlayer with keyboard, mouse, joystick or remote control (using LIRC). See the man page for the complete list of keyboard controls.

3.2.1 Controls configuration

MPlayer allows you bind any key/button to any MPlayer command using a simple config file. The syntax consist of a key name followed by a command. The default config file location is $HOME/.mplayer/input.conf but it can be overridden using the -input conf option (relative path are relative to $HOME/.mplayer).

Example:

##
## MPlayer input control file
##

RIGHT seek +10
LEFT seek -10
- audio_delay 0.100
+ audio_delay -0.100
q quit
> pt_step 1
< pt_step -1
ENTER pt_step 1 1

3.2.1.1 Key names

You can have a full list by running mplayer -input keylist

Keyboard:

Mouse (only supported under X):

Joystick (support must be enabled at compile time):

3.2.1.2 Commands

You can have a full list of known commands by running "mplayer -input cmdlist"

3.2.2 Control from LIRC

Linux Infrared Remote Control - use an easy to build home-brewn IR-receiver, an (almost) arbitrary remote control and control your Linux box with it! More about it at www.lirc.org.

If you have installed the lirc-package, configure will autodetect it. If everything went fine, MPlayer will print a message like "Setting up lirc support..." on startup. If an error occurs it will tell you. If it doesn't tell you anything about LIRC there's no support compiled in. That's it :-)

The application name for MPlayer is - oh wonder - mplayer. You can use any mplayer commands and even pass more than one command by separating them with \n. Don't forget to enable the repeat flag in .lircrc when it make sense (seek, volume, etc). Here's an excerpt from my .lircrc:

begin
     button = VOLUME_PLUS
     prog = mplayer
     config = volume 1
     repeat = 1
end

begin
    button = VOLUME_MINUS
    prog = mplayer
    config = volume -1
    repeat = 1
end

begin
    button = CD_PLAY
    prog = mplayer
    config = pause
end

begin
    button = CD_STOP
    prog = mplayer
    config = seek 0 1\npause
end

If you don't like the standard location for the lirc-config file (~/.lircrc) use the -lircconf <filename> option to specify another file.

3.2.3 Slave mode

The slave mode allow you to build simple frontend to MPlayer. When enabled (with the -slave option) MPlayer will read commands separated by new line (\n) from stdin.

3.3 Streaming from network or pipes

MPlayer can play files from network, using the HTTP, MMS or RTSP/RTP protocol.

Playing goes by simply using adding the URL to the command line. MPlayer also honors the http_proxy environment variable, and uses proxy if available. Proxy usage can also be forced:

mplayer http_proxy://proxy.micorsops.com:3128/http://micorsops.com:80/stream.asf

MPlayer can read from stdin (NOT named pipes). This can be for example used to play from FTP:

  wget ftp://micorsops.com/something.avi -O - | mplayer -

Note: it's also recommended to enable CACHE when playback from network:

  wget ftp://micorsops.com/something.avi -O - | mplayer -cache 8192 -

4. FAQ section

5. CD/DVD section

6. Ports

6.1 Linux

The main development platform is Linux on x86, although MPlayer works on many other Linux ports. Binary packages of MPlayer are available from several sources. However, none of these packages are supported. Report problems to the authors, not to us.

6.1.1 Debian packaging

To build a Debian package, run the following command in the MPlayer source directory:

    fakeroot debian/rules binary

As root you can then install the .deb package as usual:

    dpkg -i ../mplayer_<version>.deb

Christian Marillat has been making unofficial Debian MPlayer, MEncoder and font packages for a while, you can (apt-)get them from his homepage.

6.1.2 RPM packaging

Dominik Mierzejewski created and maintains official Red Hat RPM packages of MPlayer. He has packaged the player, the GUI, fonts, skins, several drivers and codecs. All of this is available from his homepage.

Mandrake RPM packages are available from the P.L.F. SuSE includes a crippled version of MPlayer in their distribution. You can get working SuSE RPMs from links2linux.de.

6.1.3 ARM

MPlayer works on Linux PDAs with ARM CPU e.g. Sharp Zaurus, Compaq Ipaq. The easiest way to obtain MPlayer is to get it from one of the OpenZaurus package feeds. If you want to compile it yourself, you should look at the mplayer and the libavcodec directory in the OpenZaurus distribution buildroot. These always have the latest Makefile and patches used for building a CVS MPlayer with libavcodec.
If you need a GUI frontend, you can use xmms-embedded.

6.2 *BSD

MPlayer runs on FreeBSD, OpenBSD, NetBSD, BSD/OS and Darwin. There are ports/pkgsrc/fink/etc versions of MPlayer available that are probably easier to use than our raw sources.

To build MPlayer you will need GNU make (gmake - native BSD make will not work) and a recent version of binutils.

If MPlayer complains about not finding /dev/cdrom or /dev/dvd, create an appropiate symbolic link:
ln -s /dev/(your_cdrom_device) /dev/cdrom.

To use Win32 DLLs with MPlayer you will need to re-compile the kernel with "option USER_LDT" (unless you run FreeBSD -CURRENT, where this is the default).

6.2.1 FreeBSD

If your CPU has SSE, recompile your kernel with "options CPU_ENABLE_SSE" to use it (FreeBSD-STABLE or kernel patches required).

6.2.2 OpenBSD

Due to limitations in different versions of gas (relocation vs MMX), you will need to compile in two steps: First make sure that the non-native as is first in your $PATH and do a gmake -k, then make sure that the native version is used and do gmake.

6.3 Solaris

MPlayer should work on Solaris 2.6 or newer.

On UltraSPARCs, MPlayer takes advantage of their VIS extensions (equivalent to MMX), currently only in libmpeg2, libvo and libavcodec, but not in mp3lib. You can watch a VOB file on a 400MHz CPU. You'll need mLib installed.

To build the package you will need GNU make (gmake, /opt/sfw/gmake), native Solaris make will not work. Typical error you get when building with Solaris' make instead of GNU make:

   % /usr/ccs/bin/make
   make: Fatal error in reader: Makefile, line 25: Unexpected end of line seen

On Solaris SPARC, you need the GNU C/C++ Compiler; it does not matter if GNU C/C++ compiler is configured with or without the GNU assembler.

On Solaris x86, you need the GNU assembler and the GNU C/C++ compiler, configured to use the GNU assembler! The mplayer code on the x86 platform makes heavy use of MMX, SSE and 3DNOW! instructions that cannot be compiled using Sun's assembler /usr/ccs/bin/as.

The configure script tries to find out, which assembler program is used by your "gcc" command (in case the autodetection fails, use the --as=/whereever/you/have/installed/gnu-as option to tell the configure script where it can find GNU "as" on your system).

Error message from configure on a Solaris x86 system using GCC without GNU assembler:

   % configure
   ...
   Checking assembler (/usr/ccs/bin/as) ... , failed
   Please upgrade(downgrade) binutils to 2.10.1...

(Solution: Install and use a gcc configured with "--with-as=gas")

Typical error you get when building with a GNU C compiler that does not use GNU as:

   % gmake
   ...
   gcc -c -Iloader -Ilibvo -O4 -march=i686 -mcpu=i686 -pipe -ffast-math
	-fomit-frame-pointer  -I/usr/local/include   -o mplayer.o mplayer.c
   Assembler: mplayer.c
   "(stdin)", line 3567 : Illegal mnemonic
   "(stdin)", line 3567 : Syntax error
   ... more "Illegal mnemonic" and "Syntax error" errors ...

Due to bugs in Solaris 8, you may not be able to play DVD discs larger than 4 GB:

On Solaris with an UltraSPARC CPU, you can get some extra speed by using the CPU's VIS instructions for certain time consuming operations. VIS acceleration can be used in MPlayer by calling functions in Sun's mediaLib.

VIS accelerated operations from mediaLib are used for mpeg2 video decoding and for color space conversion in the video output drivers.

6.4 Silicon Graphics / IRIX

You can either try to install the GNU install program, and (if you did not put it in your global path) then point to the location with:

  ./configure --install-path=PATH

Or you can use the default install delivered with IRIX 6.5 in which case you will have to edit the Makefile by hand a little bit. Change the following line:

  $(INSTALL) -c -m 644 DOCS/mplayer.1 $(MANDIR)/man1/mplayer.1

to:

  $(INSTALL) -m 644 mplayer.1 $(MANDIR)/man1/

And then do (from within the MPlayer source dir):

  cp DOCS/mplayer.1 .

and then go on with building and installing.

6.5 QNX

Works. You'll need to download SDL for QNX, and install it. Then run MPlayer with -vo sdl:photon and -ao sdl:nto options, and it should be fast.

The -vo x11 output will be even slower than on Linux, since QNX has only X emulation which is VERY slow. Use SDL.

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) as OpenGL does not work and SDL is known to distort sound and image or crash on some systems. You can make the movie window stay on top with -vo directx:ontop. 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.

QuickTime DLLs and Real Win32 codecs (not Real Linux codecs) also work. Compile with --enable-qtx and --enable-real and put the codecs into the default Windows DLL location, C:\WINNT\system32 or C:\Windows\system depending on your Windows version.

There are precompiled binary versions made by Sascha Sommer available for download from our homepage. Joey Parrish has been making unofficial Windows packages complete with installer.

6.6.1 Cygwin

Cygwin versions prior to 1.5.0 do not include inttypes.h. You will have to copy or symlink etc/cygwin_inttypes.h from the MPlayer source directory to /usr/include/inttypes.h 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.

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

mplayer /cygdrive/d/MPEG2/AVSEQ01.MPG

DVDs also work, just set the DVD device correctly to whatever your CD-ROM device is:

mplayer dvd://<title> -dvd-device '\\.\d:'

The Cygwin console is rather slow. Redirecting output or using the -quiet option has been reported to improve performance.

6.6.2 MinGW

Installing a version of MinGW that could compile MPlayer used to be quite tricky, but only consists of three simple steps now and should work out of the box soon.

  1. Install MinGW 3.0.0 or later.
  2. Install MSYS 1.0.9 or later and tell the MSYS postinstall that MinGW is installed.
  3. Replace /mingw/include/sys/types.h with this types.h.

Extract DirectX header files to /mingw/include/.

VCDs and DVDs work almost like Cygwin (adjust for the drive letter of your CD-ROM):

mplayer d:/mpegav/avseq01.dat

mplayer /d/MPEG2/AVSEQ01.MPG

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

7. Encoding with MEncoder

Appendix A - Mailing lists

There are some public mailing lists on MPlayer. Unless explicitly stated otherwise the language of these lists is English. Please do not send messages in other languages or HTML mail! Message size limit is 80k. If you have something bigger put it up for download somewhere. Click the links to subscribe. On the mailing lists, the same rules about writing and quoting apply as on usenet. Please follow them, it makes the life of those who read your mails a lot easier. If you do not know them please read HOWTO edit messages or (if you are in a hurry) Quoting HOWTO.

Note: You can reach the searchable mailing list archives at http://www.mplayerhq.hu/cgi-bin/htsearch.

Appendix B - How to report bugs

Appendix C - Known bugs

Special system/CPU-specific bugs/problems:

Various A-V sync and other audio problems:

General audio delay or jerky sound (exists with all or many files): Audio delay/de-sync specific to one or a few files: No sound at all: No picture at all (just plain grey/green window):

Video-out problems:

First note: options -fs -vm and -zoom are just recommendations, not (yet) supported by all drivers. So it isn't a bug if it doesn't work. Only a few driver supports scaling/zooming, don't expect this from x11 or dga.

OSD/sub flickering:
- x11 driver: sorry, it can't be fixed now
- xv driver: use -double option

Green image using mga_vid (-vo mga / -vo xmga):
- mga_vid misdetected your card's RAM amount, reload it using mga_ram_size option

Appendix D - MPlayer skin format

Appendix E - Developer Cries

Appendix F - How to send patches