Difference between revisions of "XvMC"

From MythTV Official Wiki
Jump to: navigation, search
(Prebuffering Pause or stutter with Nvidia)
(Replaced content with "{{Warning box|XvMC has been deemed unnecessary for playback of any content it supports, and detrimental to future graphical enhancements to MythTV. It has been removed fr...")
 
(299 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
'''X-Video Motion Compensation''', or '''XvMC''', allows video programs to only send a graphics card differences from the last frame instead of sending a whole frame. XvMC can be used to reduce CPU utilization when playing back MPEG-2 video. In theory it should also reduce bus bandwidth requirements. Savings will be most dramatic with slow CPUs or when playing HD content. MythTV can be compiled to use XvMC for native playback. External players such as Xine and Mplayer can also be compiled to support XvMC.
+
{{Warning box|XvMC has been deemed unnecessary for playback of any content it supports, and detrimental to future graphical enhancements to MythTV. It has been removed from MythTV as of 0.25, and superseded by [[VDPAU]], [[VAAPI]], and [[Broadcom_Crystal_HD|Crystal HD]].}}
 +
{{Wikipedia}}
  
 
+
[[Category:Outdated]]
 
 
===Software===
 
XvMC is a software library provided by the X11 system to provide user applications with a standard Application Programming Interface, or API, to hardware specific features.
 
 
 
====Supported Video Formats====
 
Currently, only MPEG-2 is supported. This is usually a hardware limitation. As an exception, one of the Unichrome chips is capable of XvMC accelerated MPEG-4 playback, but the Unichrome driver doesn't support that functionality at the time of this writing.
 
 
 
====Drivers====
 
Each hardware video card capable of XvMC video acceleration requires a software driver to enable these features. Below is a list of the recommended software drivers and driver versions for each supported hardware type.
 
 
 
=====Nvidia=====
 
There are currently two X11 Nvidia drivers available: Open Source and Proprietary Binary. However, most, if not all people running an Nvidia card with MythTV use the binary driver. See below for an explanation of each driver.
 
 
 
======Proprietary Binary======
 
{| border=1 cellspacing=0 cellpadding=4
 
|-
 
| Status
 
| This driver is full featured and actively maintained and developed directly by Nvidia Corp. Unless otherwise noted, any mention of Nvidia hardware on the MythTV wiki, forums, or mailing lists usually imply the use of the binary Nvidia driver.
 
|- bgcolor=#CCFFCC
 
| Supports XvMC?
 
| '''YES'''
 
|-
 
| How to Obtain?
 
| This driver is '''not''' included with the XOrg X11 Server for licensing reasons. It is available as a third party download. Usually your linux distribution will have a package available in RPM, Deb, ebuild, or other format.
 
|-
 
| Recommended Version
 
| As of 2006-02-16, the currently recommended driver version is: '''1.0.7676'''
 
|-
 
| X11 driver name
 
| nvidia
 
|}
 
 
 
======Open Source======
 
{| border=1 cellspacing=0 cellpadding=4
 
|-
 
| Status
 
| Basic functionality. Only supports 2D hardware acceleration. (no 3D/OpenGL acceleration)
 
|- bgcolor=#FFCCCC
 
| Supports XvMC?
 
| ''NO''
 
|-
 
| How to Obtain?
 
| Included with the XOrg X11 Server.
 
|-
 
| X11 driver name
 
| nv
 
|}
 
 
 
=====Unichrome=====
 
(Add some info about Unichrome hardware here)
 
 
 
{| border=1 cellspacing=0 cellpadding=4
 
|-
 
| Status
 
| '''Unknown''' (please provide driver information here)
 
|- bgcolor=#CCFFCC
 
| Supports XvMC?
 
| '''YES'''
 
|-
 
| How to Obtain?
 
| '''Unknown''' (please provide general download information here)
 
|-
 
| Recommended Version
 
| '''Unknown''' (please provide version information here)
 
|}
 
 
 
=====Intel 810=====
 
(Add some general info about i810 hardware here)
 
 
 
{| border=1 cellspacing=0 cellpadding=4
 
|-
 
| Status
 
| Full featured driver. Supports 2D and 3D hardware acceleration.
 
|- bgcolor=#CCFFCC
 
| Supports XvMC?
 
| '''YES'''
 
|-
 
| How to Obtain?
 
| Included with the XOrg X11 Server.
 
|-
 
| Recommended Version
 
| Any recent version should be fine as this driver is fairly mature and doesn't change often.
 
|-
 
| X11 driver name
 
| i810
 
|-
 
| '''NOTES:'''
 
| The i810 driver isn't mentioned much in the MythTV community. The chipset this driver supports is probably out of production, so hardware may be scarce. It is unknown to the author whether the i810 works with MythTV for XvMC video acceleration.
 
|}
 
 
 
====MythTV====
 
Before MythTV can make use of XvMC hardware support, it first has to be built with XvMC support.
 
 
 
=====Binary Distributions=====
 
The following binary linux distributions support XvMC out of the box:<br>(list distros here)
 
 
 
=====Compiling=====
 
For a more hands-on approach, one can compile MythTV directly from source.
 
 
 
======Source======
 
If compiling manually:
 
<code>./configure --enable-xvmc</code>
 
 
 
======Gentoo======
 
If installing MythTV on Gentoo Linux, make sure the "nvidia" or "unichrome" USE flags are set. This can usually be set on a per package basis in the following file:
 
<code>/etc/portage/package.use</code>
 
 
 
=====Configuration=====
 
After MythTV has been installed, it needs to be configured to utilize XvMC.
 
#In MythTV's frontend menus, please navigate to:<br>Setup -> TV Settings -> Playback
 
#Next, change the "Preferred MPEG2 Decoder" to "Standard XvMC"
 
#Make sure "Extra audio buffering" is checked.
 
That's it! XvMC should be enabled. Now play a few Recordings and see what happens. If problems occur, check the [[XvMC#Tips and Tricks|Tips and Tricks]] section below for more info.
 
 
 
====MPlayer====
 
MPlayer includes an XvMC output plugin. To use it, try this:
 
<code>mplayer -vo xvmc -vc ffmpeg12c</code>
 
(assuming you are running mplayer with XvMC support compiled in)
 
 
 
====Xine====
 
Xine's plugin is oddly named '''xxmc''' (xx instead of xv). Try this:
 
<code>xine -V xxmc </code>
 
(assuming, of course, that xine has been compiled with XvMC support.)
 
 
 
===Example CPU Savings===
 
{| border=1 cellspacing=0 cellpadding=4
 
|-
 
! CPU
 
! RAM
 
! Video Card
 
! Content
 
! CPU w/XvMC
 
! CPU w/o XvMC
 
! Notes
 
|-
 
| 2.93Ghz Celeron D
 
| 1Gb DDR 3200
 
| Nvidia FX 5200
 
| SD
 
| 8-12%
 
| 10-14%
 
|
 
|-
 
| AMD Athlon XP 2400
 
| 512mb DDR 3200
 
| Nvidia FX 6200
 
| HD (1080i)
 
| 20-25%
 
| 80%
 
| XvMC figure is w/BOB deinterlace enabled. (of course XvMC still locks to lock on "prebuffer" in MythTV 0.18 a lot)
 
|-
 
| AMD Athlon XP 1600
 
| 1GB DDR
 
| Nvidia 6800LE
 
| SD
 
| 15%
 
| 25%
 
|
 
|-
 
| AMD Athlon 800
 
| 768MB PC100
 
| Nvidia Geforce 2MX
 
| SD
 
| 15%-20%
 
| 45-50%
 
|
 
|-
 
| VIA C3 Nehemiah 1GHz
 
|
 
|
 
|
 
| 20%
 
|
 
| can hardly play mpeg2 without XvMC
 
|-
 
| Intel P4 2.26
 
|
 
|
 
| HD
 
| 50%
 
| 95%+
 
|
 
|-
 
| colspan="7" align="center" bgcolor="#FFCCCC" | (Please add your example Hardware stats here!)
 
|}
 
 
 
===Tips and Tricks===
 
 
 
====Prebuffering Pause or stutter with Nvidia====
 
XvMC sounds like a dream come true for those wanting to play HD content with a slower system, but unfortunately it's not always perfect. Even with XvMC and low CPU usage, many still experience problems with prebuffering pauses, mild to moderate audio or video stuttering, problems with the OSD, and other issues. If their CPU is fast enough, many simply turn off XvMC as a last resort. But this guide hopes to help the reader make the most of XvMC and avoid frustration. Here are some suggestions that may help:
 
*Try disabling '''[[OpenGL VSync]]'''.
 
*Try setting this in your "Device" section in your xorg.conf:
 
<code>Option "NVAGP" "1"</code>
 
*Use BOB (2x framerate) deinterlacing
 
 
 
====OSD Flicker====
 
If you are using MythTV version 0.18 and you experience severe OSD stutter or flicker when XvMC is enabled, try upgrading to 0.19. The OSD flicker is fixed for the author in 0.19 with an Nvidia FX 5200.
 
 
 
====Greyscale OSD====
 
MythTV version 0.19 ships with a hack to enable full color OSD with XvMC enabled. However, the hack is disabled by default. The code change is [http://svn.mythtv.org/trac/changeset/7569 described here].
 
 
 
To enable the "hack" under 0.19, do this:
 
*Make a change to your xorg.conf file. Add this to your Devices section:
 
Option "XvmcUsesTextures" "false"
 
*Make a change to the "settings" table in MythTV's MySQL database. You can access your MySQL mythconverg database from the command line like this:
 
<code>mysql -u root -p mythconverg</code>
 
You will be prompted for a password. If you don't remember setting one up, try just pressing the '''ENTER''' key.
 
 
 
Here is the SQL statement you should use to make the change:
 
<code>INSERT INTO settings SET value='UseChromaKeyOSD',data='1',hostname='yourhost';</code>
 
 
 
But change 'yourhost' to the hostname that your frontend is running on. If you're not sure what your hostname is, run `hostname` on the command line to find out.
 
 
 
*Now restart X11 (for the xorg.conf change to take effect) and your frontend (for the SQL change to take effect) and see if it works!
 
 
 
===External Links===
 
*[http://en.wikipedia.org/wiki/XvMC Wikipedia's XvMC Page]
 
*[http://unichrome.sourceforge.net/ Unichrome Project @ sf.net]
 
*[http://www.openchrome.org/ openChrome Project (Unichrome no longer supports XvMC)]
 
 
 
 
 
[[Category:Glossary]] [[Category:HOWTO]]
 

Latest revision as of 20:16, 11 November 2013

Warning.png Warning: XvMC has been deemed unnecessary for playback of any content it supports, and detrimental to future graphical enhancements to MythTV. It has been removed from MythTV as of 0.25, and superseded by VDPAU, VAAPI, and Crystal HD.

Wikipedia-logo-en.png
Wikipedia has an article on: