Using Hardware Accelerated decode/encode for proprietary codecs with AMD open source drivers and mesa

Ever since Manjaro decided to remove support for GPU decoding and encoding of proprietary codecs (avc, h.264,h.265 etc) from their mesa build by erroneously copying fedora instead of following arch, users of AMD hardware have to either use arch’s build of mesa or compile one themselves.

If they wished to compile manjaro’s build but with decoding support, I made a simple script for it. However, since mesa’s PGBUILD keeps on changing, the above script may not work, so I am attaching another one that hopefully works for longer:

#!/bin/bash

cd /tmp/
git clone https://gitlab.manjaro.org/packages/extra/mesa.git
cd /tmp/mesa/
awk '/--libdir=\/\$_libdir/ { print; print "    -D video-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc"; next }1' PKGBUILD > PKGBUILD.tmp && mv PKGBUILD.tmp PKGBUILD
makepkg -si
cd /tmp/
rm -Rf mesa

For context, the PGKBUILD just needs to be modified to just include -D video-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc flag under build()

I prefer to save it as *.sh and alias it. I would be thankful if someone actually made a separate repo (or tell me about the same if one already exists) for distributing the precompiled binaries with hardware decoding and encoding enabled.

There is a repo for this too.

https://nonfree.eu/

1 Like

Thanks

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.