Difference between revisions of "VDPAU"

From MythTV Official Wiki
Jump to: navigation, search
(User results)
Line 417: Line 417:
 
! style="background-color: lightyellow" | '''[http://www.newegg.com/Product/Product.aspx?Item=N82E16814121235 Asus EN8400GS Silent PCIe] (G98 chipset, 612 MHz GPU Clock)'''
 
! style="background-color: lightyellow" | '''[http://www.newegg.com/Product/Product.aspx?Item=N82E16814121235 Asus EN8400GS Silent PCIe] (G98 chipset, 612 MHz GPU Clock)'''
 
| 512mb
 
| 512mb
! 180.22
+
! 180.29
! One Field 1x HW
+
! Temporal 2x HW
! 0.21-fixes + patch
+
! 0.21-fixes + patch r20005
 
! HDHomeRun (1080i+720p), FireWire (1080i+720p)  
 
! HDHomeRun (1080i+720p), FireWire (1080i+720p)  
 
! Retro
 
! Retro
Line 427: Line 427:
 
! style="background-color: lightgreen" | Yes
 
! style="background-color: lightgreen" | Yes
 
! Pentium 4 3000 5% -10%
 
! Pentium 4 3000 5% -10%
! Temporal/Advanced 2x stutter. Bob 2x works but due to double/ghost images during movement, and non-smooth pans, is inferior to Xv Bob (which I had used for years). One Field is a very nice substitute.
+
! Temporal 2x/1x work great, albeit with slight stuttering when OSD displays; Advanced 2x/1x still stutter. Bob 2x works too, but pointless given Temporal 2x.  
 
|-
 
|-
 
! style="background-color: lightyellow" | '''GeForce 9300'''.  '''[http://www.silentpcreview.com/article892-page1.html Motherboard Asus P5N7A-VM]'''
 
! style="background-color: lightyellow" | '''GeForce 9300'''.  '''[http://www.silentpcreview.com/article892-page1.html Motherboard Asus P5N7A-VM]'''

Revision as of 06:26, 19 February 2009

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. It in essence provides what PureVideo/DirectX Video Acceleration is on the Windows platform

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 issues.

Some highlights/limitations of NVIDIA's current implementation:

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

Nvidia Implementation

The current API documentation is here.

The most recent driver release may be obtained here here

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.

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.

ffmpeg + mplayer

NVIDIA has developed patches to ffmpeg and MPlayer to demonstrate a video player using VDPAU. These patches have been integrated to the main line and include changes against libavcodec, libavutil, ffmpeg, and MPlayer itself; they may serve as an example of how to use VDPAU.

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 or 9400/9300 IGP. VC-1 is an alternative to H.264, and is a supported video codec for HD DVDs and Blu-ray Discs.

Support for the following GPUs was added with the stable driver version 180.22:

  • Quadro FX 2700M
  • GeForce 9400M G
  • GeForce 9400M
  • GeForce 9800 GT
  • GeForce 8200M G
  • GeForce Go 7700
  • GeForce 9800M GTX
  • GeForce 9800M GT
  • GeForce 9800M GS
  • GeForce 9500 GT
  • GeForce 9700M GT
  • GeForce 9650M GT
  • GeForce 9500 GT

Supported Drivers

Support started with version 180.06. Most recent current version is 180.22 marked as Stable, released January 8, 2009. The VDPAU API changes in this version and programs must be recompiled to utilize the driver. Beta drivers can be found at download.nvidia.com under the Linux-* folders.

New Pre-release drivers 180.27 released 29th of January 2009 incorporate a lot of fixes to VDPAU. 32bit 64bit

Newer Pre-released drivers 180.29 released 6 Feb 2009 are available here 32bit 64bit

MythTV Support

