The MythTV developers made it clear that VDPAU support would only be added to the oncoming 0.22 version.
I didn’t want to wait ; It seemed to me that 0.22 is a long way from being released and would give me a very low WAF. So I backported the VDPAU 0.22 changes to 0.21-fixes.
It doesn’t modify your Myth database ; and would later allow a clean update to 0.22.
The original code was written by Mark Kendall and Isaac Richards so all thanks should go to them.
VDPAU is a new API introduced by nVidia allowing full hardware decoding for H264, MPEG2 and VC-1 videos.
This set of patches also includes the OpenGL optimisations and fixes written by Mark Kendall which can be found there: http://www.btinternet.com/~mark_kendall/fixes-patches/
I have been using his OpenGL patches for months without any problems, there are a great additions to MythTV and provide much better performance with the new deinterlacers.
If using Ubuntu, you can get automatically mythtv and mplayer with VDPAU support by using my Ubuntu repository:
For others, those patches should apply cleanly to 0.21-fixes/mythtv branch (revision #20674 as of time of writing). You must use the nVidia drivers version 180.22 and above (latest as of writing 180.60).
Please do not bother the various mythtv mailing lists, and do not lodge bugs in the mythtv TRAC system.
How to use it:
Warning: You must have installed nvidia drivers 180.x (official stable) or 185.x (beta) before proceeding.
Download the latest set of VDPAU patches. The file is a gzip one (compressed). Move it to your home directory (make the explanations easier for later on).
go into your home folder:
cd
gunzip mythtv-fixes-glvdpau20658.patch.gz
(this will create the file mythtv-fixes-glvdpau20658.patch)
Follow the usual instructions on how to download and build MythTV
http://www.mythtv.org/wiki/User_Manual:Initial_Installation
Before running the first configure command, you install the patch with:
patch -p1 < ~/mythtv-fixes-glvdpau20658.patch
Run configure with the following options:
./configure --enable-vdpau --enable-opengl-video --enable-opengl-vsync
(I compile my packages with:
CFLAGS="-g -O2 -fPIC -DPIC" ./configure --prefix=/usr --compile-type=debug --enable-lirc --enable-audio-alsa --enable-audio-oss --enable-audio-jack --enable-dvb --enable-ivtv --enable-firewire --enable-joystick-menu --enable-opengl-vsync --with-bindings=perl --enable-opengl-video --enable-ffmpeg-pthreads --enable-xvmc --enable-xvmc-vld --enable-xvmc-pro --enable-glx-procaddrarb --enable-libfaad --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libfftw3 --enable-vdpau)
Then follow all the other installation instructions.
Quick F.A.Q:
Q: My CPU usage is still very high / my computer still can’t play HD videos
A: Using VDPAU isn’t automatic, you must create a new TV Playback profile. In mythfrontend, go into Setup -> TV Settings -> Playback -> Playback Profiles. Create a new playback profile VDPAU.
If you have a nVidia < 8600GT or < 9500GT, use the following profile:
< W: 1920 H: 720, decoder: VDPAU, renderer: VDPAU, Deinterlacer: Advanced 2X
>= W: 0 H: 720, decoder: VDPAU, renderer: VDPAU, Deinterlacer: Temporal 2X
If you have a nVidia >= 8600GT or >= 9500GT, use the following profile:
> W: 0 H: 0, decoder: VDPAU, renderer: VDPAU, Deinterlacer: Advanced 2X
With this profile, your CPU usage during playback should be around 5-10%.
Q: Video is tearing
A: Tearing when composite is enabled is the norm (checkout the driver readme for more details). Add to your xorg.conf:
Section "Extensions"
Option "Composite" "Disable"
EndSection
This isn’t a requirement anymore if you’re running nVidia drivers 185.x
Q: I get stuttering every few seconds with errors like "NVP: Video is 3.12705 frames behind audio (too slow), dropping frame to catch up."
A: Check your settings: In General: make sure "Aggressive sound card buffering" is unckecked
In TV -> Playback "Extra audio buffering" is checked.
Q: I installed your latest patch, and it makes my machine crash
A: You must run nvidia drivers >= 180.25 with the latest patches. Additionally, using MythTV with VDPAU on a non-VDPAU hardware would Segfault. This was fixed after revision #19968
Q: Your patches don’t compile or they don’t work.
A: All my patches are tested and compile fine ; the problem is at your end. Make sure you have installed the required libraries MythTV depends on ; the VDPAU/OpenGL patches add a new set of dependencies: OpenGL and libvdpau. You also need to use the following configure option:
--enable-opengl-video --enable-vdpau
Q: After I installed your patches, my backend or mythcommflag crashes
A: Contrary to what some bad mouthing people love saying, the VDPAU patches do not modify in any ways anything related to mythbackend. It does modify some parts of ffmpeg, but this code is *never* called by the backend or mythcommflag. It is most certainly a local or compilation issue. If you do experience an issue, I’d like to hear about it. Please send me a gdb backtrace (if you don’t know how to, check this page)
Q: It’s all too complicated, can’t I get it more easily?
A: Packages for many popular distributions have been created with my patches in.
I can only vouched for the Ubuntu one obviously:
Ubuntu: I maintain one myself, instructions here
RedHat (Fedora/CentOS/MythDora): Use the ATrpms repository and the “mythtv-bijou” packages
Gentoo: An overlay is available there or this one with instructions
(if you know of pre-built packages for other distributions, please ; let me know)
Q: I still can’t get it to work, can you help?
A: I always do my best to provide the maximum of information possible. Make sure the issue you’re seeing is something related to any of my patches. Remove them all and try again. If you’re still experiencing issue without any of my patches installed, try the MythTV distribution list to get help on how to configure and run mythtv.
Do not bother this list with questions related to any of my patches.