VDPAU

From MythTV Official Wiki
Revision as of 09:08, 4 January 2009 by DStulken (talk | contribs) (Links to further information: - Updated for new name of linked NVIDIA Component Out page)

Jump to: navigation, search

General

What is it

The API is called VDPAU (Video Decode and Presentation API for Unix). It provides a large subset of PureVideo HD functionality for NVIDIA Linux, Solaris, and FreeBSD users.

The current API documentation is here:

[1]

The most recent driver release may be obtained through here:

http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14

Some highlights of VDPAU:

  • Defines an API for GPU-accelerated decode of MPEG-1, MPEG-2, H.264, and VC-1 bitstreams.
  • Defines an API for post-processing of decoded video, including temporal and spatial deinterlacing, inverse telecine, and noise reduction.
  • Defines an API for timestamp-based presentation of final video frames.
  • Defines an API for compositing sub-picture, on-screen display, and other UI elements.


Note that VDPAU does not address content protection.

Some highlights/limitations of NVIDIA's current implementation:

  • Supported on NVIDIA GPUs with the NVIDIA second generation video processors (see the end of this announcement for a complete GPU list).
  • Currently, only one video stream can be decoded at a time; we hope to lift this restriction eventually.

The VDPAU support in the NVIDIA 180.06 beta release is still very preliminary. We are aware of cases of visual corruption and in some cases GPU hangs. We will be working on these issues over the next several NVIDIA driver releases.

While NVIDIA's VDPAU implementation is not ready for end user use yet, it should be far enough along that interested application developers can begin working with it.

Additionally, NVIDIA has developed patches to ffmpeg and MPlayer to demonstrate a video player using VDPAU:

[2]

These patches include changes against libavcodec, libavutil, ffmpeg, and MPlayer itself; they may serve as an example of how to use VDPAU.

Once we do some further testing, bugfixing, and cleanup, we will contribute the MPlayer patches to the MPlayer developers.


If other hardware vendors are interested, they are welcome to also provide implementations of VDPAU. The VDPAU API was designed to allow a vendor backend to be selected at run time.

Supported Cards

VDPAU is currently supported on the following NVIDIA GPUs (as at version 180.16 released December 12, 2008)

Desktop GPUs Mobile GPUs Motherboard GPUs Professional GPUs
  • GeForce Go 7700
  • GeForce 200 Series
  • GeForce 9 Series
  • GeForce 8300 GS
  • GeForce 84xx Series
  • GeForce 85xx Series
  • GeForce 86xx Series
  • GeForce 8800 GTS 512
  • GeForce 8800 GT
  • GeForce 8800 GS
  • GeForce 9500 GT
  • GeForce 9800 GT
  • GeForce 96xxM
  • GeForce 8200M G
  • GeForce 8800M
  • GeForce 8800M GTS
  • GeForce 8800M GTX
  • GeForce 8600M
  • GeForce 8400M
  • GeForce 9200M
  • GeForce 9300M
  • GeForce 9400M
  • GeForce 9500M
  • GeForce 9650M GT
  • GeForce 9700M
  • GeForce 9700M GT
  • GeForce 98xxM
  • GeForce 9800M GTX
  • GeForce 9800M GT
  • GeForce 9800M GS
  • GeForce 8200
  • GeForce 8300
  • GeForce 9100
  • GeForce 9300
  • GeForce 9400
  • Quadro FX 370 LP
  • Quadro NVS 450
  • Quadro FX 470
  • Quadro FX 2700M
  • Quadro FX 4800
  • Quadro FX 5800
  • Quadro CX

VC-1 support in NVIDIA's VDPAU implementation currently requires GeForce 9300 GS, GeForce 9200M GS, GeForce 9300M GS, or GeForce 9300M GS. VC-1 is an alternative to H.264, and is a supported video codec for HD DVDs and Blu-ray Discs.

Supported Drivers

Nvidia Beta Drivers only. Support started with version 180.06. Most recent current version is 180.18, released December 12, 2008. The VDPAU API changes in this version and programs must be recompiled to utilize the driver. Beta drivers can be found at ftp://download.nvidia.com/XFree86 under the Linux-* folders

Myth Support

VDPAU was announced to the mythtv dev list on Nov 15, by Andy Ritger, Manager of the NVIDIA Linux driver. Within 4 days, Issac had posted a POC (proof of concept) patch to the mailing list for VDPAU support within trunk, saying "Preliminarily, this stuff looks _very_ promising." On November 29, Changeset 19165 included preliminary support within trunk. While the VDPAU support is still in it's infancy, in both the driver and myth, several testers have responded saying that they are able to use VDPAU with limited issues. Running current trunk for VDPAU support is currently not recommended except for testing and bug reporting purposes only.

