No encode for h.264 and HEVC on RDNA4

I have an AMD Radeon RX 9070 XT and am using Mesa 26.2.3.

From all I could gather, I don’t have VA-API encoding for h.264 and HEVC.

I made sure to follow the instructions for multimedia over on rpmfusion.org, installing additional codecs and the freeworld VA and Vulkan drivers, which I did a while ago and verified recently, but I still have the issue. Is support for encoding those codecs even available for RDNA4 at the time?

I’m on f45 currently but yes they should be there:

vainfo
Trying display: wayland
libva info: VA-API version 1.24.0
libva info: Trying to open /usr/lib64/dri-nonfree/nvidia_drv_video.so
libva info: Trying to open /usr/lib64/dri-freeworld/nvidia_drv_video.so
libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.24 (libva 2.24.0)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain12             : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointVLD
      VAProfileHEVCMain444_10         : VAEntrypointVLD
      VAProfileHEVCMain444_12         : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

ls /usr/lib64/dri/.
apple_dri.so        ili9225_dri.so      mali-dp_dri.so         r300_dri.so            sun4i-drm_dri.so
armada-drm_dri.so   ili9341_dri.so      mcde_dri.so            r600_dri.so            swrast_dri.so
asahi_dri.so        ili9486_dri.so      mediatek_dri.so        r600_drv_video.so      tegra_dri.so
crocus_dri.so       imx-dcss_dri.so     meson_dri.so           radeonsi_dri.so        udl_dri.so
d3d12_dri.so        imx-drm_dri.so      mi0283qt_dri.so        radeonsi_drv_video.so  v3d_dri.so
d3d12_drv_video.so  imx-lcdif_dri.so    msm_dri.so             rcar-du_dri.so         vc4_dri.so
etnaviv_dri.so      ingenic-drm_dri.so  mxsfb-drm_dri.so       repaper_dri.so         virtio_gpu_dri.so
exynos_dri.so       iris_dri.so         nouveau_dri.so         rockchip_dri.so        virtio_gpu_drv_video.so
gm12u320_dri.so     kgsl_dri.so         nouveau_drv_video.so   rzg2l-du_dri.so        vkms_dri.so
hdlcd_dri.so        kirin_dri.so        nvidia_drv_video.so    ssd130x_dri.so         vmwgfx_dri.so
hx8357d_dri.so      kms_swrast_dri.so   panel-mipi-dbi_dri.so  st7586_dri.so          zink_dri.so
i915_dri.so         komeda_dri.so       panfrost_dri.so        st7735r_dri.so         zynqmp-dpsub_dri.so
iHD_drv_video.so    libdril_dri.so      panthor_dri.so         sti_dri.so
ili9163_dri.so      lima_dri.so         pl111_dri.so           stm_dri.so


But we need some info and specs please

inxi -eaxx

You are using an NVIDIA GPU. This affects AMD and possibly only RDNA4.

EDIT: Attaching specs

System:
  Host: alpha-craft-Fedora Kernel: 7.2.7-200.fc44.x86_64 arch: x86_64 bits: 64
    compiler: gcc v: 16.2.1 clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=(hd2,gpt5)/boot/vmlinuz-7.2.7-200.fc44.x86_64
    root=UUID=87c496a8-ca2a-45fb-a20b-e034ec813fc4 ro rhgb quiet
    initcall_blacklist=simpledrm_platform_driver_init
  Desktop: KDE Plasma v: 6.7.5 tk: Qt v: N/A info: frameworks v: 6.30.0
    wm: kwin_wayland with: krunner vt: 2 dm: SDDM Distro: Fedora Linux 44 (KDE
    Plasma Desktop Edition)
Machine:
  Type: Desktop Mobo: Micro-Star model: MAG Z590 TOMAHAWK WIFI (MS-7D08)
    v: 1.0 serial: <superuser required> uuid: <superuser required>
    Firmware: UEFI vendor: American Megatrends LLC. v: 2.A0 date: 07/11/2024
