Kodi Community Forum
[WINDOWS] GPU assisted video decoding in XBMC for Windows via a custom DXVA renderer? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: [WINDOWS] GPU assisted video decoding in XBMC for Windows via a custom DXVA renderer? (/showthread.php?tid=33323)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


- CrashX - 2009-05-15

natethomas Wrote:I have to admit, I also don't understand what "integrated" means. At present, NOTHING is integrated into XBMC for GPU decoding on Windows.

Of course, I don't get the point of Crash's initial link either. One should always preface a link with an explanation for the link.

I posted the link because it is the same topic discussed but has some useful links ..


- Geeba - 2009-05-15

Hmmm... I'm not so sure... Nvidia have gone out of their way from what I read to get the platform "Windows Certified" With emphasis on Vista Certified... Huh

Windows 7 boots extremely quickly I find and I've run it on single core P4 3Ghz 512Mb machines and it outstrips XP without breaking a sweat...


Just realized a bit off topic... apologies


Hardware Accelerated Video Decoding support in XBMC for Windows - stb831 - 2009-05-22

hello,

is there a way to get my nvidia card to render any x.264 content under windows xp or win7? Maybe just new CUDA Drivers?

It works with XBMC Líve and Linux, but i would like the same support for windows, because i cant get the network connection to work.

Sorry for my english, thanks stb831


- Gamester17 - 2009-05-22

No, there is currently no hardware accelerated video decoding support in XBMC for Windows.

Please read the manual, FAQ, and search before posting in the future.


- rcoops - 2009-05-22

From what I can see i this thread there are a few things to note:
  • XBOX is well dead or close to it in regards to video playback capabilities due to it's lack of 1080p playback.
  • Apple TV is a cute spin-off but not really the main focus though for now it is worth keeping it alive.
  • Linux has some GPU acceleration but this is just for Nvidia cards AMD and others are out in the cold.
  • Windows XP, Vista and 7 all have somewhat different ways of working with acceleration of video using DXVA but all of them should have the basic DirectX9.0 options though not ideal there might be some posibilities to get this working.

The main problem with the Windows way of working is the fact that one would need a special build that works just on Windows but would add (some/a lot of) extra code to XBMC that would be useless on the other platforms. On the other hand the Linux acceperation has been added and that seems not to cause to many issues with respect to source bloat for the other platforms.
I would thus suggest to elliminate this as a reason not to bother with DXVA.

The remaining problems are the difficulty of implementing this and having OpenGL ussage at the same time as well and of course the difficulty of working with any Microsoft API when you are not paying them trough the nose for development support (and even then thing are not easy).

The first these two problems could potentially be resolved by moving to DX completely which would make sense on Windows but which would likely mean having to fork XBMC.
The remaining difficulty is how on earth the DX API can be made to offload the video decoding to the GPU. Other open source group(s) seem to have been able to get this working, which means that the information on how to do this is out there. So the XBMC team should/might be able to extract the secrets from the code and or the developers that implemented this in the oter projects.

The main question remaining is if it is worth it splitting XBMC in an attempt to make a Windows version with GPU acceleration for video decoding...
As mentioned before even low end CPU's are powerful enough to do 1080p decoding with windows running so the need to use a GPU for this is getting les and less. Of course for the old P3 and P4 machines that start to sweat when one throws a DVD at them let alone a nice 720p movie these will not be able to playback a 1080p movie. But in all honnesty if an XBOX is not able to do it and people are willing to accept that why should extra efforts be made to have a P3 do this?
Of course if you use less CPU power to do this then you can always do other things with that head room, but lets be honnest how many people are running multiple processor intensive applications in behind their full screen 1080p movie, on a windows box... exactly.

Though GPU based video acceleration would look nice and advanced, looking at the power profile of a GPU compaired to a CPU I would not be surprized to hear that a GPU uses more power when decoding a video stream then a CPU does. So all in all honnesty I would much rather see more sound fixes, improved subtitle handeling, the inclusion of media flags and other misc information in the XBMC database and so on, basically stuff that we can all enjoy rather then expending a huge amount of effort on getting GPU video decoding working under Windows.


- ashlar - 2009-05-22

Even Multicore CPUs have problems decoding VC-1, because FFMPEG is not multithreaded. This is gonna cause problems for a significant percentage of BluRays backups.


- Rrrr - 2009-05-22

I will react on only one element here, because of limited knowledge about decoding.

I support your views on Linux and Windows versions.

The trends that XBMC needs to deal with are

