Difference between revisions of "XvMC"

From ArchWiki
Jump to: navigation, search
m (Bot: Removing from Category:HOWTOs (English))
m (Supported hardware: nvidia-304xx-utils)
(16 intermediate revisions by 6 users not shown)
Line 1: Line 1:
''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]].''
+
[[Category:Graphics]]
[[Category:Graphics (English)]]
+
[[Category:X Server]]
[[Category:X Server (English)]]
+
{{Article summary start}}
== Introduction ==
+
{{Article summary text|Explains XvMC support in various hardware and software components.}}
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.
+
{{Article summary heading|Related}}
'''NOTE'''
+
{{Article summary wiki|VA-API}}
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.
+
{{Article summary wiki|MPlayer}}
 +
{{Article summary end}}
  
== Known Limitations ==
+
'''X-Video Motion Compensation (XvMC)''' is an extension for the X.Org Server. The XvMC API allows video programs to offload portions of the video decoding process to the GPU video-hardware. 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.
There are a few considerations to keep in mind:
+
{{Note|XvMC is obsoleted by [[VA-API]] nowadays, which have better support for recent GPUs.}}
* 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==
+
== Supported hardware ==
* 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 [[NVIDIA|proprietary NVIDIA driver]] is required for XvMC to work.
+
  
==How to add XvMC support to MPlayer?==
+
Only MPEG-1 and MPEG-2 videos are supported by all driver.
1. Install the required dependencies as root:
+
*[[NVIDIA]] GeForce 6 and GeForce 7 series cards are supported by the proprietary {{pkg|nvidia-304xx-utils}} package, available in the [[official repositories]].
# pacman -S cvsup libxvmc unzip libcaca --asdep
+
*NVIDIA GeForce 5 FX series cards are supported by the proprietary {{AUR|nvidia-173xx-utils}} package, available in the [[Arch User Repository]].
'''cvsup''' is required for downloading the source.<br>
+
*NVIDIA GeForce4 series cards are supported by the proprietary {{AUR|nvidia-96xx-utils}} package, available in the [[Arch User Repository]].
'''libxvmc''' is the required library for compiling XvMC support.<br>
+
*[[Intel]] 810, GMA 950, GMA 3100, GMA 3000, GMA 4500 series and Ironlake GPUs are supported by the open source {{pkg|xf86-video-intel}} package, available in the [[official repositories]].
'''unzip''' is required to uncompress required files called by PKGBUILD.<br>
+
*[[ATI Catalyst|AMD]] Radeon HD 5000 series and newer GPUs are supported by the proprietary {{pkg|catalyst-utils}} package, available in the [[official repositories]].
'''libcaca''' is a dependency that is required for compiling MPlayer.
+
*AMD Radeon HD 4000 series GPUs are supported by the proprietary {{AUR|catalyst-legacy-utils}} package, available in the [[Arch User Repository]].
 +
*[[Via Unichrome|S3 Graphics]] UniChrome GPUs are supported by the open source {{pkg|xf86-video-openchrome}} or {{pkg|xf86-video-unichrome}} packages, available in the [[official repositories]].
  
