# MPlayer - The Movie Player for LINUX

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

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

## Table of Contents

- 0. How to read this documentation
- 1. Introduction
  - 1.1 History
  - 1.2 Installation
  - 1.3 What about the GUI?
  - 1.4 Subtitles and OSD
  - 1.5 RTC
- 2. Features
  - 2.1 Supported formats
    - 2.1.1 Video formats
      - 2.1.1.1 MPEG files
      - 2.1.1.2 AVI files
      - 2.1.1.3 ASF/WMV files
      - 2.1.1.4 QuickTime/MOV files
      - 2.1.1.5 VIVO files
      - 2.1.1.6 FLI files
      - 2.1.1.7 RealMedia (RM) files
      - 2.1.1.8 NuppelVideo files
      - 2.1.1.9 yuv4mpeg files
      - 2.1.1.10 FILM files
      - 2.1.1.11 RoQ files
      - 2.1.1.12 OGG files
    - 2.1.2 Audio formats
      - 2.1.2.1 MP3 files
      - 2.1.2.2 WAV files
      - 2.1.2.3 OGG files (Vorbis)
      - 2.1.2.4 WMA/ASF files
      - 2.1.2.5 MP4 files
  - 2.2 Supported codecs
    - 2.2.1 Video codecs
      - 2.2.1.1 DivX4/DivX5
      - 2.2.1.2 FFmpeg DivX/libavcodec
      - 2.2.1.3 XAnim codecs
      - 2.2.1.4 VIVO video
      - 2.2.1.5 MPEG 1/2 video
      - 2.2.1.6 MS Video1
      - 2.2.1.7 Cinepak CVID
      - 2.2.1.8 RealVideo
      - 2.2.1.9 XViD
      - 2.2.1.10 Sorenson
    - 2.2.2 Audio codecs
      - 2.2.2.1 Software AC3 decoding
      - 2.2.2.2 Hardware AC3 decoding
      - 2.2.2.3 libmad support
      - 2.2.2.4 VIVO audio
      - 2.2.2.5 RealAudio
    - 2.2.3 Win32 codec importing HOWTO
      - 2.2.3.1 VFW codecs
      - 2.2.3.2 DirectShow codecs
  - 2.3 Output devices
    - 2.3.1 Video output devices
      - 2.3.1.1 Setting up MTRR
      - 2.3.1.2 Xv
        - 2.3.1.2.1 3dfx cards
        - 2.3.1.2.2 S3 cards
        - 2.3.1.2.3 nVidia cards
        - 2.3.1.2.4 ATI cards
        - 2.3.1.2.5 NeoMagic cards
        - 2.3.1.2.6 Trident cards
      - 2.3.1.3 DGA
        - 2.3.1.3.1 Summary
        - 2.3.1.3.2 What is DGA
        - 2.3.1.3.3 Installing DGA support for MPlayer
        - 2.3.1.3.4 Resolution switching
        - 2.3.1.3.5 DGA & MPlayer
        - 2.3.1.3.6 Features of the DGA driver
        - 2.3.1.3.7 Speed issues
        - 2.3.1.3.8 Known bugs
        - 2.3.1.3.9 Future work
        - 2.3.1.3.A Some modelines
        - 2.3.1.3.B Bug Reports
      - 2.3.1.4 SDL
      - 2.3.1.5 SVGAlib
      - 2.3.1.6 Framebuffer output (FBdev)
      - 2.3.1.7 Matrox framebuffer (mga_vid)
      - 2.3.1.8 SiS 6326 framebuffer (sis_vid)
      - 2.3.1.9 3dfx YUV support (tdfxfb)
      - 2.3.1.10 OpenGL output
      - 2.3.1.11 AAlib - text mode displaying
      - 2.3.1.12 VESA - output to VESA BIOS
      - 2.3.1.13 X11
      - 2.3.1.14 VIDIX
      - 2.3.1.15 Zr
      - 2.3.1.16 DVB
      - 2.3.1.17 DXR3
      - 2.3.1.A TV-out support
        - 2.3.1.A.1 Matrox G400 cards
        - 2.3.1.A.2 ATI cards
        - 2.3.1.A.3 Voodoo 3
    - 2.3.2 Audio output devices
      - 2.3.2.1 Sound card experiences, recommendations
      - 2.3.2.2 Audio plugins
        - 2.3.2.2.1 Up/Downsampling
        - 2.3.2.2.2 Surround Sound decoding
        - 2.3.2.2.3 Sample format converter
        - 2.3.2.2.4 Delay
        - 2.3.2.2.5 Software volume control
        - 2.3.2.2.6 Extrastereo
        - 2.3.2.2.7 Volume Normalizer
        - 2.3.2.2.8 Surround
  - 2.4 Encoding with MEncoder
    - 2.4.1 Compilation
    - 2.4.2 MEncoder Features
      - 2.4.2.1 Encoding 2 or 3-pass DivX4
      - 2.4.2.2 Rescaling movies
      - 2.4.2.3 Stream copying
      - 2.4.2.4 Fixing AVIs with broken index
      - 2.4.2.5 Encoding with the libavcodec codec family
      - 2.4.2.6 Encoding from multiple input image files (JPEGs or PNGs)
      - 2.4.2.7 Extracting DVD subtitles to Vobsub file
    - 2.4.3 Available options
  - 2.5 TV input
    - 2.5.1 Compilation
    - 2.5.2 Available options
    - 2.5.3 Keyboard control
    - 2.5.4 Examples
  - 2.6 Video filters
    - 2.6.1 Usage
    - 2.6.2 Crop
    - 2.6.3 Expand
    - 2.6.4 Fame/Lavc
    - 2.6.5 Flip
    - 2.6.6 Format
    - 2.6.7 Postprocess
    - 2.6.8 RGB2BGR
    - 2.6.9 Rotate
    - 2.6.10 Scale
    - 2.6.11 YUY2
    - 2.6.12 Mirror
    - 2.6.13 DVBscale
    - 2.6.14 Cropdetect
    - 2.6.15 Rectangle
- 3. Usage
  - 3.1 Command line
  - 3.2 Control
    - 3.2.1 Default controls
    - 3.2.2 Controls configuration
      - 3.2.2.1 Key names
      - 3.2.2.2 Commands
    - 3.2.3 Control from LIRC
    - 3.2.4 Slave mode
  - 3.3 Streaming from network or pipes
- 4. CD/DVD section
  - 4.1 CD/DVD drives
  - 4.2 DVD playback
  - 4.3 VCD playback
- 5. FAQ section
  - 5.1 Compilation
  - 5.2 General questions
  - 5.3 playback problems
  - 5.4 Video/audio driver problems (vo/ao)
  - 5.5 DVD playback
  - 5.6 Feature requests
  - 5.7 Encoding
- 6. Ports
  - 6.1 Debian packaging
  - 6.2 FreeBSD
  - 6.3 Solaris
  - 6.4 StrongARM
  - 6.5 Silicon Graphics / Irix
  - 6.6 QNX
  - 6.7 OpenBSD
  - 6.8 Cygwin
- Appendix A - Authors
  - Appendix A2 - Maintainers
- Appendix B - Mailing lists
- Appendix C - How to report bugs
  - Appendix C2 - How to send patches
- Appendix D - Known bugs
- Appendix X - MPlayer skin format

Developer Cries

- 1. GCC 2.96
- 2. NVidia opinions
- 3. About Joe Barr

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

