Kodi Community Forum
XBMC for Linux VDPAU - NVIDIA GPU video decoding support (now in the mainline SVN) - Printable Version

+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Kodi General Help and Support (/forumdisplay.php?fid=111)
+---- Forum: Linux and Live support (/forumdisplay.php?fid=52)
+---- Thread: XBMC for Linux VDPAU - NVIDIA GPU video decoding support (now in the mainline SVN) (/showthread.php?tid=45525)



- beefke - 2009-02-17 00:06

solved in svn 17768, so forget my previous post


- cquilliam - 2009-02-17 01:49

Are there any other pre-req's for this? I installed all libraries listed for compiling on linux, and i have my nvidia drivers at 180.29

Here's the failing part:

Quote:<snip>

g++ -MD -c -g -D_DEBUG -Wall -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/hal -DHAS_PULSEAUDIO -D_LINUX -D_FILE_DEFINED -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DINSTALL_PATH="\"/usr/local/share/xbmc\"" -DHAS_SDL_JOYSTICK -DHAS_XRANDR -DHAS_PCRE -D'SVN_REV="17778"' -DDLL_PATH_LIBCURL="\"/usr/lib64/libcurl.so\"" -I. -I../ -Iffmpeg -I../linux -I../../guilib -I../utils -Idvdplayer PlayerCoreFactory.cpp -o PlayerCoreFactory.o
In file included from ../xbmc/cores/VideoRenderers/LinuxRendererGL.h:16,
from ../xbmc/cores/VideoRenderers/RenderManager.h:25,
from GUIVideoControl.cpp:27:
../xbmc/cores/VideoRenderers/../ffmpeg/vdpau.h:67: error: ‘VdpVideoSurface’ does not name a type
../xbmc/cores/VideoRenderers/../ffmpeg/vdpau.h:73: error: ‘VdpPictureInfoH264’ does not name a type
../xbmc/cores/VideoRenderers/../ffmpeg/vdpau.h:74: error: ‘VdpPictureInfoMPEG1Or2’ does not name a type
../xbmc/cores/VideoRenderers/../ffmpeg/vdpau.h:75: error: ‘VdpPictureInfoVC1’ does not name a type
../xbmc/cores/VideoRenderers/../ffmpeg/vdpau.h:81: error: ISO C++ forbids declaration of ‘VdpBitstreamBuffer’ with no type
../xbmc/cores/VideoRenderers/../ffmpeg/vdpau.h:81: error: expected ‘;’ before ‘*’ token
g++ -MD -c -g -D_DEBUG -Wall -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/hal -DHAS_PULSEAUDIO -D_LINUX -D_FILE_DEFINED -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DINSTALL_PATH="\"/usr/local/share/xbmc\"" -DHAS_SDL_JOYSTICK -DHAS_XRANDR -DHAS_PCRE -D'SVN_REV="17778"' -DDLL_PATH_LIBCURL="\"/usr/lib64/libcurl.so\"" -I. -I../../ -I../../linux -I../../../guilib -I../../utils -I../dvdplayer -I.. AudioRendererFactory.cpp -o AudioRendererFactory.o
In file included from ../cores/VideoRenderers/LinuxRendererGL.h:16,
from ../cores/VideoRenderers/RenderManager.h:25,
from dvdplayer/DVDPlayerVideo.h:31,
from dvdplayer/DVDPlayer.h:32,
from PlayerCoreFactory.cpp:25:
../cores/VideoRenderers/../ffmpeg/vdpau.h:47:25: error: vdpau/vdpau.h: No such file or directory
../cores/VideoRenderers/../ffmpeg/vdpau.h:48:29: error: vdpau/vdpau_x11.h: No such file or directory
g++ -MD -c -g -D_DEBUG -Wall -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/hal -DHAS_PULSEAUDIO -D_LINUX -D_FILE_DEFINED -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DINSTALL_PATH="\"/usr/local/share/xbmc\"" -DHAS_SDL_JOYSTICK -DHAS_XRANDR -DHAS_PCRE -D'SVN_REV="17778"' -DDLL_PATH_LIBCURL="\"/usr/lib64/libcurl.so\"" -I. -I../ -I../linux -I../../guilib CDDAReader.cpp -o CDDAReader.o
make[1]: *** [GUIVideoControl.o] Error 1
make[1]: Leaving directory `/home/corey/Applications/xbmc-vdpau/XBMC/guilib'
make: *** [guilib] Error 2
make: *** Waiting for unfinished jobs....
g++ -MD -c -g -D_DEBUG -Wall -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/hal -DHAS_PULSEAUDIO -D_LINUX -D_FILE_DEFINED -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DINSTALL_PATH="\"/usr/local/share/xbmc\"" -DHAS_SDL_JOYSTICK -DHAS_XRANDR -DHAS_PCRE -D'SVN_REV="17778"' -DDLL_PATH_LIBCURL="\"/usr/lib64/libcurl.so\"" -I. -I../ -I../linux -I../../guilib Encoder.cpp -o Encoder.o
In file included from cores/VideoRenderers/LinuxRendererGL.h:16,
from cores/VideoRenderers/RenderManager.h:25,
from Application.cpp:89:
cores/VideoRenderers/../ffmpeg/vdpau.h:67: error: ‘VdpVideoSurface’ does not name a type
cores/VideoRenderers/../ffmpeg/vdpau.h:73: error: ‘VdpPictureInfoH264’ does not name a type
cores/VideoRenderers/../ffmpeg/vdpau.h:74: error: ‘VdpPictureInfoMPEG1Or2’ does not name a type
cores/VideoRenderers/../ffmpeg/vdpau.h:75: error: ‘VdpPictureInfoVC1’ does not name a type
cores/VideoRenderers/../ffmpeg/vdpau.h:81: error: ISO C++ forbids declaration of ‘VdpBitstreamBuffer’ with no type
cores/VideoRenderers/../ffmpeg/vdpau.h:81: error: expected ‘;’ before ‘*’ token
In file included from ../cores/VideoRenderers/LinuxRendererGL.h:16,
from ../cores/VideoRenderers/RenderManager.h:25,
from dvdplayer/DVDPlayerVideo.h:31,
from dvdplayer/DVDPlayer.h:32,
from PlayerCoreFactory.cpp:25:
../cores/VideoRenderers/../ffmpeg/vdpau.h:67: error: ‘VdpVideoSurface’ does not name a type
../cores/VideoRenderers/../ffmpeg/vdpau.h:73: error: ‘VdpPictureInfoH264’ does not name a type
../cores/VideoRenderers/../ffmpeg/vdpau.h:74: error: ‘VdpPictureInfoMPEG1Or2’ does not name a type
../cores/VideoRenderers/../ffmpeg/vdpau.h:75: error: ‘VdpPictureInfoVC1’ does not name a type
../cores/VideoRenderers/../ffmpeg/vdpau.h:81: error: ISO C++ forbids declaration of ‘VdpBitstreamBuffer’ with no type
../cores/VideoRenderers/../ffmpeg/vdpau.h:81: error: expected ‘;’ before ‘*’ token
g++ -MD -c -g -D_DEBUG -Wall -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/hal -DHAS_PULSEAUDIO -D_LINUX -D_FILE_DEFINED -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DINSTALL_PATH="\"/usr/local/share/xbmc\"" -DHAS_SDL_JOYSTICK -DHAS_XRANDR -DHAS_PCRE -D'SVN_REV="17778"' -DDLL_PATH_LIBCURL="\"/usr/lib64/libcurl.so\"" -I. -I../../ -I../../linux -I../../../guilib -I../../utils -I../dvdplayer -I.. ALSADirectSound.cpp -o ALSADirectSound.o
make[1]: *** [PlayerCoreFactory.o] Error 1
<snip>

Sorry for the length. Theres more than this, but this is all i could fit in a post.


- motd2k - 2009-02-17 02:49

PHP Code:
../cores/VideoRenderers/../ffmpeg/vdpau.h:47:25errorvdpau/vdpau.hNo such file or directory 
../cores/VideoRenderers/../ffmpeg/vdpau.h:48:29errorvdpau/vdpau_x11.hNo such file or directory 

the compiler cant see your vdpau headers. How did you install 180.29? does the /usr/include/vdpau folder exist?


- cquilliam - 2009-02-17 03:12

motd2k Wrote:
PHP Code:
../cores/VideoRenderers/../ffmpeg/vdpau.h:47:25errorvdpau/vdpau.hNo such file or directory 
../cores/VideoRenderers/../ffmpeg/vdpau.h:48:29errorvdpau/vdpau_x11.hNo such file or directory 

the compiler cant see your vdpau headers. How did you install 180.29? does the /usr/include/vdpau folder exist?

I'm not sure if its like this in intrepid, but I just realized that Jaunty has nvidia-180-libvdpau and nvidia-180-libvdpau-dev packages. I didn't have the -dev package installed. So, I installed it and that did the trick.


Update: Compiled fine, but when playing an mkv file, just audio, no video. Downloaded and compiled mplayer with vdpau patch to test, and that works fine.

Further Update: Wiped the source tree out and re-started from scratch, works great now. Watched my CPU usage, and didn't move at all when going to play the video. Looks great. Only one small issue, when I press "Play" on my MCE remote, which would normally bring up cpu usage and stuff on screen, seg faults XBMC. Oh well.


- BLKMGK - 2009-02-17 06:03

Interested in doing this. However EnvyNG for 8.10 appears not updated in ages. The NVIDIA install instructions appear somewhat dire to include killing X\removing piles of files and the repo for 8.10 looks like it has 180 vs 180.29.

So, what are folks doing to get the latest NVIDIA drivers onboard smoothly? From the looks of the TRAC these changes are moving into mainstream code and I'd love to play with them on my machine!


- jayboi - 2009-02-17 06:49

BLKMGK Wrote:Interested in doing this. However EnvyNG for 8.10 appears not updated in ages. The NVIDIA install instructions appear somewhat dire to include killing X\removing piles of files and the repo for 8.10 looks like it has 180 vs 180.29.

So, what are folks doing to get the latest NVIDIA drivers onboard smoothly? From the looks of the TRAC these changes are moving into mainstream code and I'd love to play with them on my machine!

In my case, I'm running jaunty, so the version in the repos is 180.29. When I was using intrepid, I just ran the vanilla nvidia installer and that was ok. I've been running jaunty on my main htpc for a couple months and it's stable enough for me. Last week I upgraded my server/htpc for the office and bedroom (multi-seat X) and it's been smooth sailing.


- olympia - 2009-02-17 07:16

BLKMGK Wrote:So, what are folks doing to get the latest NVIDIA drivers onboard smoothly?

http://wiki.xbmc.org/?title=HOW-TO:_Install_XBMC_for_Linux_on_Ubuntu_8.10_%28Intrepid%29_step-by-step#Update_Video_driver


- rodalpho - 2009-02-17 07:37

Actually, no. Those instructions are wildly inadequate. Steps are:

1) deactivate ubuntu's version of the proprietary nvidia 170.x drivers under system|administration|hardware drivers
2) sudo nvidia-uninstall (This step can possibly be skipped; I needed it as I skipped step 1 my first try. Step1 is definitely mandatory.)
3) from a shell prompt (ssh into your box or go to a VT from the console via ctrl-alt-F2), run
sudo /etc/init.d/gdm stop
to kill X
4) from that same shell prompt,
sudo sh nvidiawhatever.run
to install the new drivers
5) sudo shutdown -r now
to reboot

(feel free to put this in the wiki, if you want)


- theuni - 2009-02-17 07:57

why reboot?

Just modprobe -r nvidia then modprobe nvidia.

This isn't windows you know... Wink

TheUni


- natethomas - 2009-02-17 09:10

The past two posts are the reason I believe I will never be able to conquer my fear of linux long enough to get something like this to work.

A) What is "nvidiawhatever.run"?

B) what does "modprobe" mean?


- olympia - 2009-02-17 09:26

natethomas Wrote:The past two posts are the reason I believe I will never be able to conquer my fear of linux long enough to get something like this to work.

A) What is "nvidiawhatever.run"?

B) what does "modprobe" mean?

If you click on the link in the 3. post upper, you will see how to download the driver directly from nvidia.

A) nvidiawhatever is the exact file name, including the version number, you also can see the exact command in the link.

b) modprobe is a command (application)


- dafart - 2009-02-17 11:27

Compiler is crashing with this error:
Code:
DVDVideoCodecFFmpegVDPAU.cpp: In member function ‘int CDVDVideoCodecVDPAU::configVDPAU(uint32_t, uint32_t, uint32_t)’:
DVDVideoCodecFFmpegVDPAU.cpp:422: error: invalid conversion from ‘uint32_t’ to ‘VdpDecoder*’
DVDVideoCodecFFmpegVDPAU.cpp:422: error: too many arguments to function
DVDVideoCodecFFmpegVDPAU.cpp:427: warning: comparison between signed and unsigned integer expressions
DVDVideoCodecFFmpegVDPAU.cpp:440: warning: comparison between signed and unsigned integer expressions
DVDVideoCodecFFmpegVDPAU.cpp: In member function ‘void CDVDVideoCodecVDPAU::spewHardwareAvailable()’:
DVDVideoCodecFFmpegVDPAU.cpp:522: warning: comparison between signed and unsigned integer expressions
DVDVideoCodecFFmpegVDPAU.cpp: In static member function ‘static vdpau_render_state* CDVDVideoCodecVDPAU::VDPAUFindFreeSurface()’:
DVDVideoCodecFFmpegVDPAU.cpp:553: warning: comparison between signed and unsigned integer expressions
make[3]: *** [DVDVideoCodecFFmpegVDPAU.o] Error 1
make[3]: Leaving directory `/home/dafart/Desktop/xbmc-vdpau/XBMC/xbmc/cores/dvdplayer/DVDCodecs/Video'
make[2]: *** [Video] Error 2
make[2]: Leaving directory `/home/dafart/Desktop/xbmc-vdpau/XBMC/xbmc/cores/dvdplayer/DVDCodecs'
make[1]: *** [DVDCodecs] Error 2
make[1]: Leaving directory `/home/dafart/Desktop/xbmc-vdpau/XBMC/xbmc/cores/dvdplayer'
make: *** [dvdplayer] Error 2
Using nvidia 180.29 on ubuntu 8.10
Should I compile ffmpeg separately?

