Video encoding on RX580 via VDPAU or VAAPI?

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
shanedav4
Posts: 4
Joined: Sun Nov 24, 2019 11:09 pm

Video encoding on RX580 via VDPAU or VAAPI?

Post by shanedav4 » Sun Nov 24, 2019 11:37 pm

I have been hunting and hunting for a way to encode video using my Radeon RX 580 in Linux for months using HandBrake. I have verified that VDPAU and VAAPI are installed and working on my Arch install. Handbrake is refusing to see that they are installed for the fact that it is not giving them as an option under the video tab. I have verified that I can use the GPU to encode by using FFmpeg, however it is a major pain that I don't care to deal with every time.

I have used both the Handbrake from the official Arch repo and I have also compile directly from source from HandBrake's git hub.

Is there a variable that needs to be changed to let Handbrake use VDPAU or VAAPI? Or am I just out of luck and still have to use Windoz?

Before anyone comments about video quality. I understand there maybe quality differences between CPU encoded and GPU encoded, but to me there is little difference so it is not a concern.

Code: Select all

[18:08:43] gtkgui: HandBrake 20191122222149-8de6f15-master (2019112401) - Linux x86_64 - https://handbrake.fr
Cannot load libnvidia-encode.so.1
[18:08:43] hb_init: starting libhb thread
[18:08:43] hb_init: starting libhb thread
[18:08:43] hb_init: starting libhb thread


Woodstock
Veteran User
Posts: 3290
Joined: Tue Aug 27, 2013 6:39 am

Re: Video encoding on RX580 via VDPAU or VAAPI?

Post by Woodstock » Mon Nov 25, 2019 1:47 am

Handbrake does not use the GPU for any encoding. You need to have actual video encoding hardware (QSV, Nvenc, VCE) to use hardware acceleration, and supported video drivers.

Woodstock
Veteran User
Posts: 3290
Joined: Tue Aug 27, 2013 6:39 am

Re: Video encoding on RX580 via VDPAU or VAAPI?

Post by Woodstock » Mon Nov 25, 2019 1:51 am

You probably should read through this: https://github.com/HandBrake/HandBrake/issues/2408

shanedav4
Posts: 4
Joined: Sun Nov 24, 2019 11:09 pm

Re: Video encoding on RX580 via VDPAU or VAAPI?

Post by shanedav4 » Mon Nov 25, 2019 2:03 am

Woodstock wrote:
Mon Nov 25, 2019 1:47 am
Handbrake does not use the GPU for any encoding. You need to have actual video encoding hardware (QSV, Nvenc, VCE) to use hardware acceleration, and supported video drivers.
Ok... I think it is evident that I do have the actual encoding hardware as the Radeon RX 580 has it.

I don't think you fully read my post because the more I think about it the more this doesn't make sense. My understanding is that VDPAU and VAAPI are part of VCE so my question still stands. Why is Handbrake not giving the option of using VCE (VDPAU, VAAPI) if I have all components installed?

shanedav4
Posts: 4
Joined: Sun Nov 24, 2019 11:09 pm

Re: Video encoding on RX580 via VDPAU or VAAPI?

Post by shanedav4 » Mon Nov 25, 2019 2:13 am

Woodstock wrote:
Mon Nov 25, 2019 1:51 am
You probably should read through this: https://github.com/HandBrake/HandBrake/issues/2408

Thank You so much. This information is extremely helpful. It gives me a good path to start down. Again Thank You.

Woodstock
Veteran User
Posts: 3290
Joined: Tue Aug 27, 2013 6:39 am

Re: Video encoding on RX580 via VDPAU or VAAPI?

Post by Woodstock » Mon Nov 25, 2019 2:44 am

Video Acceleration API (VAAPI) is supposed to be hardware independent, but that means it requires driver support to map the API to whatever the backend hardware is. But it seems to mostly be used for Intel hardware.

Video Decode and Presentation API for Unix (VDPAU) is the "We don't want to use Intel's cross-platform wrapper when we can write our own" API for AMD and nVidia.

I believe that handbrake talks more directly to the APIs in each device's drivers, rather than fighting through the cross-platform APIs that are less capable.

shanedav4
Posts: 4
Joined: Sun Nov 24, 2019 11:09 pm

Re: Video encoding on RX580 via VDPAU or VAAPI?

Post by shanedav4 » Mon Nov 25, 2019 3:26 am

Thanks Woodstock for pointing me in the right direction. I was finally able to get VCE working by installing the proprietary AMD drivers and than recompiling HandBrake with the '--enable-vce' parameter. I am now able to Encode h.264 with AMD VCE. Wish there was an option for h.265 but h.264 will do for now.

Post Reply