CPU:
  Info: model: 11th Gen Intel Core i9-11900K bits: 64 type: MT MCP
    arch: Rocket Lake gen: core 11 level: v4 note: check built: 2021+
    process: Intel 14nm family: 6 model-id: 0xA7 (167) stepping: 1
    microcode: 0x65
  Topology: cpus: 1x dies: 1 clusters: 8 cores: 8 threads: 16 tpc: 2
    smt: enabled cache: L1: 640 KiB desc: d-8x48 KiB; i-8x32 KiB L2: 4 MiB
    desc: 8x512 KiB L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 5100 min/max: 800/5100:5300 scaling:
    driver: intel_pstate governor: performance cores: 1: 5100 2: 5100 3: 5100
    4: 5100 5: 5100 6: 5100 7: 5100 8: 5100 9: 5100 10: 5100 11: 5100 12: 5100
    13: 5100 14: 5100 15: 5100 16: 5100 bogomips: 112128
  Flags-basic: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: ghostwrite status: Not affected
  Type: indirect_target_selection mitigation: Aligned branch/return thunks
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: old_microcode status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: Enhanced IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS; IBPB:
    conditional; PBRSB-eIBRS: SW sequence; BHI: SW loop, KVM: SW loop
  Type: srbds status: Not affected
  Type: tsa status: Not affected
  Type: tsx_async_abort status: Not affected
  Type: vmscape status: Not affected
Graphics:
  Device-1: Intel RocketLake-S GT1 [UHD Graphics 750] vendor: Micro-Star MSI
    driver: i915 v: kernel alternate: xe arch: Xe process: Intel 10nm
    built: 2020-21 ports: active: none empty: DP-1, HDMI-A-1, HDMI-A-2,
    HDMI-A-3 bus-ID: 00:02.0 chip-ID: 8086:4c8a class-ID: 0380
  Device-2: Advanced Micro Devices [AMD/ATI] Navi 48 [Radeon RX 9070/9070
    XT/9070 GRE] vendor: Sapphire driver: amdgpu v: kernel arch: RDNA-4
    code: Navi-4x process: TSMC n4 (4nm) built: 2025+ pcie: gen: 5
    speed: 32 GT/s lanes: 16 ports: active: HDMI-A-4,HDMI-A-5
    empty: DP-2,DP-3,Writeback-1 bus-ID: 03:00.0 chip-ID: 1002:7550
    class-ID: 0300
  Device-3: ARC Camera driver: snd-usb-audio,uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-10:5 chip-ID: 05a3:9331
    class-ID: 0102 serial: Ucamera001
  Display: wayland server: X.org v: 1.21.1.24 with: Xwayland v: 24.1.13
    compositor: kwin_wayland driver: gpu: amdgpu d-rect: 3840x1080 display-ID: 0
  Monitor-1: HDMI-A-4 pos: primary,left model: Acer SB271 serial: 554150262
    built: 2022 res: mode: 1920x1080 hz: 75 scale: 100% (1) dpi: 82 gamma: 1.2
    size: 598x336mm (23.54x13.23") diag: 686mm (27") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  Monitor-2: HDMI-A-5 pos: right model: Acer SB271 serial: 288861015
    built: 2021 res: mode: 1920x1080 hz: 75 scale: 100% (1) dpi: 82 gamma: 1.2
    size: 598x336mm (23.54x13.23") diag: 686mm (27") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: EGL v: 1.5 hw: drv: intel iris drv: amd radeonsi platforms: device: 0
    drv: radeonsi device: 1 drv: iris device: 2 drv: swrast gbm: drv: radeonsi
    surfaceless: drv: radeonsi wayland: drv: radeonsi x11: drv: radeonsi
  API: OpenGL v: 4.6 vendor: amd mesa v: 26.2.3 glx-v: 1.4
    direct-render: yes renderer: AMD Radeon RX 9070 XT (radeonsi gfx1201 ACO
    DRM 3.64 7.2.7-200.fc44.x86_64) device-ID: 1002:7550 memory: 15.62 GiB
    unified: no display-ID: :0.0
  API: Vulkan v: 1.4.341 layers: 9 device: 0 type: discrete-gpu name: AMD
    Radeon RX 9070 XT (RADV GFX1201) driver: mesa radv v: 26.2.3
    device-ID: 1002:7550 surfaces: N/A device: 1 type: integrated-gpu
    name: Intel Graphics (RKL GT1) driver: mesa intel v: 26.2.3
    device-ID: 8086:4c8a surfaces: N/A device: 2 type: cpu name: llvmpipe
    (LLVM 22.1.8 256 bits) driver: mesa llvmpipe v: 26.2.3 (LLVM 22.1.8)
    device-ID: 10005:0000 surfaces: N/A
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor gpu: amdgpu_top, lact, radeontop
    wl: wayland-info x11: xdriinfo, xdpyinfo, xprop, xrandr