2. Sync the ABS tree:
+
=== Configuration ===
# abs
+
3. Copy {{Codeline|/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 {{Filename|/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? ==
+
The open source drivers should work without any configuration. For the proprietary drivers create a new file {{ic|/etc/X11/XvMCConfig}} and add:
It must be started from the command line:
+
*For NVIDIA GPUs:
gmplayer -vo xvmc -vc ffmpeg12mc -fs foobar.mpeg
+
:{{bc|libXvMCNVIDIA_dynamic.so.1}}
'''gmplayer''' - Loads up the GUI version of mplayer, whereas using '''mplayer''' does not.<br>
+
*For AMD GPUs:
'''-vo''' - Video driver: This is the only way of specifying '''xvmc'''.<br>
+
:{{bc|libAMDXvBA.so.1}}
'''-vc''' - Video codec: The only compatible codec with XvMC is '''ffmpeg12mc''', which covers MPEG1/2 videos.<br>
+
'''-fs''' - Full screen (optional): tells GMplayer to start in fullscreen mode.
+
  
For more options, type {{Codeline|mplayer -help}}.
+
== Supported software ==
 +
{{Tip|Using full screen mode and disabling GUI elements may prevent flickering while playing the video.}}
  
== References ==
+
=== [[MPlayer]] ===
XvMC (from MythTV wiki). <br>
+
Install {{pkg|mplayer}} package, available in the [[official repositories]].
http://www.mythtv.org/wiki/index.php/XvMC
+
{{bc|$ mplayer -vo xvmc -fs ''foobar.mpeg''}}
 +
*'''-vo''' - Select xvmc video output driver
 +
*'''-fs''' - Fullscreen playback (optional)
  
MPlayer 1.0rc1 + XvMC Nov 2006. <br>
+
MPlayer based players:
http://www.murga-linux.com/puppy/viewtopic.php?t=13216
+
* {{pkg|gnome-mplayer}}: open preferences and set the video output to "xvmc", and select "Enable Video Hardware Support".
 +
* {{pkg|smplayer}}: open preferences and set the video driver to "xvmc", and deselect "Enable screenshots".
 +
 
 +
=== xine ===
 +
Install {{pkg|xine-ui}} package, available in the [[official repositories]].
 +
{{bc|$ xine -V xvmc -f -g --no-splash ''foobar.mpeg''}}
 +
or
 +
{{bc|$ xine -V xxmc -f -g --no-splash ''foobar.mpeg''}}
 +
*'''-V''' - Select the xvmc or xxmc video driver
 +
*'''-f''' - Start in fullscreen mode (optional)
 +
*'''-g''' - Hide GUI (optional)
 +
*'''--no-splash''' - Don't display the splash screen (optional)
 +
 
 +
== References ==
  
Using older machines for HDTV video playback. <br>
+
*[http://www.mythtv.org/wiki/XvMC XvMC (from MythTV wiki)]
http://www.penlug.org/twiki/bin/view/Main/LinuxHardwareInfoNvidia5200
+
*[http://www.murga-linux.com/puppy/viewtopic.php?t=13216 MPlayer 1.0rc1 + XvMC Nov 2006]
 +
*[http://www.penlug.org/twiki/bin/view/Main/LinuxHardwareInfoNvidia5200 Using older machines for HDTV video playback]
 +
*[http://www.grogy.com/local_doc/share/doc/xine-lib/README_xxmc.html Xine's xxmc plugin]

Revision as of 11:58, 17 November 2012

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary end

X-Video Motion Compensation (XvMC) is an extension for the X.Org Server. The XvMC API allows video programs to offload portions of the video decoding process to the GPU video-hardware. 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: XvMC is obsoleted by VA-API nowadays, which have better support for recent GPUs.

Supported hardware

Only MPEG-1 and MPEG-2 videos are supported by all driver.

Configuration

The open source drivers should work without any configuration. For the proprietary drivers create a new file /etc/X11/XvMCConfig and add:

  • For NVIDIA GPUs:
libXvMCNVIDIA_dynamic.so.1
  • For AMD GPUs:
libAMDXvBA.so.1

Supported software

Tip: Using full screen mode and disabling GUI elements may prevent flickering while playing the video.

MPlayer

Install mplayer package, available in the official repositories.

$ mplayer -vo xvmc -fs foobar.mpeg
  • -vo - Select xvmc video output driver
  • -fs - Fullscreen playback (optional)

MPlayer based players:

  • gnome-mplayer: open preferences and set the video output to "xvmc", and select "Enable Video Hardware Support".
  • smplayer: open preferences and set the video driver to "xvmc", and deselect "Enable screenshots".

xine

Install xine-ui package, available in the official repositories.

$ xine -V xvmc -f -g --no-splash foobar.mpeg

or

$ xine -V xxmc -f -g --no-splash foobar.mpeg
  • -V - Select the xvmc or xxmc video driver
  • -f - Start in fullscreen mode (optional)
  • -g - Hide GUI (optional)
  • --no-splash - Don't display the splash screen (optional)

References