Compiling and install a custom Handbrake

Hello all,

By the past, packman’s handbrake had QSV support for encoding through libmfx1 but since an update on 07/16/2020, QSV support had been dropped due to core dumps occured for some users. Luckily I haven’t experienced any core dump with QSV enabled on my machines.

I’ve tried compiling handbrake from source but all my attemps miserably failed despite following the documentation.
How can I build and install handbrake from source with QSV on TW (either by hands or via OBS)?

Just grab the src rpm from packman and rebuild (as your user) it will put all the files in ~/rpmbuild, you can then go in and modify the spec file to re-enable the option.

rpmbuild --rebuild <src rpm>
cd ~/rpmbuild/SPECS
{edit spec file}
rpmbuild -ba somefile.spec

You will need to install development packages as per the spec file list…

Or ask on Packman Mailing List for it to be re-enabled…?

Awesome! Thanks malcolmlewis! I wouldn’t believe it was so easy to do it with rpm’s sources. I’ll try later this day and report back.

Well, I thought to do so but if they’ve dropped QSV support they had good reasons to do it mainstream. I wonder what Intel iGPU models/gpu drivers were the culprit.

Here I’m driven by:

inxi -G
Graphics:  Device-1: Intel 3rd Gen Core processor Graphics driver: i915 v: kernel 
           Device-2: Apple FaceTime HD Camera type: USB driver: uvcvideo 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa resolution: 1280x800~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) v: 4.2 Mesa 20.2.3 

Thanks again malcolmlewis handbrake-1.3.3 built with QSV support and works without a problem (no core dumps whatsoever)! :wink:

You might want to report your findings on the Packman Mailing list, I suspect it maybe a kernel issue, likely just need to tweak for a particular release or gpu. Or maybe report upstream?

I don’t believe so because before QSV support was disabled, it was working fine on Leap 15.2 (default kernel 5.3.x). It must be related to how libva/libmfx are handled by the iGPU card related to the host machine like you seems to point out.

I’ve just encoded a bunch of old DVDs with handbrake-1.3.3 and the QSV encoder, all went fine (at least on my MBPs) with no custom tweaks regarding how the card driver/X is used. Will check how it does on a friend’s Dell XPS laptop which is running Leap 15.2

FWIW, I’ve made it available on OBS:

Unfortunately that is a no no on OBS, your using patent encumbered (blacklisted) libraries from a home user repo (could also break other users setups)…

Ref: openSUSE:Build Service application blacklist - openSUSE Wiki

Again, suggest you talk with the packman maintainer, perhaps a special build with it enabled can be crafted.

Thanks for pointing this out :wink:
I’ll remove this from OBS and ask packman’s maintainer if he could make QSV available through like you said a special build.