Audio:
  Device-1: Intel 500 Series Family HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel alternate: snd_soc_avs,snd_sof_pci_intel_tgl
    bus-ID: 00:1f.3 chip-ID: 8086:43c8 class-ID: 0403
  Device-2: Advanced Micro Devices [AMD/ATI] Navi 48 HDMI/DP Audio
    driver: snd_hda_intel v: kernel pcie: gen: 5 speed: 32 GT/s lanes: 16
    bus-ID: 03:00.1 chip-ID: 1002:ab40 class-ID: 0403
  Device-3: ARC Camera driver: snd-usb-audio,uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-10:5 chip-ID: 05a3:9331
    class-ID: 0102 serial: Ucamera001
  Device-4: Micro Star USB Audio driver: hid-generic,snd-usb-audio,usbhid
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-5:4
    chip-ID: 0db0:4240 class-ID: 0300
  API: ALSA v: k7.2.7-200.fc44.x86_64 status: kernel-api
    tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 1.6.9 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Ethernet I225-V vendor: Micro-Star MSI driver: igc v: kernel
    pcie: gen: 2 speed: 5 GT/s lanes: 1 port: N/A bus-ID: 07:00.0
    chip-ID: 8086:15f3 class-ID: 0200
  IF: enp7s0 state: up speed: 1000 Mbps duplex: full mac: d8:bb:c1:55:a0:18
  Device-2: Intel Wi-Fi 6E AX210/AX1675 2x2 [Typhoon Peak] driver: iwlwifi
    v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 bus-ID: 08:00.0
    chip-ID: 8086:2725 class-ID: 0280
  IF: wlp8s0 state: down mac: 9a:2c:50:68:54:01
  IF-ID-1: br-728aa8282491 state: down mac: ea:24:ae:ac:be:d6
  IF-ID-2: docker0 state: down mac: 9a:9f:1d:46:5d:ab
  IF-ID-3: tailscale0 state: unknown speed: -1 duplex: full mac: N/A
  Info: services: NetworkManager, smbd, wpa_supplicant
Bluetooth:
  Device-1: Intel AX210 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-14:9 chip-ID: 8087:0032
    class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 0 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: 1C:99:57:B9:A4:55
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff
    link-mode: peripheral accept