VDPAU was announced to the MythTV developer mailing list on Nov 15, by Andy Ritger, Manager of the NVIDIA Linux driver. Within four days, Issac had posted a POC (proof of concept) patch against the upcoming 0.22 TRUNK line for VDPAU support, saying "Preliminarily, this stuff looks _very_ promising." On November 29, Changeset 19165 included preliminary support within TRUNK. While VDPAU support is still in it's infancy of both the driver and MythTV, several testers have responded that they are able to use VDPAU with some issues. Currently running trunk with VDPAU support not explicitly recommended, except for testing and bug reporting purposes.

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.

MythTV 0.21-fixes and Ubuntu repository

Jean-Yves Avenard has posted a patch for MythTV 0.21-fixes (19823) on his site that backported VDPAU from the development branch. He also provided a Ubuntu/Mythbuntu repository for all of us running that distribution. MythTV and mplayer with VDPAU support can be yours by using this repository. Add to /etc/apt/sources.list:

   deb http://www.avenard.org/files/ubuntu-repos files/

In addition to "aptitude safe-upgrade", the package nvidia-glx-180 needs to be installed to replace the earlier version of nvidia-glx-*.

Display Profiles

Setup a display profile with:

   decoder = nvidia vdpau acceleration
   video + osd renderers: vdpau 

and a second recommended as a fallback:

   decoder = ffmpeg (Standard)
   video + osd renderers: vdpau

Issac suggests to make sure composite extension is disabled when using vdpau (in xorg.conf):

Section "Extensions"
      Option  "Composite"     "Disable"
EndSection

Compiling MythTV with VDPAU

For Myth to support VDPAU it must be built in. MythTV's compilation script supports this. To enable it use the configure script and the --enable-vdpau option.

The following is an example of how to compile MythTV with VDPAU:

MythTV

  ./configure --prefix=/usr --enable-proc-opt --disable-joystick-menu \
  --disable-firewire --disable-hdhomerun --disable-xvmcw --enable-xvmc-opengl \ 
  --enable-vdpau  --disable-directfb --enable-opengl-vsync

MythPlugins

  ./configure --prefix=/usr --enable-opengl --enable-mytharchive \ 
  --disable-mythbrowser --disable-mythcontrols --disable-mythflix \ 
  --enable-mythgallery --disable-mythgame --enable-mythmusic --disable-mythnews \
  --disable-mythphone --enable-mythvideo --disable-mythweather \
  --disable-mythzoneminder --disable-mythmovies

