What's the best way to offload video decoding to the GPU
Have any of you examined which combinarion of nVidia drivers and internet browsers results in the lowest cpu usage while watching 4k video from say youtube? If so I'm interisted in what you found.
About this post
- Posted
- Archived
- Score
- 56 · 100% up
- Kind
- Text
- ID
- e61peg
35 comments
Deleted before we saved it.
Is this project still active? I see the native client hasn't been updated in two years.
Deleted before we saved it.
There is also this:
https://addons.mozilla.org/en-US/firefox/addon/vlc-4-youtube-beta-4-firefox/?src=search
VLC has both VAAPI and VDPAU support (even has NVDECODE as a bonus), so this will use your GPU to decode the video instead :)
Can you watch Netflix in full hd with that combination? I never got it to work
No, this works by running the youtube video via mpv and youtube-dl
Meaning you can basically give it everything that works with youtube-dl, which isn't Netflix
I've used this browser add-on for 1080p Netflix on Linux in the past. Apparently it stops working from time to time but you might wanna give it a shot. I've mostly moved to other devices for Netflix but for other reasons.
Edit: obviously this has nothing to do with gpu rendering, but I wasn't sure what was meant by 'never got it to work' ;)
Deleted before we saved it.
mpvwithyoutube-dl(just give mpv the youtube link) is an easy way of watching videos with hardware decoding. Though obviously you lose the benefits of being in the browser like autoplay etc. Still you could use the browser to actually browse you video site of choice, and then set up a keybinding through your window manager that launchesmpvwitb the link from the primary selection. That way you dont even have to copy anything, its like 3 button presses and youre done.chromium vaapi
or you can be lazy like me chromium vaapi bin. make sure you follow the instructions and ignore the gpu blacklist and install the nvidia vaapi stuff. but its all there step by step in the wiki
Yeah but what else I am going to use my eight core for :P
This worked really well on my netbook with Celeron N4000. 4k video playback is smooth as silk, although it still sips quite a bit of power, compared to Windows 10. On Ubuntu Mate + Chromium VAAPI build i get about 5,5 hours of YT playback, Chrome + Win10 gives me over 8 hours. Not a biggie though.
yeah it is awesome but i really prefer firefox and i have to build it periodically which takes like 3x more time than the kernel
Thank you all for your kind suggestions I recently switched to chromium-vaapi and made sure all the chromium hardware acelation settings were on but didn't notice any difference in the amount of cpu used. 6th gen core i3 with nvidia 1050 proprietary drivers for those that were wondering. Firefox with mpv looks promising so I'll try it next
Did you make sure to go into "chrome://flags" and turn on the Ignore GPU Blacklist Option? I've also found that Firefox and turning on the "layers.acceleration.force-enabled" option in "about:config" usually does the trick for me as well, if you don't want to use a Chromium based browser.
Sure did, no change.
Remember if you're using a mesa driver to also install
libva-mesa-driverandmesa-vdpau.If you're using the proprietary nvidia driver you shouldn't need anything else other than browser support.
I have Intel Integrated graphics, I followed this https://wiki.archlinux.org/index.php/Hardware_video_acceleration to make vaapi work in my PC.
Then I followed this https://wiki.archlinux.org/index.php/Chromium#Hardware_video_acceleration to build chromium to use vaapi and to force hardware decoding.
Hardware decoding is buggy but it do release some stress from CPU
https://mpv.io/manual/stable/#video
Also in KDE you can use Klipper actions to open videos straight from the buffer with regexp like this -
^http.+(vi[dm]eo|youtu|\btv\b)andmpv %scommand. It'll work with any browser.Where did you read that it should be avoided? Seems counterintuitive.
I believe that was written many years ago. When hardware drivers were buggy. Or glitches in hardware or drivers locked up system or smth like that.
Nowadays hardware decoding works pretty good. I'm using it everywhere for many years - Windows or Linux, both with mpv.
From the same link:
For most users, VDPAU or VA-API are fine. Interlaced video is very rare in 2019.
most TV is still interlaced