The main rule of this documentation: if it's not documented, it does not exist. If I don't say you encode audio from TV tuner, you can't. A healthy quantity of combining ability is welcomed, though. Good luck. You'll need it :) 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, VIVO, ASF/WMV, QT/MOV, FLI, RM, NuppelVideo, yuv4mpeg, FILM, RoQ files, supported by many native, XAnim, RealPlayer, and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, 3ivx, RealMedia, 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 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)?

MPlayer is under GPL v2 license.

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.

## 1.1 History

This began a year ago... I (A'rpi) 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...

- mpg12play v0.1-v0.3: Sep 22-25, 2000
  The first try, hacked together in a half hour! I've used libmpeg3 from www.heroinewarrior.com up to the version 0.3, but there were image quality and speed problems with it.
- mpg12play v0.5-v0.87: Sep 28-Oct 20, 2000
  Mpeg codec replaced with DVDview by Dirk Farin, it was a great stuff, but it was slow and was written in C++ (I hate C++!!!)
- mpg12play v0.9-v0.95pre5: Oct 21-Nov 2, 2000
  Mpeg codec was libmpeg2 (mpeg2dec) by Aaron Holtzman & Michel Lespinasse. It's great, optimized very fast C code with perfect image quality and 100% MPEG standard conformance.
- MPlayer v0.3-v0.9: Nov 18-Dec 4, 2000
  It was a pack of two programs: mpg12play v0.95pre6 and my new simple AVI player 'avip' based on avifile's Win32 DLL loader.
- MPlayer v0.10: Jan 1, 2001
  The MPEG and AVI player in a single binary!
- MPlayer v0.11pre series:
  Some new developers joined and from 0.11 the mplayer project is a team-work! Added .ASF file support, and OpenDivX (see www.projectmayo.com) en/decoding.
- MPlayer v0.17a "The IdegCounter" Apr 27, 2001
  The release version of the 0.11pre after 4 months of heavy development! Try it, and be amazed! Thousands of new features added... and of course old code was improved too, bugs removed etc.
- MPlayer 0.18 "The BugCounter" Jul 9, 2001
  2 months since 0.17 and here's a new release.. Completed ASF support, more subtitle formats, introduced libao (similar to libvo but to audio), even more stable than ever, and so on. It's a MUST!
- MPlayer 0.50 "The Faszom(C)ounter" Oct 8, 2001
  Hmm. Release again. Tons of new features, beta GUI version, bugs fixed, new vo and ao drivers, ported to many systems, including opensource DivX codecs and much more. Try it!
- MPlayer 0.60 "The RTFMCounter" Jan 3, 2002
  MOV/VIVO/RM/FLI/NUV fileformats support, native CRAM, Cinepak, ADPCM codecs, and support for XAnim's binary codecs; DVD subtitles support, first release of MEncoder, TV grabbing, cache, liba52, countless fixes.
- MPlayer 0.90 "?" Aug? ??, 2002

## 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 DOES worth it.

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

#### SOFTWARE REQUIREMENTS

- binutils - suggested version is 2.11.x . This program is responsible for generating MMX/3DNow!/etc instructions, thus very important.
- gcc - suggested versions are: 2.95.3, 2.95.4 and 3.1. NEVER use 2.96 or 3.0.x! They generate faulty code for MPlayer. If you decide to change gcc from 2.96, then don't decide in favor of 3.0.x just because it's newer! Early releases of 3.0.x were even more buggy than 2.96. So downgrade to 2.95.x (downgrade libstdc++ too, other programs may need it) or don't up/downgrade at all (but in this case, be prepared for runtime problems). If you vote for 3.x.x, try to use the latest version, early releases had various bugs, so be sure you use at least 3.1, it's tested and working. For detailed information about gcc 2.96's bugs (that are still NOT fixed, they have been WORKED AROUND in MPlayer!), see the gcc 2.96 section and the FAQ.
- XFree86 - suggested version is always the newest (4.2.0). Normally, everyone wants this, as starting with XFree86 4.0.2, it contains the XVideo extension (somewhere referred to as Xv) which is needed to enable the hardware YUV acceleration (fast image display) on cards that support it.
  Make sure its development package is installed, too, otherwise it won't work.
  For some video cards you don't need XFree86. See list below.
- make - suggested version is always the newest (at least 3.79.x). This usually isn't important.
- SDL - it's not mandatory, but can help in some cases (bad audio, video cards that lag strangely with the xv driver). Always use the newest (beginning from 1.2.x).
- libjpeg - optional JPEG decoder, used by -mf and some QT MOV files. Useful for both MPlayer and MEncoder if you plan to work with jpeg files.
- libpng - recommended and default (M)PNG decoder. Required for GUI. Useful for both MPlayer and MEncoder.
- lame - recommended, needed for encoding MP3 audio with MEncoder, suggested version is always the newest (at least 3.90).
- libogg - optional, needed for playing OGG file format.
- libvorbis - optional, needed for playing OGG Vorbis audio.

#### CODECS

- libavcodec: This codec package is capable of decoding H263/MJPEG/RV10/DivX3/DivX4/DivX5/MP41/MP42/WMV1 encoded video streams, on multiple platforms. It is also known to be the fastest for this task. See the libavcodec section for details. Features:
  - gain decoding of videos mentioned above, on non-x86 machines
  - encoding with most of the mentioned codecs
  - this codec is the fastest codec available for DivX/3/4/5 and other MPEG4 types. Recommended!
- Win32 codecs: If you plan to use MPlayer on x86 architecture, you will possibly need them. Download and unzip w32codecs.zip to /usr/lib/win32 BEFORE compiling MPlayer, otherwise no Win32 support will be compiled!
  Note: the avifile project has a similar codecs package, but it differs from ours. If you want to use all supported codecs, then install our package (do not worry, avifile works with it without problems). Features:
  - you need this if you want to play or encode for example movies recorded with various hardware compressors, like tuner cards, digital cameras (example: DV, ATI VCR, MJPEG)
  - needed if you want to play WMV8 movies. Not needed for old ASF's with MP41 or MP42 video (though VoxWare audio is frequent for these files - it's done by the Win32 codec), or WMV7.
- DivX4/DivX5: information about this codec is available in the DivX4/DivX5 section. You possibly don't want this codec as libavcodec (see above) is much faster and has better quality than this, for both decoding and encoding.
  Features:
  - 1 pass or 2 pass encoding with MEncoder
  - can play old DivX3 movies much faster than the Win32 DLL but slower than libavcodec!
  - it's closed-source, and only an x86 version is available.
- XviD: Open source encoding alternative to Divx4Linux
  Features:
  - 1 pass or 2 pass encoding with MEncoder
  - it's open-source, so it's multiplatform.
  - it's about 2 times faster than DivX4 when encoding - about the same quality
- The XAnim codecs are the best (full screen, hardware YUV zoom) for decoding 3ivx and Indeo 3/4/5 movies, and some old formats. And they are multiplatform, so this is the only way to play Indeo on non-x86 platforms (well, apart from using XAnim:). But for example Cinepak movies are best played with MPlayer's own Cinepak decoder!
- For Ogg Vorbis audio decoding you need to install `libvorbis` properly. Use deb/rpm packages if available, or compile from source (this is a nightly updated tarball of Vorbis CVS).
- MPlayer can use the libraries of RealPlayer 8 or RealONE to play files with RealVideo 2.0 and 3.0 video, and Sipro/Cook audio. See RealMedia file format section for installation instructions and more information.

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