My card is a 9500GT btw
Code:
./vdpinfo
display: :0.0   screen: 0
API version: 0
Information string: Unknown

Video surface:

name   width height types
-------------------------------------------
420     4096  4096  NV12 YV12
422     4096  4096  UYVY YUYV

Decoder capabilities:

name          level macbs width height
------------------------------------
MPEG1             0  8192  2048  2048
MPEG2_SIMPLE      3  8192  2048  2048
MPEG2_MAIN        3  8192  2048  2048
H264_MAIN        41  8192  2048  2048
H264_HIGH        41  8192  2048  2048

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8          8192  8192    y  Y8U8V8A8 V8U8Y8A8
R10G10B10A2       8192  8192    y  Y8U8V8A8 V8U8Y8A8

Bitmap surface:

name              width height
------------------------------
B8G8R8A8          8192  8192
R8G8B8A8          8192  8192
R10G10B10A2       8192  8192
B10G10R10A2       8192  8192
A8                8192  8192

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             y
DEINTERLACE_TEMPORAL_SPATIAL     y
INVERSE_TELECINE                 y
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         y

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y         1     4096
VIDEO_SURFACE_HEIGHT             y         1     4096
CHROMA_TYPE                      y  
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y  
CSC_MATRIX                       y  
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y  
LUMA_KEY_MAX_LUMA                y

