Updated:
The newest AMD Drivers for Ubuntu 22.4.3 seem to work pretty much out of the box
wget https://repo.radeon.com/amdgpu-install/23.30.2/ubuntu/jammy/amdgpu-install_5.7.50702-1_all.deb
sudo dpkg -i amdgpu-install_5.7.50702-1_all.deb
amdgpu-install --usecase=workstation,amf,graphics -y --vulkan=pro --opencl=rocr
sudo adduser $(id -u -n) video && sudo adduser $(id -u -n) render
***** OLD POST*****
Finally got AMD HW Transcode to work on Ubuntu 22.4.2
amf
[Parsed_color_0 @ 0x32f04c0] size:640x480 rate:25/1 duration:-1.000000 sar:1/1
Input #0, lavfi, from 'color=black:640x480':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_amf))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0x331ff00] w:640 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1
[h264_amf @ 0x331c180] AMF initialisation succeeded via Vulkan.
Output #0, null, to '/dev/null':
Metadata:
encoder : Lavf59.16.100
Stream #0:0: Video: h264, 1 reference frame, yuv420p(progressive), 640x480 (0x0) [SAR 1:1 DAR 4:3], q=2-31, 400 kb/s, 25 fps, 25 tbn
Metadata:
encoder : Lavc59.18.100 h264_amf
No more output streams to write to, finishing.
frame= 3 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.12 bitrate=N/A speed=0.695x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (color=black:640x480):
Input stream #0:0 (video): 4 packets read (1843200 bytes); 4 frames decoded;
Total: 4 packets (1843200 bytes) demuxed
Output file #0 (/dev/null):
Output stream #0:0 (video): 3 frames encoded; 3 packets muxed (191 bytes);
Total: 3 packets (191 bytes) muxed
What I did (may be a better way but here is how my experimentation made it work)
Purge all previous drivers (or better yet start with a fresh copy of ubuntu)
Some examples of how to purge the drivers
amdgpu-install --uninstall
sudo apt remove --purge *mesa*
sudo apt remove --purge *libva*
Then I installed kernel 6.1.34-060134-generic
Reboot the system and make sure you are booting into the kernel you just installed
After that I got the amdgpu-install from Index of /amdgpu/latest/ubuntu/pool/main/a/amdgpu-install/
wget http://repo.radeon.com/amdgpu-install/23.20/ubuntu/jammy/amdgpu-install_5.7.50700-1_all.deb
sudo dpkg -i amdgpu-install_5.7.50700-1_all.deb
After that you have to manually edit the proprietary source
sudo nano /etc/apt/sources.list.d/amdgpu-proprietary.list
Uncomment the last line
Save it and exit nano
then just run
amdgpu-install --usecase=amf,graphics
After it fully installed I just rescanned in channelsdvr webui and the hardware transcoder became available.
I also have the updates mesa repos enabled (not sure if necessary or not).
Other kernels may work but 6.1.34 was the one i tested.
Not sure if needed but you may also need to add your user to the render and video groups
sudo adduser $(id -u -n) video && sudo adduser $(id -u -n) render