- Matrox G200/G400/G450/G550 cards: although a Vidix driver is provided, it is recommended to use the old mga_vid kernel module instead, for it works much better. Please see the mga_vid section about its installation and usage. It is important to do these steps before compiling MPlayer, otherwise no mga_vid support will be built. Also check out the Matrox TV-out section. If you don't use Linux, your only possibility is the VIDIX driver: read the VIDIX section.
- 3Dfx Voodoo3/Banshee cards: please see the tdfxfb section in order to gain big speedup. It is important to do these steps before compiling MPlayer, otherwise no 3Dfx support will be built. Also see the 3dfx TV-out section. If you use X, use at least 4.2.0, as the 3dfx Xv driver was broken in 4.1.0 and earlier releases.
- ATI cards: Vidix driver is provided for the following cards: Radeon, Rage128, Mach64 (Rage XL/Mobility, Xpert98). Also see the ATI cards section of the TV-out documentation, to know if you card's TV-out is supported under Linux/MPlayer.
- S3 cards: the Savage and Virge/DX chips have hardware acceleration. Use as new XFree86 version as possible, older drivers are buggy. Savage chips have problems with YV12 display, see S3 Xv section for details. Older, Trio cards have no, or slow hardware support.
- nVidia cards: very bad choice for video playing (nVidia does not think so). nVidia's cards have very cheap and bad quality chips. Moreover, the built-in nVidia driver in XFree86 does not support hardware YUV acceleration on all nVidia cards. You have to download nVidia's closed-source drivers from nVidia.com. See the nVidia Xv driver section for details.
- 3DLabs GLINT R3 and Permedia3: a VIDIX driver is provided (pm3_vid). Please see the VIDIX section for details.
- Other cards: None of the above?
  - Try if the XFree86 driver (and your card) supports hardware acceleration. See the Xv section for details.
  - If it doesn't, then your card's video features aren't supported under your operating system :(
    If hardware scaling works under Windows, it doesn't mean it will work under Linux or other operating systems: it depends on the drivers. Most manufacturers neither make Linux drivers nor release specifications for their chips, so you are unlucky using their cards. See 'Non-YUV cards'.

#### Non-YUV cards

Fullscreen playing can be achieved by either enabling software scaling (use the `-zoom` or `-vop 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:

- using XFree86: see the DGA driver and X11 driver sections for details. DGA is recommended! Also try DGA via SDL, sometimes it's better.
- not using XFree86: try the drivers in the following order: vesa, fbdev, svgalib, aalib.

#### Some cards:

- Cirrus Logic cards:
  - GD 7548: present on-board and tested in Compaq Armada 41xx notebook series.
    - XFree86 3: works in 8/16bpp modes. However, the driver is dramatically slow and buggy in 800x600@16bpp Recommended: 640x480@16bpp
    - XFree86 4: the Xserver freezes soon after start unless acceleration is disabled, but then the whole thing gets slower than XFree86 3. No XVideo.
    - FBdev: the card is only VBE 1.2 capable, so VESA framebuffer can't be used. When tried to workaround with UniVBE, the framebuffer was unusably full of debris.
    - VESA: the card is only VBE 1.2 capable, so VESA output can't be used. Can't be workarounded with UniVBE.
    - SVGAlib: detects an older Cirrus chip. Usable but slow with `-bpp 8`.

#### SOUND CARDS

- Soundblaster Live!: with this card you can use 4 or 6 (5.1) channels AC3 decoding instead of 2. Read the Software AC3 decoding section. For hardware AC3 passthrough you must use ALSA 0.9 with OSS emulation!
- C-Media with SP/DIF out: hardware AC3 passthrough is possible with these cards, see Hardware AC3 decoding section.
- Features of other cards aren't supported by MPlayer. It's very recommended to read the sound card section!

#### FEATURES

- Decide if you need GUI. If you do, see the GUI section before compiling.
- If you want to install MEncoder (our great all-purpose encoder), see the MEncoder section.
- If you have a V4L compatible TV tuner card, and wish to watch/grab and encode movies with MPlayer, read the TV input section.

Then build MPlayer:

        ./configure
        make
        make install

At this point, MPlayer is ready to use. The directory `$PREFIX/share/mplayer` contains the `codecs.conf` file, which is used to tell the program all the codecs and their capabilities. This file should always be kept up to date together with the main binary.
Check if you have `codecs.conf` in your home directory (`~/.mplayer/codecs.conf`) left from old MPlayer versions, and remove it.

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. Download `mp-arial-iso-8859-*.zip` and/or optional (if exists) language updates. See the Subtitles and OSD section for details.

        mkdir ~/.mplayer/font
        cd ~/.mplayer/font
        unzip mp-arial-iso-8859-1.zip
        ln -s ~/.mplayer/font/arial-24 font

## 1.3 What about the GUI?

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

- use the `-gui` option
- specify `gui=yes` in your config file
- `ln -s $PREFIX/bin/mplayer $PREFIX/bin/gmplayer` , and call `gmplayer` instead.

> Hint
> Press the middle button (on 2 button mice press left and right simultaneously) to open a GTK menu with a DVD playing option.

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:

- VobSub
- Microdvd
- SubRip
- SubViewer
- Sami
- VPlayer
- RT
- SSA
- MPsub
- AQTitle

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`, `sample.idx` - you have to pass the `-vobsub sample -vobsubid <id>` options (optionally with pathname, of course). The `-vobsubid` option is like `-sid` for DVDs, you can choose between subtitle tracks (languages) with it.

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` (optionally with pathname, of course).

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.

About DVD subtitles, read the DVD section.

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

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

#### INSTALLING OSD and SUB

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

- download ready-to-use font packages from MPlayer site. Note: currently available fonts are limited for iso 8859-1/2 support, but there are some other (including Korean, Russian, 8859-8 etc) fonts at contrib/font section of FTP, made by users.
  Font should have appropriate font.desc file which maps unicode font positions to the actual code page of the subtitles text. Other solution is to have subtitles encoded in utf8 encoding and use `-utf8` option or just name the subtitles file <video_name>.utf and have it in the same dir as the video file. Recoding from different codepages to utf8 could be done by using konwert (Debian) or iconv (Red Hat) programs.
  Some URLs:
  - ftp://ftp.mplayerhq.hu/MPlayer/releases/ - ISO fonts
  - ftp://ftp.mplayerhq.hu/MPlayer/contrib/fonts/ - various fonts by users
  - http://realtime.ssu.ac.kr/~lethean/mplayer - Korean fonts & RAW plugin
- use the font generator tool at TOOLS/subfont-c It's a complete tool to convert from TTF/Type1/etc font to mplayer font pkg. (read TOOLS/subfont-c/README for details)
- use the font generator GIMP plugin at TOOLS/subfont-GIMP (note: you must have HSI RAW plugin too, see URL below)

After that, UNZIP the file you downloaded to `~/.mplayer` or `$PREFIX/share/mplayer`. Then rename or symlink one of them 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 3 states: (switch with 'o')

- timer + volume bar + seek bar + subtitles
- volume bar + seek bar + subtitles (default)
- subtitles only

You can change default behaviour by setting `osdlevel=` variable in config file.

## 1.5 RTC

There are three timing methods in MPlayer.

- To use the old method, you don't have to do anything. It uses `usleep()` to tune A/V sync, with +/- 10ms accuracy. However sometimes the sync has to be tuned even finer.
- The new timer code uses PC's RTC (Real Time Clock) for this task, because it has precise 1ms timers. It is automagically enabled when available, but requires root privileges, a setuid root MPlayer binary or a properly set up kernel.
  If you are running kernel 2.4.19pre8 or later you can adjust the maximum RTC frequency for normal users through the `/proc` filesystem. Use this command to enable RTC for normal users:

  `echo 1024 > /proc/sys/dev/rtc/max-user-freq`

  If you do not have such a new kernel, you can also change one line in `drivers/char/rtc.c` and recompile your kernel. Find the section that reads

             * We don't really want Joe User enabling more
             * than 64Hz of interrupts on a multi-user machine.
             */
            if ((rtc_freq > 64) && (!capable(CAP_SYS_RESOURCE)))

  and change the 64 to 1024. You should really know what you are doing, though.
  You can see the new timer's efficiency in the status line.
  The power management functions of some notebook BIOSes with speedstep CPUs interact badly with RTC. Audio and video may get out of sync. Plugging the external power connector in before you power up your notebook seems to help. You can always turn off RTC support with the `-nortc` switch. In some hardware combinations (confirmed during usage of non-DMA DVD drive on an ALi1541 board) usage of the RTC timer causes skippy playback. It's recommended to use the third method in these cases.
- The third timer code is turned on with the `-softsleep` option. It has the efficiency of the RTC, but it doesn't use RTC. On the other hand, it requires more CPU.

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 MEncoder - An All-Purpose Encoder

## 2.5 TV input

This section is about how to enable watching/grabbing from V4L compatible TV tuner.

THIS CODE IS CURRENTLY NOT BEING WORKED ON! Do not expect it to work without tweaking/experimenting!

### 2.5.1 Compilation

- 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`).
- Make sure your tuner works with another TV software in Linux, for example xawtv.