Not sure why it doesn give me VC-1 decoding as the card is supposed to support this.
http://global.msi.eu/index.php?func=proddesc&maincat_no=130&cat2_no=136&prod_no=1532

As always, thumbs up for this great project!


720p ok, 1080p: audio but no image - j0bro - 2009-02-17 11:47

Compiled r17752 yesterday due to broken code in the later commits and successfully played some 720p content. The CPU (E8400) was at 2-3% per core all the way, also at higher bitrates (15-20 Mbit/s).

However, when playing 1080p content, I saw no image but a garbled desktop from underneath XBMC. OSD popups display fine, audio plays fine but no video. I connect my htpc to my flat TV via HDMI only (video+audio), latest NVIDIA driver (180.29) and the screen resolution is set to 1080i@50Hz, which is the only resolution which my TV can display natively (1:1 pixel mapping).

The standard SVN builds of XBMC (no VDPAU) work just fine for all content. Anyone experiencing the same?


- olympia - 2009-02-17 11:56

j0bro Wrote:Compiled r17752 yesterday due to broken code in the later commits and successfully played some 720p content. The CPU (E8400) was at 2-3% per core all the way, also at higher bitrates (15-20 Mbit/s).

However, when playing 1080p content, I saw no image but a garbled desktop from underneath XBMC. OSD popups display fine, audio plays fine but no video. I connect my htpc to my flat TV via HDMI only (video+audio), latest NVIDIA driver (180.29) and the screen resolution is set to 1080i@50Hz, which is the only resolution which my TV can display natively (1:1 pixel mapping).

The standard SVN builds of XBMC (no VDPAU) work just fine for all content. Anyone experiencing the same?

I am experiencing very similar issues with 1080p on r17786 as the following:

With auto refresh rate enabled: exactly the same experience with all x264 mkv

With auto refresh disabled: Some x264 mkv is working, but some is not (including killa sample), in this case I have the same experience again (collapsed/ garbled picture, while audio and OSD is OK)


- j0bro - 2009-02-17 12:15

Interesting, that means that either 1080p mkv files have different properties that are not handled well by the current implementation VDPAU, or the higher amount of data is the culprit.

@motd2k: Could there be something like a buffer overflow while doing the off-screen rendering in the backbuffer when playing 1080p content?

@Olympia: What are your desktop resolution settings (especially regarding interlacing and refresh rate)?