Preliminary support was added to SVN at r19165. You must compile with the --enable-vdpau and do a dist clean if upgrading from prior versions. WARNING: the vdpau support changes break mythtv playback of digital recordings on *Intel video chipsets*. Analog recordings both record and playback in myth without difficulty. Digital recordings appear to be fine, playing back without difficulty in mplayer, but will not play in mythtv. This *may* be confined to hdhomerun recordings. More testing is needed. Proceed with care: make backups!

Display Profiles

Setup a display profile with:

   decoder = nvidia vdpau acceleration
   video + osd renderers: vdpau 

What works

  • Deinterlacing (select "Advanced (2x, Hw)" for best results)
  • OSD/PiP.
  • Color controls
  • Other stuff

What doesn't

  • Lots and lots of other stuff.

Caveats

  • No AGP cards (But PCI versions do exist)
  • Currently only supported in SVN .22
  • Warning: Merely installing the nvidia driver breaks digital playback on Intel (and probably any other) chipset. The nvidia installer *replaces* standard header and library files with nvidia specific versions, breaking OpenGL playback on other chips. Analog recordings (PVR500 etc) record and play. Digital (HDHomeRun) in standard and high definition do not play in mythtv, although recordings are fine and playable in mplayer. (The replacement of the headers/libraries breaks Myth's code! Consider it collateral damage.) If you wish to try an nvidia video board instead of your other chipset, be careful. Make a mythconverg database backup, and note the SVN of your present working version. In addition, it would be wise to extract the NVidia pkg.run file (NVIDIA-LINUX....pkg.run -x) and make backups of the original files for which copies exist in the ../include/GL, ../lib and ../X11R6 folders. The package help states that the option '--no-opengl-headers' will skip installing the Nvidia OpenGL headers, however it appears that the other libraries will be replaced anyway. It also does not appear to be the case that the '--uninstall' option actually reverses the install, as the orginal files do not appear to be retained. This is a real time-killer ( and WAF killer) and may require a complete re-installation of the system.
  • Will NOT be backported to .21-fixes
  • Video profiles can't filter based on video format (only by res). So if you wanted to use VDPAU for H.264/HD-PVR and Xv for Mpeg2 this is not currently possible.
  • Many MKV's will not play. Most fixed in 180.16 release

Troubleshooting

The following configuration changes should be used to prevent issues with VDPAU when used with MythTV:

To prevent vertical and horizontal tearing of the image when viewing live tv or recordings, run the following to disable X Composite Extension (may also cure the all white/gray OSD):

   sudo nvidia-xconfig --no-composite
  • Enable OpenGL VSync within MythTV.

Links to further information

NVIDIA Linux Forum - http://www.nvnews.net/vbulletin/forumdisplay.php?f=14

NVIDIA Component Out MythTV Wiki Page - NVIDIA_Component_Out

User results

Chipset Onboard / Allocated Memory Driver De-interlacer SVN Ver Source OSD Theme Window Manager Display res Working CPU Usage when playing Comments
Asus 8300GS 256mb Beta 180.11 None r19260 HDHomeRun mpeg2 720p and 1080i isthmus Blootube Wide Fluxbox 1080p Yes Athlon X2 64 5700 4-5% 720p is reliable but 1080 i get not enought memory errors.
Asus 8300GS 256mb Beta 180.11 None r19179 HD-PVR h.264 720p 13.5 Mbits/sec Retro MythCenter-wide Gnome 720p Yes Athlon X2 64 4200+ 4-5% OSD is all white and unreadable
GeForce 8300 512mb Beta 180.16 Bob 2x r19260 DVB-S h.264 1080i 18 Mbits/sec Blootube MythCenter-wide KDE 1080p Yes Athlon X2 64 5200+ 10-15%
PNY 8400GS PCI 512mb Beta 180.11 Basic 2x HW r19260 HDHomerun, Fusion5 HD 720p and 1080i Gray ProjectGrayhem-wide Fluxbox 1080p Yes Athlon 64 3200+ 5-15% Slight tearing in fast movement, stuttering when OSD is displayed
Sparkle 8400GS PCI 512mb Beta 180.11 Basic 2x HW r19298 HDHomerun, 720p and 1080i Default (Blue) G.A.N.T. fvwm VGA (analog) 1024x768 Yes Intel Atom 330, 10-20% I'm no expert but it looks awesome to me! OSD seems ok.
Sparkle 8400GS PCI 512mb Beta 180.16 Basic 2x HW r19298 HDHomerun 1080i, PVR-150 SD mpeg2 Default (Blue) G.A.N.T. fvwm VGA (analog) 1024x768 No Intel Atom 330, 10-20% No video. Rolled back driver and things work again. Haven't tried building new myth.