AMF icon indicating copy to clipboard operation
AMF copied to clipboard

[Question]: AMF video encoding in Ubuntu Linux on g4ad AWS EC2 cloud isntances

Open roman380 opened this issue 6 months ago • 3 comments

We are looking into using AMF video encoder with an AWS cloud instance g4ad.xlarge, in a Linux system, specifically Ubuntu Linux, versions 22 and/or 24. It looks like hardware itself, AMD Radeon Pro V520 is rather capable to encode H.264/AVC and H.265/HEVC.

Since we are running into multiple problems (see below), could we possibly clarify the availability of video encoding support on this platform?

AWS cache contains rather old driver amdgpu-pro-20.20-1184451-ubuntu-18.04.tar.xz which comes with AMF 1.4.17, and does not offer video encoding, via Vulkan interface specifically. An attempt to install driver using the amdgpu-install as described in Radeon™ Software for Linux® Installation typically succeeds (including amf use case) but results in unstable operation. One of the immediate symptoms is an immediate failure to use NICE DCV in those instances, even after uninstall using the mentioned script. We believe that the driver installation fails silently in many cases and was causing issues that were not easily detected.

Essentially, our set of questions is around finding a way to consume hardware video encoding on this platform, preferably via Vulkan AMF interface.

  1. Is there any way to get confirmation that this platform (seems rather typical) is being supported, any limitations such as specific Linux versions and/or amdgpu driver version?
  2. If this is believed to be supported, are there any specific limitations related to driver installation, steps https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-amd-driver.html and use of graphics,amf use case?
  3. We assume that AMF and Vulkan is the primary interface for video encoding on this platform, if we are out of this option, is there any other alternative way to consume video encoding capabilities of the hardware, AMF and OpenCL memory interface, for example?

Thanks in advance for the feedback.

roman380 avatar Jun 20 '25 16:06 roman380

AMD AWS team looking into this.

MikhailAMD avatar Jun 23 '25 15:06 MikhailAMD

Sorry for the delay. AWS team has issues configuring DCV inside firewall. They will try to resolve it. AMF + Vulkan should work properly on this instance. They/we verified and installed AMD driver on g4ad instance and tested AMF. All features work ok: encoder, decoder etc. Few installation details:

  1. The "Pro" driver package should be used: https://repo.radeon.com/amdgpu-install/6.2.4/ubuntu/focal/amdgpu-install_6.2.60204-1_all.deb or on driver selection page at amd.com select Graphics->Radeon Pro->W5000->any version. Then Ubuntu 22.04
  2. apt install ./amdgpu-install_6.2.60204-1_all.deb
  3. amdgpu-install --usecase=workstation,amf --vulkan=pro --no-32 -y --accept-eula
  4. reboot
  5. Add current user to render and video groups for headless operations: sudo usermod -a -G render $LOGNAME sudo usermod -a -G video $LOGNAME
  6. logout and login
  7. Verify that encoder and decoder FW is visible: sudo dmesg | grep VCN
  8. Verify Vulkan driver: vulkaninfo | grep driver
  9. Note, this version of AMF works with AMD Vulkan Pro driver. Later versions support the latest RADV.

MikhailAMD avatar Jul 04 '25 16:07 MikhailAMD

Thanks, we'll give this a try!

roman380 avatar Jul 04 '25 19:07 roman380