As Terje requested I looked up into amf compilation, _it seems_ it just require headers at compilation stage BUT amdgpu-pro runtime for any real use, and it goes via vulkan anyway ? https://ffmpeg.org/general.html#AMD-AMF_002fVCE
Den 12.12.2024 00:46, skrev Andrew Randrianasulu via Cin:
As Terje requested I looked up into amf compilation, _it seems_ it just require headers at compilation stage BUT amdgpu-pro runtime for any real use, and it goes via vulkan anyway ?
Some related sections I have extracted and collected, but not neccessary up to date: AMD / Mesa The Mesa VAAPI driver uses the UVD (Unified Video Decoder) and VCE (Video Coding Engine) hardware found in all recent AMD graphics cards and APUs. https://trac.ffmpeg.org/wiki/Hardware/VAAPI#AMDMesa And this reminded me about our interlace problematic: Encoding and interlacing support in Mesa are incompatible because of the data layout in GPU memory. By default, frames are separated into fields and interlaced video is supported but encoding is not. Set the environment variable VAAPI_DISABLE_INTERLACE to 1 to be able to use the encoder (but without any interlaced video support). AMD/VAAPI https://trac.ffmpeg.org/wiki/HWAccelIntro#PlatformAPIAvailability P Partial support (some devices / some features). VAAPI https://trac.ffmpeg.org/wiki/HWAccelIntro#VAAPI Video Acceleration API (VAAPI) is a non-proprietary and royalty-free open source software library ("libva") and API specification, initially developed by Intel but can be used in combination with other devices. It can be used to access the Quick Sync hardware in Intel GPUs (!?)and the UVD/VCE hardware in AMD GPUs. See VAAPI. AMD UVD/VCE ¶ https://trac.ffmpeg.org/wiki/HWAccelIntro#AMDUVDVCE AMD UVD is usable for decode via VDPAU and VAAPI in Mesa on Linux. VCE also has some initial support for encode via VAAPI, but should be considered experimental. AMF is effectively supported by FFmpeg to significantly speed up video encoding, decoding, and transcoding via AMD GPUs. AMD / Mesa https://trac.ffmpeg.org/wiki/Hardware/VAAPI#AMDMesa The Mesa VAAPI driver uses the UVD (Unified Video Decoder) and VCE (Video Coding Engine) hardware found in all recent AMD graphics cards and APUs. i965 Driver https://trac.ffmpeg.org/wiki/Hardware/QuickSync#i965vs.iHDDrivervs.libvpllib... Supports VAAPI i965 is packaged as standard in most Linux distributions. Runs on older and cheaper devices. Common API for applications which may also use AMD hardware with Mesa. Interoperable with standard APIs (EGL/OpenGL, OpenCL).
чт, 12 дек. 2024 г., 03:11 Terje J. Hanssen <[email protected]>:
Den 12.12.2024 00:46, skrev Andrew Randrianasulu via Cin:
As Terje requested I looked up into amf compilation, _it seems_ it just require headers at compilation stage BUT amdgpu-pro runtime for any real use, and it goes via vulkan anyway ?
https://gpuopen.com/advanced-media-framework/ according to this (official?) site amf encoder component how can be used with mesa's radv driver, so may be less proprietary components can be installed? If whole thing granular enough .... ===== Version 1.4.34.0 - Added Linux support for DVR sample. - New HEVC header insertion mode. - Stable support for RADV drivers for AMF on Linux in VideoConverter/HQScaler/VideoEncoder and experimental for decoder. ======
Some related sections I have extracted and collected, but not neccessary up to date:
AMD / Mesa The Mesa VAAPI driver uses the UVD (Unified Video Decoder) and VCE (Video Coding Engine) hardware found in all recent AMD graphics cards and APUs. https://trac.ffmpeg.org/wiki/Hardware/VAAPI#AMDMesa
And this reminded me about our interlace problematic: Encoding and interlacing support in Mesa are incompatible because of the data layout in GPU memory. By default, frames are separated into fields and interlaced video is supported but encoding is not. Set the environment variable VAAPI_DISABLE_INTERLACE to 1 to be able to use the encoder (but without any interlaced video support).
AMD/VAAPI https://trac.ffmpeg.org/wiki/HWAccelIntro#PlatformAPIAvailability P Partial support (some devices / some features).
VAAPI https://trac.ffmpeg.org/wiki/HWAccelIntro#VAAPI Video Acceleration API (VAAPI) is a non-proprietary and royalty-free open source software library ("libva") and API specification, initially developed by Intel but can be used in combination with other devices.
It can be used to access the Quick Sync hardware in Intel GPUs (!?)and the UVD/VCE hardware in AMD GPUs. See VAAPI.
AMD UVD/VCE ¶ https://trac.ffmpeg.org/wiki/HWAccelIntro#AMDUVDVCE AMD UVD is usable for decode via VDPAU and VAAPI in Mesa on Linux. VCE also has some initial support for encode via VAAPI, but should be considered experimental.
AMF is effectively supported by FFmpeg to significantly speed up video encoding, decoding, and transcoding via AMD GPUs.
AMD / Mesa https://trac.ffmpeg.org/wiki/Hardware/VAAPI#AMDMesa The Mesa VAAPI driver uses the UVD (Unified Video Decoder) and VCE (Video Coding Engine) hardware found in all recent AMD graphics cards and APUs.
i965 Driver
https://trac.ffmpeg.org/wiki/Hardware/QuickSync#i965vs.iHDDrivervs.libvpllib... Supports VAAPI i965 is packaged as standard in most Linux distributions. Runs on older and cheaper devices. Common API for applications which may also use AMD hardware with Mesa. Interoperable with standard APIs (EGL/OpenGL, OpenCL).
чт, 12 дек. 2024 г., 04:09 Andrew Randrianasulu <[email protected]>:
чт, 12 дек. 2024 г., 03:11 Terje J. Hanssen <[email protected]>:
Den 12.12.2024 00:46, skrev Andrew Randrianasulu via Cin:
As Terje requested I looked up into amf compilation, _it seems_ it just require headers at compilation stage BUT amdgpu-pro runtime for any real use, and it goes via vulkan anyway ?
https://gpuopen.com/advanced-media-framework/
according to this (official?) site amf encoder component how can be used with mesa's radv driver, so may be less proprietary components can be installed? If whole thing granular enough ....
=====
Version 1.4.34.0
- Added Linux support for DVR sample. - New HEVC header insertion mode. - Stable support for RADV drivers for AMF on Linux in VideoConverter/HQScaler/VideoEncoder and experimental for decoder.
======
https://github.com/GPUOpen-LibrariesAndSDKs/AMF/wiki/Driver%20Linux this page says you can install just AMF component by using sudo amdgpu-install -y --usecase=amf thankfully, there is also uninstall script ;) but you still need copy of amd headers manually placed in correct location, and also ffmpeg compiled with--enable-amf notably, ffmpeg 7.1 also gives high bitrate in this case according to https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/514 ah, it was just changed default ... in ffmpeg 7.1 but hopefully someone can try this manual install script route and report how it behaves ...
Some related sections I have extracted and collected, but not neccessary up to date:
AMD / Mesa The Mesa VAAPI driver uses the UVD (Unified Video Decoder) and VCE (Video Coding Engine) hardware found in all recent AMD graphics cards and APUs. https://trac.ffmpeg.org/wiki/Hardware/VAAPI#AMDMesa
And this reminded me about our interlace problematic: Encoding and interlacing support in Mesa are incompatible because of the data layout in GPU memory. By default, frames are separated into fields and interlaced video is supported but encoding is not. Set the environment variable VAAPI_DISABLE_INTERLACE to 1 to be able to use the encoder (but without any interlaced video support).
AMD/VAAPI https://trac.ffmpeg.org/wiki/HWAccelIntro#PlatformAPIAvailability P Partial support (some devices / some features).
VAAPI https://trac.ffmpeg.org/wiki/HWAccelIntro#VAAPI Video Acceleration API (VAAPI) is a non-proprietary and royalty-free open source software library ("libva") and API specification, initially developed by Intel but can be used in combination with other devices.
It can be used to access the Quick Sync hardware in Intel GPUs (!?)and the UVD/VCE hardware in AMD GPUs. See VAAPI.
AMD UVD/VCE ¶ https://trac.ffmpeg.org/wiki/HWAccelIntro#AMDUVDVCE AMD UVD is usable for decode via VDPAU and VAAPI in Mesa on Linux. VCE also has some initial support for encode via VAAPI, but should be considered experimental.
AMF is effectively supported by FFmpeg to significantly speed up video encoding, decoding, and transcoding via AMD GPUs.
AMD / Mesa https://trac.ffmpeg.org/wiki/Hardware/VAAPI#AMDMesa The Mesa VAAPI driver uses the UVD (Unified Video Decoder) and VCE (Video Coding Engine) hardware found in all recent AMD graphics cards and APUs.
i965 Driver
https://trac.ffmpeg.org/wiki/Hardware/QuickSync#i965vs.iHDDrivervs.libvpllib... Supports VAAPI i965 is packaged as standard in most Linux distributions. Runs on older and cheaper devices. Common API for applications which may also use AMD hardware with Mesa. Interoperable with standard APIs (EGL/OpenGL, OpenCL).
чт, 12 дек. 2024 г., 04:38 Andrew Randrianasulu <[email protected]>:
чт, 12 дек. 2024 г., 04:09 Andrew Randrianasulu <[email protected]>:
чт, 12 дек. 2024 г., 03:11 Terje J. Hanssen <[email protected]>:
Den 12.12.2024 00:46, skrev Andrew Randrianasulu via Cin:
As Terje requested I looked up into amf compilation, _it seems_ it just require headers at compilation stage BUT amdgpu-pro runtime for any real use, and it goes via vulkan anyway ?
https://gpuopen.com/advanced-media-framework/
according to this (official?) site amf encoder component how can be used with mesa's radv driver, so may be less proprietary components can be installed? If whole thing granular enough ....
=====
Version 1.4.34.0
- Added Linux support for DVR sample. - New HEVC header insertion mode. - Stable support for RADV drivers for AMF on Linux in VideoConverter/HQScaler/VideoEncoder and experimental for decoder.
======
https://github.com/GPUOpen-LibrariesAndSDKs/AMF/wiki/Driver%20Linux
this page says you can install just AMF component by using
sudo amdgpu-install -y --usecase=amf
thankfully, there is also uninstall script ;)
but you still need copy of amd headers manually placed in correct location, and also ffmpeg compiled with--enable-amf
notably, ffmpeg 7.1 also gives high bitrate in this case according to
https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/514
ah, it was just changed default ... in ffmpeg 7.1
but hopefully someone can try this manual install script route and report how it behaves ...
as always, "it should work in theory, but ... " see end of https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/457 and some notes there about gentoo ...
Some related sections I have extracted and collected, but not neccessary up to date:
AMD / Mesa The Mesa VAAPI driver uses the UVD (Unified Video Decoder) and VCE (Video Coding Engine) hardware found in all recent AMD graphics cards and APUs. https://trac.ffmpeg.org/wiki/Hardware/VAAPI#AMDMesa
And this reminded me about our interlace problematic: Encoding and interlacing support in Mesa are incompatible because of the data layout in GPU memory. By default, frames are separated into fields and interlaced video is supported but encoding is not. Set the environment variable VAAPI_DISABLE_INTERLACE to 1 to be able to use the encoder (but without any interlaced video support).
AMD/VAAPI https://trac.ffmpeg.org/wiki/HWAccelIntro#PlatformAPIAvailability P Partial support (some devices / some features).
VAAPI https://trac.ffmpeg.org/wiki/HWAccelIntro#VAAPI Video Acceleration API (VAAPI) is a non-proprietary and royalty-free open source software library ("libva") and API specification, initially developed by Intel but can be used in combination with other devices.
It can be used to access the Quick Sync hardware in Intel GPUs (!?)and the UVD/VCE hardware in AMD GPUs. See VAAPI.
AMD UVD/VCE ¶ https://trac.ffmpeg.org/wiki/HWAccelIntro#AMDUVDVCE AMD UVD is usable for decode via VDPAU and VAAPI in Mesa on Linux. VCE also has some initial support for encode via VAAPI, but should be considered experimental.
AMF is effectively supported by FFmpeg to significantly speed up video encoding, decoding, and transcoding via AMD GPUs.
AMD / Mesa https://trac.ffmpeg.org/wiki/Hardware/VAAPI#AMDMesa The Mesa VAAPI driver uses the UVD (Unified Video Decoder) and VCE (Video Coding Engine) hardware found in all recent AMD graphics cards and APUs.
i965 Driver
https://trac.ffmpeg.org/wiki/Hardware/QuickSync#i965vs.iHDDrivervs.libvpllib... Supports VAAPI i965 is packaged as standard in most Linux distributions. Runs on older and cheaper devices. Common API for applications which may also use AMD hardware with Mesa. Interoperable with standard APIs (EGL/OpenGL, OpenCL).
In Arch amf requires amdgpu-pro, which is very problematic though. I have read that amf will be included in ROCm using vulkan and at that point will no longer need the proprietary drivers. I've always had problems with amdgpu-pro so I don't use them. I tried using: env AMD_VULKAN_ICD=RADV ./cinelerra5/cinelerra-5.1/bin/cin and I don't get any errors but the video card doesn't activate and therefore, I think, vulkan doesn't work. If I try to play with CinGG video drivers I get a freeze that forces me to close the program. I'll wait when everything is more stable and working to test, but I don't have much confidence in AMF (as also with vulkan).
If anyone feels like trying AMF there is in git for testing: https://github.com/nowrep/amf-test-linux
чт, 12 дек. 2024 г., 12:20 Andrea paz <[email protected]>:
In Arch amf requires amdgpu-pro, which is very problematic though. I have read that amf will be included in ROCm using vulkan and at that point will no longer need the proprietary drivers. I've always had problems with amdgpu-pro so I don't use them.
I tried using:
env AMD_VULKAN_ICD=RADV ./cinelerra5/cinelerra-5.1/bin/cin
and I don't get any errors but the video card doesn't activate and therefore, I think, vulkan doesn't work.
if it was with internal ffmpeg 7.0 then yes, we do not enable any of those encoders ... even for system's ffmpeg 7.1 you need todefine new encoding profiles, where main complexity in testing lies (IMO) If I try to play with CinGG
video drivers I get a freeze that forces me to close the program.
Same as you reported some time earlier to mesa3d issue tracker?
I'll wait when everything is more stable and working to test, but I don't have much confidence in AMF (as also with vulkan).
thanks for still riding our train ;)
чт, 12 дек. 2024 г., 12:20 Andrea paz <[email protected]>:
In Arch amf requires amdgpu-pro, which is very problematic though.
yeah ... right now AUR pkgbuild most likely does not work due to some reorganization (?) on AMD server ... try to get amd64 deb from https://repo.radeon.com/amdgpu/latest/ubuntu/pool/proprietary/liba/libamdenc... and extract libs from it, put them in some /usr/local/lib (so easy to remove) and see if system ffmpeg was build with amf ? May be firing AUR request for separating libamdenc from rest of amdgpu-pro in pkgbuild specifically might help? Not sure if any one will like to work on this at the end of year ..... I
have read that amf will be included in ROCm using vulkan and at that point will no longer need the proprietary drivers. I've always had problems with amdgpu-pro so I don't use them.
I tried using:
env AMD_VULKAN_ICD=RADV ./cinelerra5/cinelerra-5.1/bin/cin
and I don't get any errors but the video card doesn't activate and therefore, I think, vulkan doesn't work. If I try to play with CinGG video drivers I get a freeze that forces me to close the program.
I'll wait when everything is more stable and working to test, but I don't have much confidence in AMF (as also with vulkan).
чт, 12 дек. 2024 г., 14:07 Andrew Randrianasulu <[email protected]>:
чт, 12 дек. 2024 г., 12:20 Andrea paz <[email protected]>:
In Arch amf requires amdgpu-pro, which is very problematic though.
yeah ... right now AUR pkgbuild most likely does not work due to some reorganization (?) on AMD server ...
try to get amd64 deb from
https://repo.radeon.com/amdgpu/latest/ubuntu/pool/proprietary/liba/libamdenc...
and extract libs from it, put them in some /usr/local/lib (so easy to remove) and see if system ffmpeg was build with amf ?
May be firing AUR request for separating libamdenc from rest of amdgpu-pro in pkgbuild specifically might help? Not sure if any one will like to work on this at the end of year .....
AMF headers at https://github.com/GPUOpen-LibrariesAndSDKs/AMF/releases/download/v1.4.35/AM...
I
have read that amf will be included in ROCm using vulkan and at that point will no longer need the proprietary drivers. I've always had problems with amdgpu-pro so I don't use them.
I tried using:
env AMD_VULKAN_ICD=RADV ./cinelerra5/cinelerra-5.1/bin/cin
and I don't get any errors but the video card doesn't activate and therefore, I think, vulkan doesn't work. If I try to play with CinGG video drivers I get a freeze that forces me to close the program.
I'll wait when everything is more stable and working to test, but I don't have much confidence in AMF (as also with vulkan).
participants (3)
-
Andrea paz -
Andrew Randrianasulu -
Terje J. Hanssen