Hint: Are the colors messed up? Then your tuner cannot display in YV12 colorspace. Try I420 (`-vc rawi420`) or YUY2, UYVY, RGB32 (`-vo sdl`) colorspaces. You can specify these with the `outfmt=YV12` option, see below.

### 2.5.2 Available options

| `on` |  | Use TV input.
| `noaudio` |  | No sound, thanks.
| `driver` |  | dummy - NULL TV input :) Used for testing only, generates dummy input. v4l - Captures images from standard V4L interface (default `/dev/video0`).
| `device` |  | Specify a device other than the default `/dev/video0`.
| `input` |  | Specify from which input of the TV tuner you wish to grab (e.g. television, s-video, composite, ...) Prints the available ones during init.
| `freq` |  | Specify the frequency to set the tuner to (e.g. 511.250).
| `outfmt` |  | Specify the output format the tuner should use to transport images to us (rgb32, rgb24, yv12, uyvy, i420 (for i420 you have to pass the `-vc rawi420` option, because of a fourcc conflict)).
| `width` |  | width of the output window in pixels
| `height` |  | height of the output window in pixels
| `norm` |  | available: PAL, SECAM, NTSC
| `channel` |  | Set the tuner to the given channel.
| `chanlist` |  | available: `us-bcast, us-cable, europe-west, europe-east, etc`

### 2.5.3 Keyboard control

| h / k |  | select previous/next channel
| n |  | change norm
| b |  | change channel list

### 2.5.4 Examples

Dummy output, to AAlib :)
`mplayer -tv on:driver=dummy:width=640:height=480 -vo aa`
Input from standard V4L
`mplayer -tv on:driver=v4l:width=640:height=480:outfmt=i420 -vc rawi420 -vo xv`

Note:
If you have a TV card with an external audio device and get only a black screen, although input works with xawtv or similar, then try to use the `-noaudio` option. For the example above this would be:
`mplayer -tv on:noaudio:driver=v4l:width=640:height=480:outfmt=i420 -vc rawi420 -vo xv`

## 2.6 Video filters

Both MPlayer and MEncoder support using a universal video filter layer, which comprises numerous plugins that are listed and explained below. These plugins can perform various actions on the image, such as rescaling, cropping black borders (useful not only for encoding but for playback, too, since black borders increase bus usage and cropping these can boost playback speed on slow boards) and expanding the image (for SVCDs).

With this filter layer it's possible to perform fast image format conversion between the various RGB and YUV formats when necessary. This enables for example playing RGB data on `xv` and `xmga` video output drivers among other things (see the Scale filter).

The filter layer also does Direct Rendering between the plugins, to maximize the speed.

Note that the postprocessing code is now also a part of the layer. It will be explained below.

### 2.6.1 Usage

`mplayer/mencoder -vop filter1,filter2,filter3,...`

This sets up a filter pipeline (you can use any number of filters). Their parameters are optional and if omitted, some of them are set to default values, e.g. `x` and `y` are both set to the center of the screen and `width` and `height` will be set to the width and height of the movie.

Filters are queued starting from libvo, so `filter1` will be the last filter called (after that comes libvo, or when using MEncoder, encoding).

You can get the list of available video filters with the command

`mplayer -vop help`

### 2.6.2 Crop

Description:

Crops the given part of the image and discards the rest. Useful for removing black bands from widescreen movies.

Usage:

`-vop crop[=width:height:x:y]`

### 2.6.3 Expand

Description:

Expands (not scales) movie resolution to the given value and places the unscaled original at coordinates `x` `y`. For movies not containing black bands, this can be used to add them. This is good when creating SVCDs or for placing subtitles or the OSD in these bands.

Usage:

`-vop expand[=width:height:x:y]`

### 2.6.4 Fame/Lavc

Description:

Realtime MPEG1 encoder (using libfame or libavcodec) (for use with DVB/DXR3).

Usage:

`-vop fame`

`-vop lavc`

### 2.6.5 Flip

Description:

Simply flips the image upside down. Useful for some old codecs which can only output a flipped image (these are autodetected).

Usage:

`-vop flip`

### 2.6.6 Format

Description:

This filter is not an image format converter. It just forces the next filter (or libvo) to use the given format. Useful for cards with slow YV12, like tdfx and Savage4. For real conversion, use the scale filter.

Usage:

`-vop format[=format]` (where `format` can be for example: rgb32, yuy2, etc...)

### 2.6.7 Postprocess

Description:

This is our good old postprocess, just converted to the filter layer. Performs image quality enhancement, deinterlacing, etc, see `-npp help` for available options.

Usage:

`-vop pp[=postprocess options/keywords]`

### 2.6.8 RGB2BGR

Description:

Performs RGB 24/32 <-> BGR 24/32 colorspace conversion (default behavior) or RGB 24/32 <-> RGB 24/32 conversion with R <-> B swapping (with the 'swap' option).

Usage:

`-vop rgb2bgr[=swap]`

### 2.6.9 Rotate

Description:

Rotates (flips) the image. The parameter `x` (values: 0-3) controls horizontal and vertical mirroring.

Usage:

`-vop rotate[=x]`

### 2.6.10 Scale

Description:

Scales the image with the software scaler (slow). You can adjust the quality of the scaler with the `-sws` option, see the man page. Nice quality implies speed loss.

Note: Calling this filter with no options means colorspace conversion! This is useful for codecs which can't output in the needed format for the specified video output device. These are hopefully autodetected and scale filter is called to convert. In other cases, you can use it manually.

Usage:

`-vop scale[=width:height]`

### 2.6.11 YUY2

Description:

Forced software YV12/I420 to YUY2 conversion.

Usage:

`-vop yuy2`

### 2.6.12 Mirror

