Difference between revisions of "XvMC"

From ArchWiki
Jump to: navigation, search
m (codeline -> ic)
Line 53: Line 53:
 
6. Install:
 
6. Install:
 
  $ pacman -U mplayer-1.0rc1-4.pkg.tar.gz
 
  $ pacman -U mplayer-1.0rc1-4.pkg.tar.gz
7. Finally, edit {{Filename|/etc/X11/XvMCConfig}} (create if it does not exists), and add:
+
7. Finally, edit {{ic|/etc/X11/XvMCConfig}} (create if it does not exists), and add:
 
  libXvMCNVIDIA_dynamic.so.1
 
  libXvMCNVIDIA_dynamic.so.1
 
{{Note|lbXvMCNVIDIA_dynamic.so.1 is part of the nvidia driver package.}}
 
{{Note|lbXvMCNVIDIA_dynamic.so.1 is part of the nvidia driver package.}}

Revision as of 11:02, 13 February 2012

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:XvMC#)

Merge-arrows-2.pngThis article or section is a candidate for merging with MPlayer.Merge-arrows-2.png

Notes: Talk:MPlayer#XvMC Merge (Discuss in Talk:XvMC#)

This guide allows NVIDIA video card users to enable X-Video Motion Compensation (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.

Introduction

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.

Requirements

  • 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 /var/abs/extra/mplayer to a temporary working path.

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

4. Edit the PKGBUILD:

$ cd ~/devel/abs/mplayer
$ nano PKGBUILD
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'\
        libxvmc)
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 /etc/X11/XvMCConfig (create if it does not exists), and add:

libXvMCNVIDIA_dynamic.so.1
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 mplayer -help.

References

XvMC (from MythTV wiki).
http://www.mythtv.org/wiki/XvMC

MPlayer 1.0rc1 + XvMC Nov 2006.
http://www.murga-linux.com/puppy/viewtopic.php?t=13216

Using older machines for HDTV video playback.
http://www.penlug.org/twiki/bin/view/Main/LinuxHardwareInfoNvidia5200