From ArchWiki
Revision as of 04:18, 8 July 2010 by Dheart (talk | contribs) (Introduction)
Jump to: navigation, search

This guide allows NVIDIA video card users to enable XvMC support for MPlayer (as the default MPlayer build for Arch Linux does not support XvMC). It involves using ABS to recompile MPlayer. Required readings: ABS, makepkg.


In layman's terms, XvMC allows the video card to handle processing of certain video features. Particularly, features that have the tendency of heavily depending on the processor. Since XvMC acceleration takes the load off the CPU, thereby reducing processor requirements for video playback, it is an ideal solution for HDTV video playback scenarios. NOTE As of writing this (08.VII.2010) mplayer from repos supports vdpau which is far superior compared to the practically useless xvmc. DON'T bother trying to get it to work.

Known Limitations

There are a few considerations to keep in mind:

  • The current implementation of XvMC for Nvidia cards does not support anything other than MPEG1/2 videos. Do not bother trying other formats like Xvid, it will not work.
  • ffmpeg12mc is the only codec you can use with XvMC. Attempting to try any other codec will result in a fatal error message.
  • Calling Mplayer/GMplayer from the commandline is required.
  • XvMC is buggy and prone to cause issues under various circumstances.


  • An NVIDIA video card that is known to support XvMC. GeForce 4MX, GeForce FX series, GeForce 6xxx and GeForce 7xxx series. Any other older cards will not work. Also note that GeForce 8xxx and later no longer support XvMC.
  • Installing the proprietary NVIDIA driver is required for XvMC to work.

How to add XvMC support to MPlayer?

1. Install the required dependencies as root:

# pacman -S cvsup libxvmc unzip libcaca --asdep

cvsup is required for downloading the source.
libxvmc is the required library for compiling XvMC support.
unzip is required to uncompress required files called by PKGBUILD.
libcaca is a dependency that is required for compiling MPlayer.

2. Sync the ABS tree:

# abs

3. Copy Template:Codeline to a temporary working path.

$ cp /var/abs/extra/mplayer ~/devel/abs/mplayer

4. Edit the PKGBUILD:

$ cd ~/devel/abs/mplayer
4.1 Add the XvMC library to the dependency list:
depends=('libxxf86dga' 'libxv' 'libmad' 'libungif' 'cdparanoia' 'gtk2'\
        'codecs' 'sdl' 'lame' 'libtheora' 'ttf-bitstream-vera' 'xvidcore'\
        'libgl' 'smbclient' 'aalib' 'dbus-glib' 'jack-audio-connection-kit'\
4.2 Add the XvMC configure flag:
./configure --prefix=/usr --enable-gui --disable-arts --enable-x11 \
    --enable-runtime-cpudetection --enable-sdl \
    --enable-theora --confdir=/etc/mplayer \
    --enable-xvid --enable-gl --enable-tv-v4l1 --enable-tv-v4l2 --enable-largefiles \
    --disable-liblzo --disable-speex --disable-openal --disable-faac \
    --enable-smb --enable-aa --disable-fribidi --disable-libdv --disable-musepack \
    --language=all --enable-lirc --disable-dvdnav --disable-esd --enable-xvmc
Note: The relevant parts are bolded. Do not replace the rest of the dependecies, or flags, for the ones listed here; they are examples.

5. Compile the package:

$ makepkg

6. Install:

$ pacman -U mplayer-1.0rc1-4.pkg.tar.gz

7. Finally, edit Template:Filename (create if it does not exists), and add:

Note: lbXvMCNVIDIA_dynamic.so.1 is part of the nvidia driver package.

Check the list of available mplayer video drivers:

$ mplayer -vo help

The following entry should appear among the list:

xvmc    XVideo Motion Compensation

How do I use MPlayer with XvMC enabled?

It must be started from the command line:

gmplayer -vo xvmc -vc ffmpeg12mc -fs foobar.mpeg

gmplayer - Loads up the GUI version of mplayer, whereas using mplayer does not.
-vo - Video driver: This is the only way of specifying xvmc.
-vc - Video codec: The only compatible codec with XvMC is ffmpeg12mc, which covers MPEG1/2 videos.
-fs - Full screen (optional): tells GMplayer to start in fullscreen mode.

For more options, type Template:Codeline.


XvMC (from MythTV wiki).

MPlayer 1.0rc1 + XvMC Nov 2006.

Using older machines for HDTV video playback.