How to use AMD AMF GPU acceleration for H.265 encoding on ZoneMinder for Ubuntu 22.04?

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
rajhlinux
Posts: 1
Joined: Mon Jul 04, 2022 3:00 am

How to use AMD AMF GPU acceleration for H.265 encoding on ZoneMinder for Ubuntu 22.04?

Post by rajhlinux »

Hello, I have Ubuntu 22.04 and would like to know how I can setup ZoneMinder to do GPU AMD AMF hardware acceleration for encoding in H.265 / H.264.

I tried doing it in the past and it is super complicated, I need to install tons of drivers and set so many parameters.

Are there any easy to follow guides that shows us how to do this for Ubuntu?

I have AMD Radeon RX 580 and also AMD Radeon Pro WX2100.

Note: VAAPI also does not work on Ubuntu.

Thanks.
Ralphred
Posts: 32
Joined: Fri Jul 08, 2022 12:23 pm

Re: How to use AMD AMF GPU acceleration for H.265 encoding on ZoneMinder for Ubuntu 22.04?

Post by Ralphred »

rajhlinux wrote: Mon Jul 04, 2022 3:10 amNote: VAAPI also does not work on Ubuntu.
Do you mean you don't have the right bits installed, like mesa with radeonsi & vaapi support, or ffmpeg is known to "just not work" with vaapi hardware encoders in ubuntu?

Edit: I've a couple of spare machines upstairs, what I don't have is a spare polaris or later card to throw in one and make it work, but initial tests using a VM show ffmpeg and mesa to be "complete"

Code: Select all

root@kubuntu:~# ffmpeg -hide_banner -encoders |awk '/VAAPI/&&/26[45]/{print}'
 V....D h264_vaapi           H.264/AVC (VAAPI) (codec h264)
 V....D hevc_vaapi           H.265/HEVC (VAAPI) (codec hevc)
root@kubuntu:~# ffmpeg -hide_banner -init_hw_device list
Supported hardware device types:
vdpau
cuda
vaapi
qsv
drm
opencl

root@kubuntu:~# locate radeonsi_drv_video.so
/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
What does your system return if you install and run vainfo?
Post Reply