Caveats

  • No AGP cards support this feature (But PCI versions exist)
  • Currently only supported by the developers in SVN 0.22 TRUNK. The backport to 0.21-fixes is unsupported.
  • Warning: Do not install the vdpau beta driver unless you intend to use an NVidia-based video cards exclusively thereafter. Merely installing the nvidia driver breaks digital playback on Intel (and probably any other) video/graphics cards. The nvidia installer *replaces* standard header files (/usr/include/glext.h, glext.h,glxext.h and glx.h) and library files (/usr/lib/libGLcore.so, libGL,so, libGLU.so and libGL.la), with nvidia specific versions which breaks OpenGL playback on other graphic cards. (The 180 series drivers do appear to be usable with non-vdpau capable nvidia GPUs (6200 etc.))
  • If you wish to try an nvidia video board instead of your other video/graphic 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 if you wish to revert to a different family of GPU chip.
  • Video profiles can not filter based on video format (only by resolution). So if you wanted to use VDPAU for H.264/HD-PVR and Xv for Mpeg2 this is not currently possible.
  • Off loading to the GPU may increase its heat out-put. It may seem obvious, but check your GPU temperature and cooling arrangements.

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.22 OneField r19640 HDHomerun, Fusion5 HD 720p and 1080i Gray ProjectGrayhem-wide Fluxbox 1080p Yes Athlon 64 3200+ 5-15% OSD causes stuttering, only OneField deinterlacing is usable
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.
PNY GeForce 8400 GS PCI 512mb Beta 180.16 One Field (1x, Hw) r19597 1080i DVI Default (Blue) Retro Gnome 1080i Yes Intel Duo Core 2 2.2Ghz, 10% Looks great and playback is good. OSD causes play back to stutter a little bit. Tweaking would probably fix.
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.
Gigabyte GA-E7AUM-DS2H (9400 IGP onboard) 128mb(shared) 180.22 Advanced 2x HW r19631 TinyTwin (1080i+720p) Blootube G.A.N.T xfce 1080p Yes Pentium D 2.8 0-5% Usually perfect, no tearing, plays VC-1, occasional stuttering, regular "Serious error detected", system needs more RAM
Asus EN8400GS Silent PCIe (G98 chipset, 567 MHz Core Clock) 512mb 180.22 Advanced 2x HW r19822 HDHomerun (1080i+720p), HDPVR (720p), HDDVD 1080p (VC1), DVD 480p Isthmus Blootube wide Gnome 1080p Yes Athlon X2 3800 (939) 5% -10% Almost perfect, plays VC-1 - H264 and MPEG2, occasional stuttering
Asus EN8400GS Silent PCIe (G98 chipset, 567 MHz Core Clock) 512mb 180.29 Temporal 1x HW 0.21-fixes w/VDPAU patch OTA HDTV (1080i & 720p) Retro Retro Fluxbox 1080p Yes AMD BE-2350 (2.1 GHz) 2% - 5% Temporal 1x HW and One Field are the only deinterlacers that don't cause jerky picture and out of sync audio. All h264 test files from HD_Playback_Reports are nice and smooth.
Club 3D 9400GT Silent PCI-E (G96) 512mb 180.22 Advanced 2x HW r19693 SD MPEG-2 DVB, SD H.264, 720p H.264 sample videos Default G.A.N.T. Xfce4 1280x768 DVI->hdmi Yes Athlon64 3000+ (1.8GHz) SD: 5-8%, HD: 10-20% Occational crashes. Was impossible to play any HD without VDPAU, so significant improvement!
Asus GeForce 8600 GT Silent 512mb 180.26 Advanced 2x HW r19823 0.21-fixes SD MPEG-2 DVB, SD H.264, 720p H.264 sample videos blootube wide blootube KDE3.5.10 1600x1050 DVI->hdmi & 960x540->VGA Yes Core2Duo (2,66GHz) SD: 11%, HD: 5% Little tearing, SD slower as it uses ffmpeg.
EVGA e-GeForce 8500GT 1000mb 180.25 Advanced 2x HW r19825 SD MPEG-2 DVB, SD H.264, 720p H.264 hdpvr Default ProjectGrayhem-wide Xfce4 1080p DVI->hdmi Yes AMD Athlon 64 X2 Dual Core Processor 3600+ SD: 3-5%, HD: 4-5% WOW!
GIGABYTE GA-E7AUM-DS2H 9400GT IGP 512mb 180.22 Advanced 2x HW r19885 720p H.264 HD-PVR (11Mbps) Default MythCenter RatPoison VGA (Analog) 1024x768 Yes Pentium Core 2 Duo 2.8Ghz HD: 1-2% Slight stuttering w/ OSD, but generally, WOW
Asus EN8400GS Silent PCIe (G98 chipset, 612 MHz GPU Clock) 512mb 180.29 Temporal 2x HW 0.21-fixes + patch r20005 HDHomeRun (1080i+720p), FireWire (1080i+720p) Retro Retro Ratpoison 1080p Yes Pentium 4 3000 5% -10% Temporal 2x/1x work great, albeit with slight stuttering when OSD displays; Advanced 2x/1x still stutter. Bob 2x works too, but pointless given Temporal 2x.
GeForce 9300. Motherboard Asus P5N7A-VM 256MB 180.22 One Field 1x HW 0.21-fixes + patch From disk (originally from pcHDTV HD-5500) Mythbuntu Mythbuntu Xfce 1080p Yes Intel(R) Core(TM)2 Duo CPU E7400 @ 2.80GHz 10% overall Slight oddness on top line. Before VDPAU, CPU usage at .74. I am including complete load average, mythfrontend.real at 5-7%.