alamminsalo / orion

Cross platform Twitch.tv client
GNU General Public License v3.0
315 stars 60 forks source link

add CUVID/CUDA hardware hardware acceleration for Nvidia #248

Closed ahjolinna closed 5 years ago

ahjolinna commented 5 years ago

Nvidia had deprecated VDPAU years ago in favor of their new CUDA based cuvid (which is crossplatform), so it would be good to have this on orion.

mrgreywater commented 5 years ago

I don't have a nvidia graphics card, but CUDA should be available with both the mpv and qtav backend in orion 1.66.

ahjolinna commented 5 years ago

I have the latest git version and I can only choose between vaapi and vdpau or auto.. no cuvid.

I use mpv backend version on openSUSE.. From my own repo (and yes mpv has cuda/cuvid enabled... As I use it just fine on mpc-qt)

mrgreywater commented 5 years ago

if you want to manually choose it, you can add nvdec-copy and cuda-copy here: https://github.com/alamminsalo/orion/blob/master/src/qml/MpvBackend.qml#L114

auto should already work though, if mpv thinks it's the best option for you, auto might use nvdec/cuda already. Sadly mpv doesn't support sharing those cuda surfaces with opengl, and therefore needs to do a costly copy via system memory.

ahjolinna commented 5 years ago

Also it's vaapi/vdpau -copy and some people have problems with that option.. At least on Linux

I don't remember what the -copy option causes to these people

mrgreywater commented 5 years ago

You can try using the non -copy versions, but afaik mpv doesn't support any of them with the opengl-cb video output or render api. This is an issue with mpv and not with orion. The QtAV player should have a zero copy CUDA renderer which you might use.

ahjolinna commented 5 years ago

I don't care personally about the -copy thing I just remember that it can cause issues with some.... I just wanted to mention that vdpau has been replaced with cuvid (long time ago)

mrgreywater commented 5 years ago

Should be fixed with #252

mrgreywater commented 5 years ago

The PR has been merged, I think this can be closed.