1. media players need to be cheaper and smaller, silent.
One way to achieve this is to bank on the new trend of Atom dual core and similar with integrated graphics and multi channel sound on the motherboard.
I have no opinion if this hardware will be sufficient, but that is beyond this discussion.

XBMC for Linux and Live XBMC support this trend for limited hardware (nVidia). They however only fit those who want an single purpose appliance.

2. there is a significant group of users that want Windows. Undeniable.
They have the same requirements as under 1.
Therefore your conclusion that XBMC for Windows should not bother playing efficiently on less powerful platforms is too strong.
Now take it one step further: assuming 1080p will play on these platforms, XBMC needs to ensure all other handling of menu's, skin, etc are fast enough on these CPU's.

One thought: although again I have no specific computing understanding: following your line of thinking that the GPU is powerful enough, the CPU may be less powerful (or more efficient): there are universities and distributed computing networks using the powers of the GPU. Would this open up a possibility that a lot MORE of heavy key XBMC tasks can be delegated to a GPU?

3. Competition knows how do use acceleration in Windows.
If so, I am convinced XBMC team will know the same. It is a matter of priorities I guess.


- Gamester17 - 2009-05-22

Patches from third-party programmers who have personal interest in this are more than welcomed! Nod
http://wiki.xbmc.org/?title=Appendix_D:_Development_Notes
http://wiki.xbmc.org/?title=Developing_XBMC_for_Windows

...so no need to fork XBMC, instead 'just' code up a DXVA renderer and submit it as a patch for review:
http://wiki.xbmc.org/?title=HOW-TO_submit_a_patch

Rolleyes

Rrrr Wrote:The trends that XBMC needs to deal with are

1. media players need to be cheaper and smaller, silent.
Do you want your money back? All I am saying is that you could be a bit smoother when asking for something for free. Team-XBMC are only made up of a group of individuals who code XBMC for fun as a hobby in their spare time, and since nobody on Team-XBMC gets paid they tend to only code features and functions that they themselves will use. With that said, you have no right to complain unless you actively contribute code yourself, if you do not then you have the right to enjoy this free software as it is, this is both a benefit and a curse to users of non-profit open source software.
http://xbmc.org/about/team/


- Rrrr - 2009-05-22

Gamester17

You misunderstood me here: I was talking about hardware requirements and trends. This has nothing to do with XBMC.

I am a big fan and you dont hear me complaining, just enjoying


- natethomas - 2009-05-22

I feel like this thread keeps rehashing the same discussion over and over again. Let's try to summarize this thing, not in terms of what Team-XBMC needs to do, but in terms of the problems faced.

1. Painting OpenGL graphics over a DXVA accelerated video is VERY difficult, if not impossible. As far as I know, no one knows how to do this in a way that isn't MORE CPU intensive than simply decoding the video with the CPU.

1A. You'll note, the open source competitors that use DXVA are either not OpenGL based or don't paint an overlay on the screen at all.

2. Switching the entirety of XBMC for Windows to a DX10 or DX9 platform is a dead-end request. The coding necessary for such an action would be the equivalent of building an entirely new media center program. If that's your interest, MediaPortal is still in development.

3. Three alternatives to DVXA exist. VDPAU exists, but is Linux only. CUDA exists, but is limited to NVIDIA (I think). OpenCL exists, but is not yet especially available for our coders to seriously look at. With that said, when it becomes available, OpenCL may be the most promising.

4. No one from Team XBMC has ruled out DXVA, CUDA, or OpenCL for Windows because it is bulky, because they are Linux fanboys, or because they don't like Windows users. They've ruled it out because A) there are other priorities, and B) at present they don't know HOW to make any of the three work within the XBMC system.

For all of these reasons, absolutely no one is being facetious when they say, "code is welcome." They seriously mean it. If any noobs out there can figure out how accelerate video using the GPU within the confines of the XBMC system, DO IT! Please! And, if not, either stop complaining, learn how, or add something to the table besides your opinions.


Do not loose hope, nothing is impossible as long as the will is there... - Gamester17 - 2009-05-22

natethomas Wrote:1. Painting OpenGL graphics over a DXVA accelerated video is VERY difficult, if not impossible. As far as I know, no one knows how to do this in a way that isn't MORE CPU intensive than simply decoding the video with the CPU.
I am not a programmer myself but I still think that hooking into the DXVA (DirectX Video Acceleration) API is probably the best method to make this happen. As I understand it alpha blending OpenGL on top of the VDPAU renderer was also VERY difficult, but not impossible, and I do not exactly see how a DXVA renderer on Windows would be any different than VDPAU on Linux in the grand scheme of things.
http://en.wikipedia.org/wiki/DirectX_Video_Acceleration

