Monday, January 11, 2010

How To: Enable Hardware Accelerated Decoding via DXVA2 in XBMC for Windows

In this guide will show you how to offload h.264 playback to your graphics card in XBMC for Windows 7 and Windows Vista which means lower CPU usage and less playback issues.

Prerequisites

  • Windows 7 or Windows Vista only with latest updates.
    Note: Windows XP doesn’t support DXVA2 so you have to use DSPlayer.
  • Video card that supports DXVA2 such as one of the following:
  • Latest Dharma build of XBMC. Until the official stable version of Dharma is released you’ll have to use a nightly build. DXVA2 support was not enabled in 9.11 Camelot.
  • Latest driver for your video card from the manufacturer’s web site.
    NOTE: It is recommended to download the driver directly from the manufacturer’s website instead of using Windows Update.

Enabling DXVA2 in XBMC

Once you have met the hardware and software requirements, you’ll need to enable DXVA2 hardware acceleration in XBMC.

In the default skin, go to System > Settings > Video > Playback. Select Allow Hardware Acceleration (DXVA2).

If DXVA2 is enabled and working properly you should see your CPU usage in XBMC significantly lower.
To test and verify, while playing a video press the O key to enable the on-screen display.

When DXVA2 is in use, on the 2nd line you will see dc:ff-h264-dxva2. When DXVA2 is not enabled this line will read dc:ff-h264.


The bottom line will display an average which is your CPU usage. It may be helpful to toggle the DXVA2 setting to do a before and after. In my example I received 40-50% without DXVA2 and 4-8% once it was enabled. Some lucky bastards even report 1% or even 0% usage.

And that’s that! You should now be enjoying improved H.264 and VC1 playback and system performance in XBMC for Windows. If this was or wasn’t helpful, please share your thoughts and experiences in the comments.