Description:

Flips the image on Y axis.

Usage:

`-vop mirror`

### 2.6.13 DVBscale

Description:

Calculates Y scaling for DVB card.

Usage:

`-vop dvbscale`

### 2.6.14 Cropdetect

Description:

Calculates necessary cropping parameters. It will print the recommended `-vop crop` parameters to stdout. You can adjust the threshold of what is detected as border and what as picture with the `limit` parameter. `limit` is a number from 0 to 255 that defaults to 24. At 0 it detects everything as picture, at 255 everything as border.

Usage:

`-vop cropdetect[=limit]`

### 2.6.15 Rectangle

Description:

Draws a white rectangle of the requested width and height at the designated coordinates over the image. Useful to get visual feedback for the parameters of `-vop crop` before applying them.

Usage:

`-vop rectangle[=width:height:x:y]`

# 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`
| files |  | `mplayer [default options] [path/]filename1 [options for filename1] filename2 [options for filename2] ...`
| VCD |  | `mplayer [options] -vcd trackno [-cdrom-device /dev/cdrom]`
| DVD |  | `mplayer [options] -dvd titleno [-dvd-device /dev/dvd]`
| net |  | `mplayer [options] http://site.com/file.asf (playlists can be used too)`

Latest versions of MPlayer also accepts VCD and DVD tracks in URL style, just like Xine does: `mplayer dvd://1` or `mplayer vcd://1`

      mplayer -vo x11 /mnt/Films/Contact/contact2.mpg
      mplayer -vcd 2
      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).

### 3.2.1 Default controls

#### Keyboard

| <- or -> |  | seek backward/forward 10 seconds
| up or down |  | seek backward/forward 1 minute
| pgup/pgdown |  | seek backward/forward 10 minutes
| < or > |  | seek backward/forward in playlist
| p or SPACE |  | pause movie (press any key)
| q or ESC |  | stop playing and quit program
| + or - |  | adjust audio delay by +/- 0.1 second
| / or * |  | decrease/increase volume
| f |  | toggle fullscreen
| o |  | toggle OSD: none / seek / seek+timer
| z or x |  | adjust subtitle delay by +/- 0.1 second
| r or t |  | adjust subtitle position
| HOME or END |  | go to next/previous playtree entry in the parent list
| INSERT or DELETE |  | go to next/previous alternative source (only available in asx playlist)
(the following keys are valid only when using `-vo xv`)
| 1 or 2 |  | adjust contrast
| 3 or 4 |  | adjust brightness
| 5 or 6 |  | adjust hue
| 7 or 8 |  | adjust saturation

#### GUI

| , and . |  | previous / next file
| gray - or + |  | decrease / increase volume
| enter |  | start playing
| space |  | pause
| s |  | stop
| a |  | about
| l |  | load file
| b |  | skin browser
| e |  | toggle equalizer
| p |  | toggle playlist
| f |  | toggle fullscreen
| m |  | toggle mute

#### TV

| h or l |  | select previous/next channel
| n |  | change norm
| b |  | change channel list

### 3.2.2 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 switch (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.2.1 Key names

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

#### Keyboard

- Any printable character
- SPACE
- ENTER
- TAB
- CTRL
- BS
- DEL
- INS
- HOME
- END
- PGUP
- PGDWN
- ESC
- RIGHT
- LEFT
- UP
- DOWN

#### Mouse

Note: mouse is only supported under X

- MOUSE_BTN0 (Left button)
- MOUSE_BTN1 (Right button)
- MOUSE_BTN2 (Middle button)
- MOUSE_BTN3 (Wheel)
- MOUSE_BTN4 (Wheel)
- ...
- MOUSE_BTN9

#### Joystick

Note: joystick support must be enabled at compile time

- JOY_RIGHT or JOY_AXIS0_PLUS
- JOY_LEFT or JOY_AXIS0_MINUS
- JOY_UP or JOY_AXIS1_MINUS
- JOY_DOWN or JOY_AXIS1_PLUS
- JOY_AXIS2_PLUS
- JOY_AXIS2_MINUS
- ....
- JOY_AXIS9_PLUS
- JOY_AXIS9_MINUS

#### 3.2.2.2 Commands

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

- seek (int) val [(int) type=0]

  Seek to some place in the movie.
  Type 0 is a relative seek of +/- val seconds.
  Type 1 seek to val % in the movie.

- audio_delay (float) val

  Adjust the audio delay of val seconds

- quit

  Quit MPlayer

- pause

  Pause/unpause the playback

- grap_frames

  Somebody know ?

- pt_step (int) val [(int) force=0]

  Go to next/previous entry in playtree. Val sign tell the direction.
  If no other entry is available in the given direction it won't do anything unless force is non 0.

- pt_up_step (int) val [(int) force=0]

  Like pt_step but it jump to next/previous in the parent list. It's useful to break inner loop in the playtree.

- alt_src_step (int) val

  When more than one source is available it select the next/previous one (only supported by asx playlist).

- sub_delay (float) val [(int) abs=0]

  Adjust the subtitles delay of +/- val seconds or set it to val seconds when abs is non zero.

- osd [(int) level=-1]

  Toggle osd mode or set it to level when level > 0.

- volume (int) dir

  Increase/decrease volume

- contrast (int) val [(int) abs=0]
- brightness (int) val [(int) abs=0]
- hue (int) val [(int) abs=0]
- saturation (int) val [(int) abs=0]

  Set/Adjust video parameters. Val range from -100 to 100.

- frame_drop [(int) type=-1]

  Toggle/Set frame dropping mode.

- sub_pos (int) val

  Adjust subtitles position.

- vo_fullscreen

  Switch fullscreen mode.

- tv_step_channel (int) dir

  Select next/previous tv channel.

- tv_step_norm

  Change TV norm.

- tv_step_chanlist

  Change channel list.

- gui_loadfile
- gui_loadsubtitle
- gui_about
- gui_play
- gui_stop
- gui_playlist
- gui_preferences
- gui_skinbrowser

  GUI actions

### 3.2.3 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> switch to specify another file.

### 3.2.4 Slave mode

The slave mode allow you to build simple frontend to MPlayer. When enabled (with the `-slave` switch) 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 or MMS 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 Debian packaging

To build the package, get the cvs version, or .tgz and uncompress it, and cd into programs directory:

        cd main
        fakeroot debian/rules binary

(... mplayer detects hardware/software, builds itself and.. ) dpkg-deb: building package `mplayer' in `../mplayer_0.90-1_i386.deb'.

And now just become root, and:

        dpkg -i ../mplayer_0.90-1_i386.deb as root.

Here's how it looks like:

    	eyck@incubus:/src/main$ sudo dpkg -i ../mplayer_0.90-1_i386.deb
    	Password:
    	(Reading database ... 26946 files and directories currently installed.)
    	Preparing to replace mplayer 0.50-1 (using ../mplayer_0.90-1_i386.deb)
    	Unpacking replacement mplayer ...
    	Setting up mplayer (0.90-1) ...

## 6.2 FreeBSD

To build the package you will need GNU make (gmake, /usr/ports/devel/gmake), native BSD make will not work.

To run MPlayer you will need to re-compile the kernel with "options USER_LDT" (unless you are running -CURRENT, where this is default). If you have a CPU with SSE also use "options CPU_ENABLE_SSE" to use it (FreeBSD-STABLE required, or use kernel patches).