You do know that VDPAU is basically NVIDIA's attempt at reverse engineering the DXVA API on UNIX, right? Huh
...so yes VDPAU and DXVA is said to share many similarities in both concept and in practice Nod

natethomas Wrote:2. Switching the entirety of XBMC for Windows to a DX10 or DX9 platform is a dead-end request. The coding necessary for such an action would be the equivalent of building an entirely new media center program. If that's your interest, MediaPortal is still in development.
I do not think that is true at all, XBMC for Xbox uses DirectX (DX8), and even before the existence of XBMC for Linux jmarshall partially ported XBMC for Xbox to Windows so that all the GUI was working, and that renderer code is still in the SVN trunk, ...it is no longer maintain but you can find out more it here:
http://forum.xbmc.org/showthread.php?tid=23235

In theory it should be possible to back port that or the parts that needed to the XBMC for Windows we have to today that is built from the linuxport branch.

With that and/or a DirectX renderer for XBMC's video player (DVDPlayer) that supports DXVA (DirectX Video Acceleration) then you have all that you need, ...would still require a lot of work by a C/C++ programmer to make it a work together.

natethomas Wrote:3. Three alternatives to DVXA exist. VDPAU exists, but is Linux only. CUDA exists, but is limited to NVIDIA (I think). OpenCL exists, but is not yet especially available for our coders to seriously look at. With that said, when it becomes available, OpenCL may be the most promising.
Please respect that discussion about those (non-DXVA) methods and other methods are off-topic in this specific thread, there are other threads already open with discussion about those so please do not discuss those here, instead see:
http://wiki.xbmc.org/?title=Hardware_Accelerated_Video_Decoding_Developement
and:
http://forum.xbmc.org/showthread.php?tid=33802
and:
http://forum.xbmc.org/showthread.php?tid=40362
and:
http://forum.xbmc.org/showthread.php?tid=41813
and:
http://forum.xbmc.org/showthread.php?tid=47082

...and also VA API (Video Acceleration API), for which there is no dedicated thread yet.

Again, this thread is only about DXVA (DirectX Video Acceleration) and its API.

Rolleyes


- althekiller - 2009-05-22

You guys seem to be missing the fact that Team XBMC had no real interest in implementing VDPAU at first either. But some user who goes by motd2k did, and submitted patches. At this point all we had to do was black bag, torture and brain wash him until he was one of us. Smile

So if you want HW decoding on Windows, you'll need to find your motd2k (no he isn't interested) equivalent. This person does not exist on Team XBMC at this time. Continually bringing the same old debate to us isn't going to get you anywhere.


- natethomas - 2009-05-22

Gamester17 Wrote:Please respect that discussion about those (non-DXVA) methods and other methods are off-topic in this specific thread, there are other threads already open with discussion about those so please do not discuss those here, instead see:
Again, this thread is only about DXVA (DirectX Video Acceleration) and its API.

Rolleyes

Many apologies, I guess. I was really just trying to sum up this thread in a useful manner, and those topics had been discussed.

Quote:
You do know that VDPAU is basically NVIDIA's attempt at reverse engineering the DXVA API on UNIX, right?
...so yes VDPAU and DXVA is said to share many similarities in both concept and in practice

I did not know that, actually. No one had mentioned it to me before. The way the discussion runs though, it makes sense.

althekiller Wrote:So if you want HW decoding on Windows, you'll need to find your motd2k (no he isn't interested) equivalent. This person does not exist on Team XBMC at this time. Continually bringing the same old debate to us isn't going to get you anywhere.

I believe that was my final point:

natethomas Wrote:For all of these reasons, absolutely no one is being facetious when they say, "code is welcome." They seriously mean it. If any noobs out there can figure out how accelerate video using the GPU within the confines of the XBMC system, DO IT! Please! And, if not, either stop complaining, learn how, or add something to the table besides your opinions.



- althekiller - 2009-05-22

@natethomas: I wasn't directly addressing you, but the thread in general. More agreeing with you and showing the team opinion.


[WINDOWS] Windows 7 comes with H.264 DXVA support, what effect might it have to devs? - ssboisen - 2009-05-22

Windows 7 is comming with build in mpeg 2 and H.264 decoders which are multi-threaded and DXVA accelerated. Could this mean that adding dxva-support for the windows version of xbmc could get really easy? It doesn't support the mkv format but that's not really a problem as long as the decoding itself is.

Does this have a signifficant impact on xbmc?