alamminsalo / orion

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

[feature] libmpv hwdec override #123

Open rakslice opened 7 years ago

rakslice commented 7 years ago

Testing on Linux with libmpv, both of my intel graphics systems (one of which is a braswell chromebook running ubuntu xenial under crouton) perform better with hwdec set to vaapi than whatever auto is choosing. Would it make sense to have a setting or a command line option to choose a specific hwdec value when using mpv?

XenonPK commented 7 years ago

I think it would be nice to be able to pass an mpv config file in case the user wants to change/override stuff. It allows for more versatility while requiring only one command line option.

When I was looking into libmpv's documentation I remember seeing something about loading a config file. This would allow the user to configure the player at will, just as one would do with mpv.

Something like:

orion --libmpv-config=~/.local/orion/mpv.conf

ahjolinna commented 7 years ago

I think auto hwdec is fine by default, but some command line option would be fine for testing... why? as the whole hwdec support is a mess: Intel only has VAAPI, Nvidia did use vdpau but now they have moved to CUVID which is crossplatform and uses CUDA which MPV supports....I think AMD still uses VDPAU that was nvidia's tech that they wont even develop anymore....so I dont know what will happen to vdpau or AMD ...okay there is something called OVD (Open Video Decode): Another API from AMD Graphics, designed to be a platform agnostic method for software developers to leverage the Universal Video Decode (UVD) hardware inside AMD Radeon graphics cards. ...it seems that its only for Windows and Linux but no MAC...I dont think MPV even supports it


more about cuvid from MPV pov

ahjolinna commented 7 years ago

also VAAPI is an horrible API that I dont like to use ...yes I know that there is libvdpau-va-gl for intel user to get vdpau in theory working ...but its a nasty hack...and now when Nvidia moved away from vdpau ovaer a year ago and AMD hasnt picked up the development...and nobody I know really supports AMD's OVD api...not even gstreamer does...I really don't know what will happen for AMD users.

and about CUVID...well not every distro does support it as it needs CUDA*...and somewhat new ffmpeg...and VDPAU support started to die in the middle of GTX 900 series ... so if you have a 900 series a newer u need CUVID.

*for example on openSUSE and fedora its really hard to get CUDA...you have to at least on openSUSE compile it yourself...or even proprietary drivers...which are necessary for nvidia users...sigh..yes fedora has become little bit better on this but its still a nightmare.. why? because many who decided on these thing have an some agenda or/and don't know anything on the subject ..at least broadly enough...

sorry about the rant

ahjolinna commented 7 years ago

hmmm... really no follow up? that's maybe little embarrassing...well again, sorry about the rant.. anyway biggest problem is what will AMD/radeon users have soon after Nvidia killed vdpau...but this is really not a Orion problem its more of a (ffmpeg/mpv/gstreamer) backend problem...and radeon has only marginal market on linux (~20%)....so I doubt there will be any quick solution because of this and AMD is really slow with everything anyway, because they lack money/resources and have no real interest in Linux

loathingKernel commented 6 years ago

In my (unverified) experience, using hwdec in mpv is worse for unreliable sources such as streams than software decoding. I do not have any concrete data to support my claims, just behavior observations, but it seems to me that hardware decoding puts more strain to the system as a whole when streams are lagging behind. At the very least, a settings switch to disable hwdec would remedy the situation pretty nicely.

mrgreywater commented 5 years ago

Hardware acceleration can be switched since #246, release 1.6.6