Drives:
  Local Storage: total: 6.37 TiB used: 2.84 TiB (44.6%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 990 PRO 4TB
    size: 3.64 TiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: S7DPNF0Y323337K fw-rev: 8B2QJXD7 temp: 43.9 C
    scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:2 vendor: Kingston model: SNVS1000G
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: 50026B7685CC668F fw-rev: S8442105 temp: 41.9 C
    scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DM008-2UB102
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: HDD rpm: 7200 serial: ZFL5YN41 fw-rev: 0001 scheme: GPT
Partition:
  ID-1: / raw-size: 465.88 GiB size: 457.5 GiB (98.20%)
    used: 302.18 GiB (66.1%) fs: ext4 dev: /dev/nvme1n1p5 maj-min: 259:7
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
    used: 48.2 MiB (50.2%) fs: vfat dev: /dev/nvme1n1p1 maj-min: 259:3
Swap:
  Kernel: swappiness: 10 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 8 GiB used: 35.4 MiB (0.4%) priority: 100
    comp: lzo-rle avail: lzo,lz4,lz4hc,zstd,deflate,842 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 40.0 C mobo: N/A gpu: amdgpu temp: 43.0 C
    mem: 66.0 C
  Fan Speeds (rpm): N/A gpu: amdgpu fan: 0
Info:
  Memory: total: 48 GiB note: est. available: 46.84 GiB
    used: 14.52 GiB (31.0%)
  Processes: 547 Power: uptime: 1d 1h 41m states: freeze,mem suspend: deep
    avail: s2idle wakeups: 4 hibernate: disabled image: 18.66 GiB
    services: org_kde_powerdevil, thermald, upowerd Init: systemd v: 259
    default: graphical tool: systemctl
  Packages: pm: dpkg pkgs: 0 pm: rpm pkgs: N/A note: see --rpm
    tools: dnf,yum pm: flatpak pkgs: 113 Compilers: clang: 22.1.8 alt: 19
    gcc: 16.2.1 Shell: Bash v: 5.3.9 running-in: konsole inxi: 3.3.41

I’m very aware of that. :wink:

I’m told still though support is there for RDNA 4 hardware.

Can I see this please:

vainfo

Look for VAProfileH264Main and VAProfileHEVCMain with VAEntrypointEncSlice to confirm encoding support.

Oh yeah, apologies. Also, I am also aware that RDNA4 hardware itself has support for that encoding, but the driver seems to have an issue.

Here’s the output of vainfo.

Trying display: wayland
libva info: VA-API version 1.23.0
libva info: Trying to open /usr/lib64/dri-nonfree/radeonsi_drv_video.so
libva info: Trying to open /usr/lib64/dri-freeworld/radeonsi_drv_video.so
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_23
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.23 (libva 2.23.0)
vainfo: Driver version: Mesa Gallium driver 26.2.3 for AMD Radeon RX 9070 XT (radeonsi, gfx1201, ACO, DRM 3.64, 7.2.7-200.fc44.x86_64)
vainfo: Supported profile and entrypoints
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointEncSlice
      VAProfileAV1Profile2            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

Thank You
I know you followed the given link, but please check these are installed:

sudo dnf swap mesa-va-drivers mesa-va-drivers-freeworld
sudo dnf swap mesa-vdpau-drivers mesa-vdpau-drivers-freeworld
sudo dnf install libavcodec-freeworld

If the Codec is still missing in (vainfo) then I’m stumped. :frowning:

First command fails because it’s already installed.

Second and third fail because those packages don’t exist.

EDIT: The third one worked. Must have mistyped. It’s already installed.

Dang The first one should be enough for your codecs mesa-va-drivers mesa-va-drivers-freeworld
See This:

Name         : mesa-va-drivers-freeworld
Version      : 26.2.3
Release      : 1.fc45
Architecture : i686
Size         : 14 M
Source       : mesa-freeworld-26.2.3-1.fc45.src.rpm
Repository   : rpmfusion-free
Summary      : Mesa-based VA-API drivers
URL          : https://mesa3d.org
License      : MIT AND BSD-3-Clause AND SGI-B-2.0
Description  : These drivers contains video acceleration codecs for decoding/encoding H.264 and H.265
             : algorithms and decoding only VC1 algorithm.

Name         : mesa-va-drivers-freeworld
Version      : 26.2.3
Release      : 1.fc45
Architecture : x86_64
Size         : 14 M
Source       : mesa-freeworld-26.2.3-1.fc45.src.rpm
Repository   : rpmfusion-free
Summary      : Mesa-based VA-API drivers
URL          : https://mesa3d.org
License      : MIT AND BSD-3-Clause AND SGI-B-2.0
Description  : These drivers contains video acceleration codecs for decoding/encoding H.264 and H.265
             : algorithms and decoding only VC1 algorithm.


Bug Time maybe?

I swear I read that support for those is missing in the Mesa drivers for RDNA4, but I don’t know where.

I’ve opened a Ticket at AMD so lets see how this pans out.
They are pretty fast at replying for me… Oopps Did I just whammy myself. :wink:

They are for the Proprietary AMD Drivers (Limited Support)

So the codecs are only supported on the proprietary drivers?

No, open source (kernel driver) is the best option ATM.

I know they’re the best overall, though I am confused as to whether those codecs are currently supported.

If I/myself had your card, I’d at least give them a go.
That’s just me though, the choice should be yours. :slight_smile:

You mean giving the proprietary drivers a go? Because I’m already using the FOSS ones.

Yes! In the spirit of just testing.
Maybe a system snapshot before installing the driver though. (Automatic for me)
Good Luck and keep your post updated please.

Snapshottint ain’t a thing for me because I decided to use ext4. And I don’t have the time or energy to mess with my system that much. University starting tomorrow…

Timeshift is good on ext4 just sayin. :slight_smile:

Not sure I’d touch it then…just bare it out then and hope a update comes in with a fix…
Study Hard.

I really hope there will be updates. At least I can play VR fine due to Vulkan encoding, but for stuff like video recording via OBS Studio or screen sharing via Discord … sucks to have those missing.

If you want encode try buying a nvidia card next time as AMD suck at encode due to no AMF supported driver for most distro’s.

If it’s a must try using Redhat OS eg: Centos.