If MPlayer complains about "CD-ROM Device '/dev/cdrom' not found!" make a symbolic link: `ln -s /dev/(your_cdrom_device) /dev/cdrom`

There's no DVD support for FreeBSD yet.

## 6.3 Solaris

MPlayer should work on Solaris 2.6 or newer.

AVI file playback works best on Solaris x86, because you have the option to use the win32 codecs on the x86 platform, or can use MMX/MMX2/3DNow/etc instructions for MP3/DivX/DVD/whatever. On Colaris SPARC, you'll find quite a few AVI files with non working video and/or audio playback, because the video/audio codecs using the Win32 DLLs are not available. However, DivX/OpenDivX movies should work, when using libavcodec.

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

For DVD support you must have the patched libcss installed. Patch: http://www.tools.de/solaris/mplayer/.

Due to two bugs in Solaris 8 x86, you cannot reliably play DVD discs larger than 4 GB:

- The sd(7D) driver on Solaris 8 x86 driver has bug when accessing a disk block >4GB on a device using a logical blocksize != DEV_BSIZE (i.e. CD-ROM and DVD media). Due to a 32Bit int overflow, a disk address modulo 4GB is accessed. (http://groups.yahoo.com/group/solarisonintel/message/22516)
- A similar bug is present in the hsfs(7FS) filesystem code (aka ISO9660), hsfs currently does not support partitions/disks larger than 4GB, all data is accessed modulo 4GB. (http://groups.yahoo.com/group/solarisonintel/message/22592)

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 StrongARM

MPlayer is reported to compile on StrongARM. Use the following command line:

      ./configure --target=arm-linux --disable-css --with-x11libdir=/usr/arm/lib
    	      --with-x11incdir=/usr/arm/lib --disable-gcc-checking

## 6.5 Silicon Graphics / IRIX

Reported working. You'll probably have to use the SGI ao driver. Anyone has closer info?

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

To build the package you will need GNU make (gmake, /usr/ports/devel/gmake), native BSD make will not work, and a recent binutils (including objcopy).

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

To use Win32 DLLs with MPlayer you will need to re-compile the kernel with "`option USER_LDT`".

If MPlayer complains about not finding '/dev/cdrom' or '/dev/dvd' make a symbolic link, e.g. `ln -s /dev/rcd0c /dev/dvd`

The not so hardcore hackers amongst us might want to use the ports version (/usr/ports/x11/mplayer).

## 6.8. Cygwin

You will have to go to the MPlayer directory, and copy or symlink `etc/cygwin_inttypes.h` to `/usr/include/inttypes.h` to make MPlayer compile. Otherwise it will complain about missing `intypes.h`.

# Appendix A - Authors

> Important
> Do not send bug reports, help & feature requests directly to the authors!

Read Appendix C and subscribe to mplayer-users mailing lists.

## The MPlayer project:

- Árpád Gereöffy (A'rpi/ESP-team)
  - player code (mpeg stream demultiplexer and avi/asf parser, A-V sync, seek...)
  - mp3lib, based on mpglib sources [MP3 audio decoder]
  - getch2 [keyboard handler]
  - some changes in libmpeg2 code (progressive frames, bitrate & fps support)
  - libvo improvements: adding OpenGL support, bugfix in mga driver...
  - triple buffering & YUY2 support (for DivX/MPEG4) into mga_vid driver
  - scripts in the TVout directory (TVout on Matrox G400DH, read documentation)
  - hacking DivX/Mpeg4 VfW codecs to get YUV output
  - opendivx decoder speed optimizations (see opendivx/ChangeLog)
  - OSD & SUB display code
  - FFmpeg/libavcodec integration
  - DivX4Linux (Project Mayo) support (see documentation)
  - New DVD-Support using libdvdread
  - DVB support
  - MPEG PES output & DVB card support
  - anything that isn't mentioned elsewhere
- Zoltán Ponekker (Pontscho/Fresh!)
  - configure script and Makefiles for easy compile
  - GUI system
  - 3DNow! support into mp3lib
  - 3DNow! support into fastmemcpy.h
  - various X11 driver changes (keyboard handling, fullscreen, bpp detect, etc)
  - libvo: adding xmga driver, and fullscreen support to xv
  - audio mixer (volume) support
- Gábor Lénárt (LGB)
  - configure script improvements
  - Makefile improvements
  - preliminary DVD support
  - various X11 cleanups and fixes
  - HTMLization of documentation
- Gábor Bérczi (Gabucino)
  - documentation writer & maintainer
  - Hungarian translation of documentation, homepage, and help output
  - second homepage design&gfx
  - homepage maintainer
  - testing, codecs quality & speed comparisons
  - IRC channels operator (#MPlayer is user channel)
  - experimental MINIX port :) (what's funny about it?)
  - MPsub subtitle format design
- Szabolcs Berecz (Szabi)
  - codecs.conf file parser
  - config file and command line parser
  - mga_vid fixes, module option etc.
  - fbdev support in libvo
  - type #7 subtitle support
- László Megyer (Lez, Laaz)
  - SUB reader
  - screensaver+DPMS disable for libvo
- Gyula László (Chass, Tégla)
  - first fonts (mp_font1.zip)
  - third homepage design&gfx
  - fourth (current) homepage design&gfx
- Zoltán Márk Vicián (Se7en)
  - SVGAlib support in libvo
- Alex Beregszaszi (al3x)
  - ALSA output driver in libao2
  - vo_ggi output driver in libvo (www.ggi-project.org)
  - XAnim codecs support
  - VIVO files support
  - TV grabbing support
  - Quicktime hackings
  - libavcodec support in MEncoder
  - RM file format demuxer
  - mencoder framecopy
  - yuv4mpeg1 support
  - NuppelVideo demuxer changes
  - subconfig
  - VIDIX and libdha hackings
  - Matrox driver port to Vidix
  - XVidix video output driver
  - and other various stuff (in libvo, libmad syncing, dec_audio/video and loader)
- Andreas Ackermann (Acki)
  - LIRC support (see documentation)
  - DGA support in libvo
- Felix Bünemann (Atmos)
  - SDL driver maintainer
  - Additional YUV formats fixes
  - New font (mp_font2.zip)
  - PNG file output support in libvo
  - flipping support (for Indeo 3/4, etc)
  - SDL audio driver in libao2
  - RAW PCM/WAVE file writer for libao2
  - Ogg Vorbis audio support
  - Various aspect code
  - Win32 (Cygwin) port
  - priority support in codecs.conf (never used ;)
  - DivX5Linux support
  - AAC decoding support via libfaad2
  - Darwin (MacOS X) port
- TeLeNiEkO
  - Spanish translation of documentation
- Michael Graffam
  - XF86VidMode support to vo_x11 and vo_dga
  - Video mode switching code to vo_dga
- Jens Hoffmann
  - Additional YUV formats support
  - found the big BITMAPINFOHEADER problem -> solved ASV2 pixelization
- Nick Kurshev
  - memcpy optimizations for AMD K7 and Intel Pentium III (fastmemcpy.h)
  - CD-ROM tune info
  - further 3DNow! optimizations into mp3lib and libac3 and FFmpeg
  - Russian translation of documentation
  - radeon_vid, rage128_vid, radeonfb
  - libvo driver: vo_vesa
  - VIDIX and libdha design, programming
- German Gomez Garcia
  - SPDIF AC3 output for SBLive!
- Dariusz Pietrzak (Eyck)
  - Debian packaging support (see debian/* and this documentation)
  - support for vplayer subtitle format
  - preliminary support for .RT subtitle format
- Marcus Comstedt
  - initial Solaris8-x86 support
  - configure fixes
- Jürgen Keil
  - patched MPlayer to work on Solaris 8 x86
  - various fixes (win32, configure, etc)
  - SUN audio driver in libao2
  - mediaLib support in libavcodec
- Vladimir Kushnir
  - patched MPlayer to work on FreeBSD x86
- Bertrand BAUDET
  - network streaming support
- Derek J Witt
  - MMS network streaming patches
- Alban Bedel
  - MMS network streaming patches
  - Playtree and per-entry config
  - Playlist parsers
  - New input
  - Audio only support
  - MP3, WAV and Ogg demuxers
  - Support for audio from external file
  - DXR2 driver
  - vo_aa improvements
- Artur Zaprzala
  - Complete font generator prog + OSD font (TOOLS/subfont-c)
- lanzz@lanzz.org
  - GIMP font generator plugin (TOOLS/subfont-gimp)
- Adam Tla/lka
  - osd/sub review, fixes, optimization, utf8 support
  - various fixes
- Folke Ashberg
  - native AAlib driver (-vo aa)
- Kamil Toman
  - Czech fonts
- Ivan Kalvatchev
  - interlaced MPEG2 support (libmpeg2)
  - libvo2 draft
- pl
  - new configure script
  - general code maintaining, fixes, patch committing
- Michael Niedermayer
  - new postprocessing code (with deinterlacing etc...)
  - software scaling C/MMX/MMX2/3DNow support (swscale.c)
  - various rgb/yuv bpp converters
  - new, better IDCT code for libavcodec
  - runtime CPU detection
  - SSE optimization of liba52
- Sven Goethel
  - libvo driver: vo_gl2
- joy_ping
  - ao_alsa9 fixes
- Eric Anholt
  - CPU detection code
- Jiri Svoboda
  - AQT type subtitles support
  - CRTC2 YUV support in mga_vid
  - DirectFB video output driver
- Oliver Schoenbrunner
  - SGI audio driver
  - MIPS support
- Jeroen Dobbelaere
  - libmad support
- David Holm
  - DXR3 support
  - libmp1e import
- Panagiotis Issaris
  - -playlist option
  - NuppelVideo support
- Mike Melanson
  - MS Video1 codec open-source implementation
  - FLI demuxer, decoder
  - Unified ADPCM Decoder (supports IMA/DVI, MS ADPCM, several others)
  - FILM (.cpk) file demuxer
  - RoQ file demuxer
  - RoQ Audio/Video decoder
  - QT SMC decoder
  - QT RLE decoder
  - MS RLE decoder
- Tobias Diedrich
  - NAS audio output driver
  - DXR2 driver
- Kilian A. Foth
  - -slave mode
- Tim Ferguson
  - Open source Cinepak decoder
  - Open source CYUV decoder
- Sam Lin
  - -wid (plugger) patch
- Johannes Feigl
  - original German docs translation
  - some improvements in configure, small patches
  - found somebody (Thilo Wunderlich) who sent a DVB card
- Kim Minh Kaplan
  - DVD and VobSub subtitles display support
  - DVD subtitles rip to VobSub
- Brian Kuschak
  - RTP streaming support (reading)
- Stephen Davies
  - support for large video files (>2^32 bytes in size)
  - surround sound
- Rik Snel
  - `zr` video output driver
- Anders Johansson
  - audio plugin system, some effect plugins
- Roberto Togni
  - Open source QT RPZA decoder
  - Open source HuffYUV decoder
- Wojtek Kaniewski
  - Mouse wheel support
- Fredrik Kuivinen
  - OSD/subtitles outside movie - for SDL
- Florian Schneider
  - RealVideo libraries loader

## Main testers:

- Tibor Balázs (Tibcu)
- Péter Sasi (SaPe)
- Christoph H. Lampert
- Attila Kinali
- Dirk Vornheder
- Bohdan Horst (Nexus)

## The codecs, libs:

- Aaron Holtzman: <aholtzma@engr.uvic.ca>
  - ac3dec (and libac3) author [AC3 audio decoder]
  - mga_vid driver [Matrox G200/G400 YUV Back-end Scaler]
  - mpeg2dec [Fast MPEG1/MPEG2 video decoder, currently used in player]
- Michel Lespinasse: <walken@zoy.org>
  - did large libmpeg2 changes for better speed and mpeg conformance
- Eugene Kuznetsov: <divx@euro.ru>
  - avifile author [AVI player library for linux, using Win32 VfW/ACM codecs]
  - technical help about AVI and ASF formats, and how to get YUV using VfW...
  - divx4linux technical support
- Zdenek Kabelac: <kabi@informatics.muni.cz>
  - current avifile maintainer(?)
  - some technical help about the win32 stuff and timers
- Gerard Lantau: <glantau@yahoo.fr>
  - FFmpeg/libavcodec author,maintainer (open source mpeg, mjpeg, divx en/decoder)
- Project Mayo: <http://www.projectmayo.com>
  - the OpenDivX codec authors
- Michael Hipp:
  - mpglib author [isn't used directly but some parts in mp3lib]
- Mark Podlipec:
  - xa_gsm.c author [MS-GSM audio codec] [from a GSM library by Jutta Degener and Carsten Bormann]
- Jake Janovetz:
  - remez.c author [Used to calculate audio filter coefficients]
- Vivien Chappelier, Damien Vincent:
  - libFAME authors [fast mpeg-1 encoder, used by -vo mpegpes/-vo dxr3]

Their code is not used in current player version, but I've got some ideas or other technical help from:

- John F. McGowan http://www.jmcgowan.com/
  - AVI FAQ author/collector. [site with many useful docs on codecs and avi format]
- Dirk Farin: <farin@ti.uni-mannheim.de>
  - dvdview author [MPEG1/MPEG2 video decoder, used in v0.5-v0.8]
- Adam Williams: <broadcast@earthling.net>
  - libmpeg3 (and xmovie) author [MPEG1/MPEG2 video decoder, used in v0.1-v0.4]

# Appendix A2 - MPlayer code and documentation maintainers

## Homepage

- Design: Chass and Tornado
- Contents: Gabucino

## English documentation

- user docs: Gabucino
- review, grammar fixes: Diego Biurrun, Nilmoni Deb
- input layer, lirc, slave mode docs: Albeu
- tech/* docs: A'rpi

## Documentation translations

- Hungarian: Gabucino
- German: Jonas Jermann
- French: Stephane Marteau (outdated)
- Spanish: TeLeNiEkO (outdated)
- Russian: Nick Kurshev (outdated)
- Polish: Justyna Biala
- Italian: Matteo Balduzzi

## Platforms/ports

- DEBIAN packaging: Dariusz Pietrzak
- FreeBSD support: Vladimir Kushnir, Nexus
- BSD/OS support: Steven Schultz
- Solaris 8 support: Jürgen Keil, pl
- MIPS support: Oliver Schoenbrunner
- Win32/Cygwin support: Atmosfear

## MPlayer code:

- A-V sync code: A'rpi
- libmpdemux, libmpcodecs: A'rpi
- TV input: Alex
- DVD support (newest - dvdnav): Kees Cook
- DVD support (new - dvdread/dvdcss): A'rpi
- DVD support (old - libcss): LGB
- network streaming: Bertrand BAUDET
- ascii subtitles file parser/reader/writer: Lez
- DVD/VOB subtitles: Kim Minh Kaplan
- SUB/OSD renderer: Adam Tla/lka
- config files & commandline parser: Szabi
- playtree, input layer: Albeu
- postproc, colorspace converters: Michael Niedermayer
- LIRC support (old): Acki
- VIDIX core, libdha: Nick Kurshev

## libvo drivers:

- vo_3dfx.c - OBSOLETED, use xv or tdfxfb
- vo_tdfxfb.c - Mark Zealey (mark@zealos.org)
- vo_aa.c - Folke Ashberg
- vo_directfb.c - Jiri Svoboda
- vo_dga.c - Acki (outdated)
- vo_dxr2.c - Albeu
- vo_dxr3.c - David Holm
- vo_fbdev.c - Szabi
- vo_ggi.c - al3x
- vo_gl.c - A'rpi (outdated)
- vo_gl2.c - Sven Goethel
- vo_md5.c - A'rpi
- vo_mga.c - A'rpi
- vo_mpegpes.c - A'rpi
- vo_null.c - A'rpi
- vo_pgm.c - A'rpi
- vo_png.c - Atmos
- vo_sdl.c - Atmos
- vo_svga.c - Matan Ziv-Av
- vo_vesa.c - Nick Kurshev
- vo_x11.c - Pontscho
- vo_xmga.c - Pontscho
- vo_xv.c - Pontscho
- vo_xvidix.c - al3x
- vo_zr.c - Rik Snel

## VIDIX drivers:

- genfb_vid - al3x
- mach64_vid - Michael Niedermayer
- mga_vid - al3x ?
- nvidia_vid - al3x (development stopped - don't expect it)
- radeon_vid - Nick Kurshev
- rage128_vid - Nick Kurshev

## libao2 drivers:

- ao_alsa5.c - al3x
- ao_alsa9.c - al3x (fixed by joy_ping)
- ao_dxr2.c - Albeu
- ao_null.c - A'rpi
- ao_oss.c - A'rpi
- ao_pcm.c - Atmos
- ao_sdl.c - Atmos
- ao_sgi.c - Oliver Schoenbrunner
- ao_sun.c - Jürgen Keil

## TOOLS:

- subfont-c - Artur Zaprzala (zybi@fanthom.irc.pl)
- subfont-GIMP - lanzz@lanzz.org
- *.pl - Atmos
- x2mpsub - Gabucino
- mencvcd - Juergen Hammelmann (juergen.hammelmann@gmx.de)
- subrip - Kim Minh Kaplan
- others - A'rpi

# Appendix B - Mailing lists

There are some public mailing lists on MPlayer. Subscribing can be achieved on the following addresses:

- MPlayer developers list: http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
  This list is about mplayer development! Talking about interface/API changes, new libraries, code optimization, configure changes, and send patches here. Do NOT send bug reports, user questions, feature requests or flames here! This list should be kept low-traffic.
- MPlayer users list: http://mplayerhq.hu/mailman/listinfo/mplayer-users
  - Send bug reports here (after reading the Known Bugs section, and Appendix C).
  - Send feature requests here (after reading the WHOLE documentation).
  - Send user questions here (after reading the WHOLE documentation).
- MPlayer Hungarian users list: http://mplayerhq.hu/mailman/listinfo/mplayer-felhasznalok
  - Hungarian language list
  - topic? We'll see about it... mostly flame and RTFM questions up to now :(
- MPlayer & Matrox G200/G400/G450/G550 users:
  http://mplayerhq.hu/mailman/listinfo/mplayer-matrox Send Matrox related questions here
  - things about mga_vid
  - Matrox's official beta drivers (for X 4.x.x)
  - and about matroxfb-TVout stuff.
- MPlayer & DVB card users: http://mplayerhq.hu/mailman/listinfo/mplayer-dvb
  Things related to the hardware decoder card called DVB (NOT DXR3!).
- MPlayer CVS-log: http://mplayerhq.hu/mailman/listinfo/mplayer-cvslog
  Send only questions about CVS changes here (if you do not understand why a change is required or you have a better fix or you have noticed a possible bug/problem in the committed patch). Be sure in that your target developer reads this list!
- MPlayer Cygwin-porting list: http://mplayerhq.hu/mailman/listinfo/mplayer-cygwin
  List for discussion about MPlayer's Cygwin port.

Note: Unless explicitly stated otherwise the language of the above lists is English. Please do not send messages in other languages!

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

# Appendix C - How to report bugs

# Appendix D - Known bugs

Special system/CPU-specific bugs/problems:

- SIGILL (signal 4) on P3 using 2.2.x kernels:
  Problem: kernel 2.2.x doesn't have proper (working) SSE support
  Solution: upgrade kernel to 2.4.x
  Workaround: `./configure --disable-sse`
- General SIGILL (signal 4):
  Problem: you compiled and run mplayer in different machines (for example compiled on P3 and running on Celeron)
  Solution: compile MPlayer on the same machine where you will use it!
  Workaround: `./configure --disable-sse` etc. options
- "Internal buffer inconsistency" during MEncoder run:
  Problem: known problem when lame < 3.90 was compiled with gcc 2.96 or 3.x.
  Solution: use lame >=3.90.
  Workaround: compile lame with gcc 2.95.x and remove any already installed lame packages, they may have been compiled with gcc 2.96.
- Messed up MP2/MP3 sound on PPC:
  Problem: known GCC miscompilation bug on PPC platforms, no fix yet.
  Workaround: use FFmpeg's (slow) MP1/MP2/MP3 decoder (`-ac ffmpeg`)
- sig11 in libmpeg2, when scaling+encoding:
  Problem: known GCC 2.95.2 MMX bug, upgrade to 2.95.3.

Various A-V sync and other audio problems:

General audio delay or jerky sound (exists with all or many files):

- most common: buggy audio driver! - try to use different drivers, try ALSA 0.9 OSS emulation with -ao oss, also try -ao sdl, sometimes it helps. If your file plays fine with -nosound, then you can be sure it's sound card (driver) problem.
- audio buffer problems (buffer size badly detected)
  Workaround: mplayer -abs option
- samplerate problems - maybe your card doesn't support the samplerate used in your files - try the resampling plugin (-aop)
- slow machine (CPU or VGA)
  try with -vo null, if it plays well, then you have slow VGA card/driver
  Workaround: buy a faster card or read this documentation about how to speed up
  Also try -framedrop

Audio delay/de-sync specific to one or a few files:

- bad file
  Workaround:
  - -ni or -nobps option (for non-interleaved or bad files)
    and/or
  - -mc 0 (required for files with badly interleaved VBR audio)
    and/or
  - -delay option or +/- keys at runtime to adjust delay
  If none of these help, please upload the file, we'll check (and fix).
- your sound card doesn't support 48kHz playback
  Workaround: buy a better sound card... or try to decrease fps by 10% (use -fps 27 for a 30fps movie) or use the resampler plugin
- slow machine
  (if A-V is not around 0, and the last number in the status line increasing)
  Workaround: -framedrop

No sound at all:

- your file uses an unsupported audio codec
  Workaround: read the documentation and help us adding support for it

No picture at all (just plain grey/green window):

- your file uses an unsupported video codec
  Workaround: read the documentation and help us adding support for it
- auto-selected codec can't decode the file, try to select another using -vc or -vfm options
- you try to play DivX 3.x file with OpenDivX decoder or XviD (-vc odivx) - install Divx4Linux and recompile player

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