Closed cromefire closed 1 year ago
Searching up something on the arch forums led me to forcing the pro drive icd's (VK_ICD_FILENAMES=/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd64.json
) and rolling back the pro driver to 4.5.1/22.40 (pro driver doesn't seem to be there yet with 4.5.2) which still fails the same, but the errors seems a bit clearer this way:
[av1_amf @ 0xf997c0] AMF initialisation succeeded via Vulkan.
[av1_amf @ 0xf997c0] AMFVideoCore: 0123-01-05 17:11:43 DC07E800 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002
[av1_amf @ 0xf997c0] EncodeCore: 0123-01-05 17:11:43 DC07E800 [EncodeCore] Error: ./sources/drivers/enc_core/cmn/av1config.cpp(285):Av1Config::IsEncodeSupported(): Unknown Hardware!
[av1_amf @ 0xf997c0] AMFEncoderCoreAv1: 0123-01-05 17:11:43 DC07E800 [AMFEncoderCoreAv1] Warning: AMFEncoderCoreAv1Impl::CreateEncodeService() not supported VCN instance 0!
[av1_amf @ 0xf997c0] AMFEncoderCoreAv1: 0123-01-05 17:11:43 DC07E800 [AMFEncoderCoreAv1] Error: ../../../../../runtime/src/components/EncoderCore/EncoderCoreAv1Impl.cpp(315):AMF_ERROR 1 : AMF_FAIL: Failed to create encode service!
[av1_amf @ 0xf997c0] AMFEncoderCoreAv1: 0123-01-05 17:11:43 DC07E800 [AMFEncoderCoreAv1] Warning: CreateServices failed.
[av1_amf @ 0xf997c0] AMFEncoderCoreAv1: 0123-01-05 17:11:43 DC07E800 [AMFEncoderCoreAv1] Warning: *****Failed to create AV1 encoder component.
[av1_amf @ 0xf997c0] AMFEncoderCoreAv1: 0123-01-05 17:11:43 DC07E800 [AMFEncoderCoreAv1] Debug: AMFEncoderCoreAv1Impl::Terminate()
[av1_amf @ 0xf560c0] CreateComponent(AMFVideoEncoderHW_AV1) failed with error 1
[vost#0:0/av1_amf @ 0xf8ef40] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Seems like AMF doesn't know the 7000 series yet.
Did you install the driver and AMF following the standard procedure? I am asking because the problem is in the first line: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002. This is a mismatch between libamdenc64 and libamfrt64. Note, that after you roolled back to the older driver the versions in the log are still the same. I suggest to fully uninstall AMD driver and reinstall the latest.
https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-22-40
amdgpu-install -y --usecase=workstation,amf or amdgpu-install -y --usecase=graphics,amf Reboot
Did a full reinstall with uninstall and then install again as suggested and the line is still showing up. May there's something in the driver repo mismatched?
Also double checked the versions of both libraries and according to apt with have the same subversion 1518373
:
Package: amf-amdgpu-pro
Version: 1.4.29-1518373.22.04
Priority: optional
Section: libs
Maintainer: Advanced Micro Devices (AMD) <gpudriverdevsupport@amd.com>
Installed-Size: 8.195 kB
Depends: libc6 (>= 2.34), libdrm2-amdgpu, libstdc++6 (>= 11), vulkan-amdgpu-pro, libamdenc-amdgpu-pro
Recommends: rocm-opencl-runtime
Download-Size: 1.654 kB
APT-Manual-Installed: yes
APT-Sources: https://repo.radeon.com/amdgpu/5.4.1/ubuntu jammy/proprietary amd64 Packages
Description: AMDGPU Pro Advanced Multimedia Framework
Package: libamdenc-amdgpu-pro
Version: 1.0-1518373.22.04
Priority: optional
Section: libs
Maintainer: Advanced Micro Devices (AMD) <gpudriverdevsupport@amd.com>
Installed-Size: 1.439 kB
Depends: libc6 (>= 2.14), libgcc-s1 (>= 3.3.1), libstdc++6 (>= 4.1.1), amdgpu-pro-core
Download-Size: 248 kB
APT-Manual-Installed: no
APT-Sources: https://repo.radeon.com/amdgpu/5.4.1/ubuntu jammy/proprietary amd64 Packages
Description: AMD Encode Core Library
I am opening an internal ticket based on your finding with top priority.
22.40.3 Linux driver has been published. It should have the fix.
Just did a full reinstall (and rebooted of course) and it's still the same error.
For reference I used this command line:
VK_ICD_FILENAMES=/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd64.json ffmpeg -v debug -i "file.webm" -c:v h264_amf -c:a copy -y h264-amf.mkv
To be sure, without specifying the ICD still fails the same way and falls back to UVE, which also doesn't work:
The new library versions are:
Package: amf-amdgpu-pro
Version: 1.4.29-1538781.22.04
Priority: optional
Section: libs
Maintainer: Advanced Micro Devices (AMD) <gpudriverdevsupport@amd.com>
Installed-Size: 8.195 kB
Depends: libc6 (>= 2.34), libdrm2-amdgpu, libstdc++6 (>= 11), vulkan-amdgpu-pro, libamdenc-amdgpu-pro
Recommends: rocm-opencl-runtime
Download-Size: 1.656 kB
APT-Manual-Installed: yes
APT-Sources: https://repo.radeon.com/amdgpu/5.4.3/ubuntu jammy/proprietary amd64 Packages
Description: AMDGPU Pro Advanced Multimedia Framework
Package: libamdenc-amdgpu-pro
Version: 1.0-1538781.22.04
Priority: optional
Section: libs
Maintainer: Advanced Micro Devices (AMD) <gpudriverdevsupport@amd.com>
Installed-Size: 1.439 kB
Depends: libc6 (>= 2.14), libgcc-s1 (>= 3.3.1), libstdc++6 (>= 4.1.1), amdgpu-pro-core
Download-Size: 246 kB
APT-Manual-Installed: no
APT-Sources: https://repo.radeon.com/amdgpu/5.4.3/ubuntu jammy/proprietary amd64 Packages
Description: AMD Encode Core Library
Installed using:
sudo amdgpu-install --usecase="dkms,graphics,opencl,hip,rocm,mllib,amf" --opencl=rocr --vulkan=amdvlk,pro -y
DKMS also looks fine:
amdgpu/5.18.13-1538762.22.04, 5.19.0-32-generic, x86_64: installed
Package: amdgpu-dkms
Version: 1:5.18.13.50403-1538762.22.04
Priority: optional
Section: misc
Maintainer: Advanced Micro Devices (AMD) <gpudriverdevsupport@amd.com>
Installed-Size: 428 MB
Provides: rock-dkms
Depends: dkms (>= 1.95), libc-dev | libc6-dev, autoconf, automake, initramfs-tools, shim-signed, amdgpu-dkms-firmware (= 1:5.18.13.50403-1538762.22.04)
Conflicts: rock-dkms (<< 1:5.18.13.50403-1538762.22.04)
Breaks: rock-dkms (<< 1:5.18.13.50403-1538762.22.04)
Replaces: rock-dkms (<< 1:5.18.13.50403-1538762.22.04)
Download-Size: 9.846 kB
APT-Manual-Installed: yes
APT-Sources: https://repo.radeon.com/amdgpu/5.4.3/ubuntu jammy/main amd64 Packages
Description: amdgpu driver in DKMS format.
At this point we cannot repro with the latest public driver. Could you please provide log from: dpkg -l | grep amdgpu
ii amdgpu-core 1:5.4.50403-1538762.22.04 all Core meta package for unified amdgpu driver.
ii amdgpu-dkms 1:5.18.13.50403-1538762.22.04 all amdgpu driver in DKMS format.
ii amdgpu-dkms-firmware 1:5.18.13.50403-1538762.22.04 all firmware blobs used by amdgpu driver in DKMS format
ii amdgpu-install 5.4.50403-1538762.22.04 all AMDGPU driver repository and installer
ii amdgpu-lib 1:5.4.50403-1538762.22.04 amd64 Meta package to install amdgpu userspace components.
ii amdgpu-lib32 1:5.4.50403-1538762.22.04 amd64 Meta package to support i386 runtime on amd64 architecture
ii amdgpu-pro-core 22.40-1538781.22.04 all Core meta package for Pro components of the unified amdgpu driver.
ii amf-amdgpu-pro:amd64 1.4.29-1538781.22.04 amd64 AMDGPU Pro Advanced Multimedia Framework
ii gst-omx-amdgpu 1:1.0.0.1.50403-1538762.22.04 amd64 GStreamer OpenMAX plugins
ii libamdenc-amdgpu-pro:amd64 1.0-1538781.22.04 amd64 AMD Encode Core Library
ii libdrm-amdgpu-amdgpu1:amd64 1:2.4.113.50403-1538762.22.04 amd64 Userspace interface to amdgpu-specific kernel DRM services -- runtime
ii libdrm-amdgpu-amdgpu1:i386 1:2.4.113.50403-1538762.22.04 i386 Userspace interface to amdgpu-specific kernel DRM services -- runtime
ii libdrm-amdgpu-common 1.0.0.50403-1538762.22.04 all List of AMD/ATI cards' device IDs, revision IDs and marketing names
ii libdrm-amdgpu-radeon1:amd64 1:2.4.113.50403-1538762.22.04 amd64 Userspace interface to radeon-specific kernel DRM services -- runtime
ii libdrm-amdgpu-radeon1:i386 1:2.4.113.50403-1538762.22.04 i386 Userspace interface to radeon-specific kernel DRM services -- runtime
ii libdrm-amdgpu1:amd64 2.4.113-2~ubuntu0.22.04.1 amd64 Userspace interface to amdgpu-specific kernel DRM services -- runtime
ii libdrm-amdgpu1:i386 2.4.113-2~ubuntu0.22.04.1 i386 Userspace interface to amdgpu-specific kernel DRM services -- runtime
ii libdrm2-amdgpu:amd64 1:2.4.113.50403-1538762.22.04 amd64 Userspace interface to kernel DRM services -- runtime
ii libdrm2-amdgpu:i386 1:2.4.113.50403-1538762.22.04 i386 Userspace interface to kernel DRM services -- runtime
ii libegl1-amdgpu-mesa:amd64 1:22.3.0.50403-1538762.22.04 amd64 free implementation of the EGL API -- runtime
ii libegl1-amdgpu-mesa:i386 1:22.3.0.50403-1538762.22.04 i386 free implementation of the EGL API -- runtime
ii libegl1-amdgpu-mesa-drivers:amd64 1:22.3.0.50403-1538762.22.04 amd64 free implementation of the EGL API -- hardware drivers
ii libegl1-amdgpu-mesa-drivers:i386 1:22.3.0.50403-1538762.22.04 i386 free implementation of the EGL API -- hardware drivers
ii libgbm1-amdgpu:amd64 1:22.3.0.50403-1538762.22.04 amd64 generic buffer management API -- runtime
ii libgbm1-amdgpu:i386 1:22.3.0.50403-1538762.22.04 i386 generic buffer management API -- runtime
ii libgl1-amdgpu-mesa-dri:amd64 1:22.3.0.50403-1538762.22.04 amd64 free implementation of the OpenGL API -- DRI modules
ii libgl1-amdgpu-mesa-dri:i386 1:22.3.0.50403-1538762.22.04 i386 free implementation of the OpenGL API -- DRI modules
ii libgl1-amdgpu-mesa-glx:amd64 1:22.3.0.50403-1538762.22.04 amd64 free implementation of the OpenGL API -- GLX runtime
ii libgl1-amdgpu-mesa-glx:i386 1:22.3.0.50403-1538762.22.04 i386 free implementation of the OpenGL API -- GLX runtime
ii libglapi-amdgpu-mesa:amd64 1:22.3.0.50403-1538762.22.04 amd64 free implementation of the GL API -- shared library
ii libglapi-amdgpu-mesa:i386 1:22.3.0.50403-1538762.22.04 i386 free implementation of the GL API -- shared library
ii libllvm15.0.50403-amdgpu:amd64 1:15.0.50403-1538762.22.04 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm15.0.50403-amdgpu:i386 1:15.0.50403-1538762.22.04 i386 Modular compiler and toolchain technologies, runtime library
ii libxatracker2-amdgpu:amd64 1:22.3.0.50403-1538762.22.04 amd64 X acceleration library -- runtime
ii libxatracker2-amdgpu:i386 1:22.3.0.50403-1538762.22.04 i386 X acceleration library -- runtime
ii mesa-amdgpu-omx-drivers:amd64 1:22.3.0.50403-1538762.22.04 amd64 Mesa OpenMAX video drivers
ii mesa-amdgpu-va-drivers:amd64 1:22.3.0.50403-1538762.22.04 amd64 Mesa VA-API video acceleration drivers
ii mesa-amdgpu-va-drivers:i386 1:22.3.0.50403-1538762.22.04 i386 Mesa VA-API video acceleration drivers
ii mesa-amdgpu-vdpau-drivers:amd64 1:22.3.0.50403-1538762.22.04 amd64 Mesa VDPAU video acceleration drivers
ii mesa-amdgpu-vdpau-drivers:i386 1:22.3.0.50403-1538762.22.04 i386 Mesa VDPAU video acceleration drivers
ii vulkan-amdgpu:amd64 22.40-1538781.22.04 amd64 AMDGPU Vulkan driver
ii vulkan-amdgpu-pro:amd64 22.40-1538781.22.04 amd64 AMDGPU Pro Vulkan driver
ii vulkan-amdgpu-pro:i386 22.40-1538781.22.04 i386 AMDGPU Pro Vulkan driver
ii xserver-xorg-amdgpu-video-amdgpu 1:22.0.0.50403-1538762.22.04 amd64 X.Org X server -- AMD/ATI Radeon display driver
ii xserver-xorg-video-amdgpu 22.0.0-1ubuntu0.1 amd64 X.Org X server -- AMDGPU display driver
One thought: it seems you have two AMD Vulkan drivers installed open-Source and Pro: vulkan-amdgpu:amd64 22.40-1538781.22.04 amd64 AMDGPU Vulkan driver vulkan-amdgpu-pro:amd64 22.40-1538781.22.04 amd64 AMDGPU Pro Vulkan driver vulkan-amdgpu-pro:i386 22.40-1538781.22.04 i386 AMDGPU Pro Vulkan driver Could be from --vulkan=amdvlk,pro BTW: AMF has dependency and will install Vulkan Pro driver automatically Is it possible that AMF loading open-source driver? What is in amd_icd64.json? Can you try to uninstall all AMD and use simple install: amdgpu-install -y --usecase=workstation,amf or amdgpu-install -y --usecase=graphics,amf reboot
sudo amdgpu-install -y --usecase=graphics,amf
Same error:
Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002
~$ dpkg -l | grep amdgpu
ii amdgpu-core 1:5.4.50403-1538762.22.04 all Core meta package for unified amdgpu driver.
ii amdgpu-dkms 1:5.18.13.50403-1538762.22.04 all amdgpu driver in DKMS format.
ii amdgpu-dkms-firmware 1:5.18.13.50403-1538762.22.04 all firmware blobs used by amdgpu driver in DKMS format
ii amdgpu-install 5.4.50403-1538762.22.04 all AMDGPU driver repository and installer
ii amdgpu-lib 1:5.4.50403-1538762.22.04 amd64 Meta package to install amdgpu userspace components.
ii amdgpu-lib32 1:5.4.50403-1538762.22.04 amd64 Meta package to support i386 runtime on amd64 architecture
ii amdgpu-pro-core 22.40-1538781.22.04 all Core meta package for Pro components of the unified amdgpu driver.
ii amf-amdgpu-pro:amd64 1.4.29-1538781.22.04 amd64 AMDGPU Pro Advanced Multimedia Framework
ii gst-omx-amdgpu 1:1.0.0.1.50403-1538762.22.04 amd64 GStreamer OpenMAX plugins
ii libamdenc-amdgpu-pro:amd64 1.0-1538781.22.04 amd64 AMD Encode Core Library
ii libdrm-amdgpu-amdgpu1:amd64 1:2.4.113.50403-1538762.22.04 amd64 Userspace interface to amdgpu-specific kernel DRM services -- runtime
ii libdrm-amdgpu-amdgpu1:i386 1:2.4.113.50403-1538762.22.04 i386 Userspace interface to amdgpu-specific kernel DRM services -- runtime
ii libdrm-amdgpu-common 1.0.0.50403-1538762.22.04 all List of AMD/ATI cards' device IDs, revision IDs and marketing names
ii libdrm-amdgpu-radeon1:amd64 1:2.4.113.50403-1538762.22.04 amd64 Userspace interface to radeon-specific kernel DRM services -- runtime
ii libdrm-amdgpu-radeon1:i386 1:2.4.113.50403-1538762.22.04 i386 Userspace interface to radeon-specific kernel DRM services -- runtime
ii libdrm-amdgpu1:amd64 2.4.113-2~ubuntu0.22.04.1 amd64 Userspace interface to amdgpu-specific kernel DRM services -- runtime
ii libdrm-amdgpu1:i386 2.4.113-2~ubuntu0.22.04.1 i386 Userspace interface to amdgpu-specific kernel DRM services -- runtime
ii libdrm2-amdgpu:amd64 1:2.4.113.50403-1538762.22.04 amd64 Userspace interface to kernel DRM services -- runtime
ii libdrm2-amdgpu:i386 1:2.4.113.50403-1538762.22.04 i386 Userspace interface to kernel DRM services -- runtime
ii libegl1-amdgpu-mesa:amd64 1:22.3.0.50403-1538762.22.04 amd64 free implementation of the EGL API -- runtime
ii libegl1-amdgpu-mesa:i386 1:22.3.0.50403-1538762.22.04 i386 free implementation of the EGL API -- runtime
ii libegl1-amdgpu-mesa-drivers:amd64 1:22.3.0.50403-1538762.22.04 amd64 free implementation of the EGL API -- hardware drivers
ii libegl1-amdgpu-mesa-drivers:i386 1:22.3.0.50403-1538762.22.04 i386 free implementation of the EGL API -- hardware drivers
ii libgbm1-amdgpu:amd64 1:22.3.0.50403-1538762.22.04 amd64 generic buffer management API -- runtime
ii libgbm1-amdgpu:i386 1:22.3.0.50403-1538762.22.04 i386 generic buffer management API -- runtime
ii libgl1-amdgpu-mesa-dri:amd64 1:22.3.0.50403-1538762.22.04 amd64 free implementation of the OpenGL API -- DRI modules
ii libgl1-amdgpu-mesa-dri:i386 1:22.3.0.50403-1538762.22.04 i386 free implementation of the OpenGL API -- DRI modules
ii libgl1-amdgpu-mesa-glx:amd64 1:22.3.0.50403-1538762.22.04 amd64 free implementation of the OpenGL API -- GLX runtime
ii libgl1-amdgpu-mesa-glx:i386 1:22.3.0.50403-1538762.22.04 i386 free implementation of the OpenGL API -- GLX runtime
ii libglapi-amdgpu-mesa:amd64 1:22.3.0.50403-1538762.22.04 amd64 free implementation of the GL API -- shared library
ii libglapi-amdgpu-mesa:i386 1:22.3.0.50403-1538762.22.04 i386 free implementation of the GL API -- shared library
ii libllvm15.0.50403-amdgpu:amd64 1:15.0.50403-1538762.22.04 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm15.0.50403-amdgpu:i386 1:15.0.50403-1538762.22.04 i386 Modular compiler and toolchain technologies, runtime library
ii libxatracker2-amdgpu:amd64 1:22.3.0.50403-1538762.22.04 amd64 X acceleration library -- runtime
ii libxatracker2-amdgpu:i386 1:22.3.0.50403-1538762.22.04 i386 X acceleration library -- runtime
ii mesa-amdgpu-omx-drivers:amd64 1:22.3.0.50403-1538762.22.04 amd64 Mesa OpenMAX video drivers
ii mesa-amdgpu-va-drivers:amd64 1:22.3.0.50403-1538762.22.04 amd64 Mesa VA-API video acceleration drivers
ii mesa-amdgpu-va-drivers:i386 1:22.3.0.50403-1538762.22.04 i386 Mesa VA-API video acceleration drivers
ii mesa-amdgpu-vdpau-drivers:amd64 1:22.3.0.50403-1538762.22.04 amd64 Mesa VDPAU video acceleration drivers
ii mesa-amdgpu-vdpau-drivers:i386 1:22.3.0.50403-1538762.22.04 i386 Mesa VDPAU video acceleration drivers
ii vulkan-amdgpu-pro:amd64 22.40-1538781.22.04 amd64 AMDGPU Pro Vulkan driver
ii xserver-xorg-amdgpu-video-amdgpu 1:22.0.0.50403-1538762.22.04 amd64 X.Org X server -- AMD/ATI Radeon display driver
ii xserver-xorg-video-amdgpu 22.0.0-1ubuntu0.1 amd64 X.Org X server -- AMDGPU display driver
Warning message is not a problem, will be removed later. The absence of queue is. Could you please try VAAPI via FFmpeg? I want to check if VCN is visible. Also please provide output of vulkaninfo –summary And: do to you by chance use VM rather then baremetal setup?
Warning message is not a problem, will be removed later. The absence of queue is.
Yeah, just wanted to indicate it's the same error, but yes, it's still failing the same way.
Default is (seems to prefer what I think is RADV?):
Forced to use the pro driver:
VAAPI at least finds the capabilities for H264 and HEVC (AV1 is notably missing):
But also seems to have issues transcoding h264:
While HEVC:
ffmpeg -vaapi_device /dev/dri/renderD128 -v debug -i "file.webm" -c:v hevc_vaapi -vf 'format=nv12,hwupload' -c:a copy -y hevc-vaapi.mkv
even HDR:
ffmpeg -vaapi_device /dev/dri/renderD128 -v debug -i "file-hdr.webm" -c:v hevc_vaapi -vf 'hwupload' -c:a copy -y hevc-vaapi-hdr.mkv
are fine and confirmed playing.
AV1 of course wasn't encoding, as no VAEntrypointEncSlice is present with the current driver:
[av1_vaapi @ 0x1ad1fc0] Using input frames context (format vaapi) with av1_vaapi encoder.
[av1_vaapi @ 0x1ad1fc0] Input surface format is yuv420p.
[av1_vaapi @ 0x1ad1fc0] Using VAAPI profile VAProfileAV1Profile0 (32).
[av1_vaapi @ 0x1ad1fc0] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[vost#0:0/av1_vaapi @ 0x1ad1d00] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
And: do to you by chance use VM rather then baremetal setup?
No, bare metal.
OK, several things - all for forced Vulkan Pro driver:
export VK_ICD_FILENAMES=/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd64.json
export AMDVLKXF="MME-4efe535a;MMD-edb8dc97;YUV-9c240ad2;MME-2ug4lyta" vulkaninfo |grep encode 3. export AMDVLKXF="MME-4efe535a;MMD-edb8dc97;YUV-9c240ad2;MME-2ug4lyta" ffmpeg - your command line
First of all, H264 and HEVC (8bit) seem to be working suddenly now. Double checking, it's only working if the pro driver is forced (which is okay I guess). Now to try and reproduce what when wrong that made it not work:
unattended-upgrades
has no logsvainfo
output is still the samesudo amdgpu-install --usecase="dkms,graphics,opencl,hip,rocm,mllib,amf" --opencl=rocr --vulkan=amdvlk,pro -y
(the only thing I changed since 3 days ago)/var/log/apt/history.log
/var/log/dpkg.log
I have no idea what could have even changed (on the windows side the card had contact with the windows driver in between, but I believe the Windows driver doesn't just flash the VBIOS or so)... The system was rebooted multiple times (since it's a desktop), had multiple driver reinstalls and I always also tested with forced Vulkan driver. If you have anything else I could check, to see what changed I'm glad to try and track it down, but maybe confirmed working is good enough for now.
Maybe this helps (shows some errors eventhough it works):
[hevc_amf @ 0x17ca1c0] AMFVideoCore: 0123-01-27 22:51:27 67071800 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Warning: Failed to create video core service!
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreBaseImpl: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreBaseImpl] Warning: Failed to QueryThroughput()!
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreBaseImpl: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreBaseImpl] Info: AMFEncoderCoreBaseImpl::QueryThroughput - maxThroughputMBPerSec = 0, totalRequiredThroughputMBPerSec = 0
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcUsage:0
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcFrameSize:1920,1080
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcFrameRate:19001,317
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcProfile:1
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcTier:0
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcQualityPreset:10
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcAspectRatio:1,1
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcGOPSPerIDR:1
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcGOPSize:250
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcDeBlockingFilter:false
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcHeaderInsertionMode:0
[hevc_amf @ 0x17f5a00] Rate control turned to CBR
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcRateControlMethod:3
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcRateControlPreAnalysisEnable:false
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcEnableVBAQ:false
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcHalfPixel:true
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty HevcQuarterPixel:true
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcEnforceHRD:false
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcFillerDataEnable:false
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcTargetBitrate:2000000
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcPeakBitrate:2000000
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcVBVBufferSize:50049
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcPeakBitrate:2000000
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::Init(YUV420P, 1920, 1080)
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreHevc: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreHevc] Warning: Failed to create video core service!
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreBaseImpl: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreBaseImpl] Warning: Failed to QueryThroughput()!
[hevc_amf @ 0x17ca1c0] AMFEncoderCoreBaseImpl: 0123-01-27 22:51:27 67071800 [AMFEncoderCoreBaseImpl] Info: AMFEncoderCoreBaseImpl::QueryThroughput - maxThroughputMBPerSec = 0, totalRequiredThroughputMBPerSec = 0
So, what is not working yet is hevc 10bit (just encodes as 8bit), but that might be on ffmpeg not listing anything but yuv420p and nv12 as compatible and AV1. AV1 produces the following log:
[av1_amf @ 0x8a1dc0] AMF initialisation succeeded via Vulkan.
[av1_amf @ 0x8a1dc0] AMFVideoCore: 0123-01-27 23:00:32 DAE6E800 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002
[av1_amf @ 0x8a1dc0] AMFEncoderCoreAv1: 0123-01-27 23:00:32 DAE6E800 [AMFEncoderCoreAv1] Warning: Failed to create video core service!
[av1_amf @ 0x8a1dc0] AMFEncoderCoreAv1: 0123-01-27 23:00:32 DAE6E800 [AMFEncoderCoreAv1] Warning: Codec disabled
[av1_amf @ 0x8a1dc0] AMFEncoderCoreAv1: 0123-01-27 23:00:32 DAE6E800 [AMFEncoderCoreAv1] Warning: CreateServices failed.
[av1_amf @ 0x8a1dc0] AMFEncoderCoreAv1: 0123-01-27 23:00:32 DAE6E800 [AMFEncoderCoreAv1] Warning: *****Failed to create AV1 encoder component.
[av1_amf @ 0x8a1dc0] AMFEncoderCoreAv1: 0123-01-27 23:00:32 DAE6E800 [AMFEncoderCoreAv1] Debug: AMFEncoderCoreAv1Impl::Terminate()
[av1_amf @ 0x8c9600] CreateComponent(AMFVideoEncoderHW_AV1) failed with error 30
So it seems AV1 support just isn't enabled yet with the latest drivers, neither via VAAPI nor AMF (but I can create a new issue for that if you want, since this is a different error).
Thanks for all the support though, even though the culprit couldn't be identified precisely after all (or at least not confirmed).
Few things:
You may installed two Vulkan drivers because of "dkms,graphics,opencl,hip,rocm,mllib,amf" line. graphics installs open-source Vulkan driver and amf Vulkan Pro driver.
Yes I even installed all 3 now (RADV, AMDVLK and AMDVLK-PRO), but it's still working, so that didn't seem to be the issue. 🤷🏻♂️ (Just have to tell Vulkan which driver to use, which sounds totally reasonable)
AV1 vja AMF is supported in the driver. From the log it looks like you did not force Vulkan Pro driver
I suggest you provide successful FFmpeg log and CMD for H264 and failing for AV1 to compare.
AV1 with pro:
[av1_amf @ 0x1181dc0] AMF initialisation succeeded via Vulkan.
[av1_amf @ 0x1181dc0] AMFVideoCore: 0123-01-27 23:52:44 EC181800 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002
[av1_amf @ 0x1181dc0] AMFEncoderCoreAv1: 0123-01-27 23:52:44 EC181800 [AMFEncoderCoreAv1] Warning: Failed to create video core service!
[av1_amf @ 0x1181dc0] AMFEncoderCoreAv1: 0123-01-27 23:52:44 EC181800 [AMFEncoderCoreAv1] Warning: Codec disabled
[av1_amf @ 0x1181dc0] AMFEncoderCoreAv1: 0123-01-27 23:52:44 EC181800 [AMFEncoderCoreAv1] Warning: CreateServices failed.
[av1_amf @ 0x1181dc0] AMFEncoderCoreAv1: 0123-01-27 23:52:44 EC181800 [AMFEncoderCoreAv1] Warning: *****Failed to create AV1 encoder component.
[av1_amf @ 0x1181dc0] AMFEncoderCoreAv1: 0123-01-27 23:52:44 EC181800 [AMFEncoderCoreAv1] Debug: AMFEncoderCoreAv1Impl::Terminate()
[av1_amf @ 0x11a9600] CreateComponent(AMFVideoEncoderHW_AV1) failed with error 30
hevc with pro (working):
[hevc_amf @ 0x1613dc0] AMF initialisation succeeded via Vulkan.
[hevc_amf @ 0x1613dc0] AMFVideoCore: 0123-01-27 23:52:26 B064D800 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Warning: Failed to create video core service!
[hevc_amf @ 0x1613dc0] AMFEncoderCoreBaseImpl: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreBaseImpl] Warning: Failed to QueryThroughput()!
[hevc_amf @ 0x1613dc0] AMFEncoderCoreBaseImpl: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreBaseImpl] Info: AMFEncoderCoreBaseImpl::QueryThroughput - maxThroughputMBPerSec = 0, totalRequiredThroughputMBPerSec = 0
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcUsage:0
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcFrameSize:1920,1080
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcFrameRate:19001,317
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcProfile:1
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcTier:0
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcQualityPreset:10
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcAspectRatio:1,1
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcGOPSPerIDR:1
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcGOPSize:250
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcDeBlockingFilter:false
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcHeaderInsertionMode:0
[hevc_amf @ 0x163b600] Rate control turned to CBR
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcRateControlMethod:3
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcRateControlPreAnalysisEnable:false
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcEnableVBAQ:false
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcHalfPixel:true
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty HevcQuarterPixel:true
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcEnforceHRD:false
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcFillerDataEnable:false
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcTargetBitrate:2000000
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcPeakBitrate:2000000
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcVBVBufferSize:50049
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: SetProperty TL0.QL0.HevcPeakBitrate:2000000
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Debug: AMFEncoderCoreHevcImpl::Init(YUV420P, 1920, 1080)
[hevc_amf @ 0x1613dc0] AMFEncoderCoreHevc: 0123-01-27 23:52:26 B064D800 [AMFEncoderCoreHevc] Warning: Failed to create video core service!
AV1 without pro:
[av1_amf @ 0xaaadc0] AMF initialisation succeeded via Vulkan.
[av1_amf @ 0xaaadc0] AMFVideoCore: 0123-01-27 23:54:20 6E551800 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002
[av1_amf @ 0xaaadc0] EncodeQueueVulkan: 0123-01-27 23:54:20 6E551800 [EncodeQueueVulkan] Info: EncodeQueueServiceVulkanImpl::Initialize() new encode queue extension is not supported
[av1_amf @ 0xaaadc0] EncodeQueueService: 0123-01-27 23:54:20 6E551800 [EncodeQueueService] Warning: Failed to create encode queue serivce.
[av1_amf @ 0xaaadc0] AMFEncoderCoreBaseImpl: 0123-01-27 23:54:20 6E551800 [AMFEncoderCoreBaseImpl] Warning: Failed to initialize EncodeQueueFactory.
[av1_amf @ 0xaaadc0] AMFEncoderCoreBaseImpl: 0123-01-27 23:54:20 6E551800 [AMFEncoderCoreBaseImpl] Warning: Failed to create encode queue serivce.
[av1_amf @ 0xaaadc0] AMFEncoderCoreAv1: 0123-01-27 23:54:20 6E551800 [AMFEncoderCoreAv1] Warning: Encode Core dll not found
[av1_amf @ 0xaaadc0] AMFEncoderCoreAv1: 0123-01-27 23:54:20 6E551800 [AMFEncoderCoreAv1] Warning: CreateServices failed.
[av1_amf @ 0xaaadc0] AMFEncoderCoreAv1: 0123-01-27 23:54:20 6E551800 [AMFEncoderCoreAv1] Warning: *****Failed to create AV1 encoder component.
[av1_amf @ 0xaaadc0] AMFEncoderCoreAv1: 0123-01-27 23:54:20 6E551800 [AMFEncoderCoreAv1] Debug: AMFEncoderCoreAv1Impl::Terminate()
HEVC 10-bit patch was submitted to FFmpeg but not merged yet, working on this.
Awesome, (AV1 also needs the same treatment it seems), also if you don't mind, do you have a link to the patch?
Hi @cromefire, thanks for the patience. AV1 issue has been reproduced, internal ticket will be created, We will push for the fix ASAP. HEVC 10-bit patch: http://ffmpeg.org/pipermail/ffmpeg-devel/2022-September/301111.html http://ffmpeg.org/pipermail/ffmpeg-devel/2022-September/301110.html
Just realized I didn't answer it, but if SSH access is ever needed there's probably a way to get that done, you just would have to give me a little heads up, so I can set stuff up with port forwarding and so on. Otherwise I'm available to test whatever you need of course.
Thank you, as the issue reproduced on our side, we are good for now.
Can confirm HEVC Main10 is also working correctly (hopefully ffmpeg will finally pull those patches...), although AV1 doesn't seem to be included in the patch, but it might be easy enough to at least get it working on my own.
Edit: Can't test it yet of course and it's only a best guess, with only a quick look at the actual documentation, but here's a (compiling) patch for 10bit AV1:
Happy to confirm that AV1 is working now (with 5.5.1
) as well.
If someone stumbles upon this here's what you need to achive full function right now:
VK_ICD_FILENAMES=/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd64.json
if you have more than one "style" of amd vulkan installed.Patches:
@MikhailAMD If you want to and find some time maybe one of you can also upstream the AV1 patch (anyone has my explicit permission to do what ever they want with the patch without any credit) or add it to the HEVC patch or so, so maybe we can get all of that natively one day.
Describe the bug None of the available encoders on the 7900 XTX is reconized as being available.
Confirmed fixed:
To Reproduce Steps to reproduce the behavior:
Setup (please complete the following information):
libamdenc-amdgpu-pro
1.0-1518373.22.04,amf-amdgpu-pro
1.4.29-1518373.22.04)Debug Log (please upload or paste):
H264:
HEVC:
AV1:
Expected behavior As the 7900 XTX has all of the encoders supported by AMF, all 3 should be recognized and working.
Additional context
libamdenc64
andlibamfrt64
are both there andlibamdenc64
is sucessfully loaded right before the error (in the case of AV1):