Comments (161)
For this project, I am basically just the GitHub monkey. I'll ping the AMF team for comment.
from amf.
I'm looking forward to adding Linux support to the OBS AMD Encoder.
from amf.
Once Khronos finishes Vulkan extensions for encoder and decoder and Vulkan open source driver implements them we plan to make an open source version of AMF for amdgpu driver.
from amf.
See, I am responsible for AMF runtime but several other driver components are involved. They don't want to publicly state their schedule, which may change based on other projects. I was assured that they are committed to finish the work in reasonable time.
It is all relative. Compare to which card?
from amf.
There is a lot of work on kernel mode and user mode drivers. AMF runtime is an easy part. We are working on this. No comments on the date and feature set.
from amf.
Your request has been forwarded to the AMF developers. Unfortunately, we are unable to provide any information on LINUX AMF support but we really appreciate you sending this feedback.
from amf.
Understood. I cannot share the schedule but this is work in progress. But check existing drivers if they work for your OS.
from amf.
I cannot comment on dates. It is in progress.
from amf.
Coming pretty soon
from amf.
Any updates on plans for linux port ? I am thinking of starting a port myself, but if there is already some work done at AMD, it would be nice to know this before I get started.
from amf.
It is coming.
from amf.
Open source driver already has VAAPI and closed source driver will have AMF working on Vulkan.
from amf.
So, that's a yes? For HW encoding? in linux?
from amf.
In the resent AMF update (v1.4.9) Linux support was added including Linux support in most of samples.
from amf.
I'm assuming by unable to provide any information on GNU/Linux AMF support but thanks for the feedback that you mean it's not going to come? If that's the case, wouldn't it be better to close the ticket so people don't get their hopes up?
Otherwise, I'm a bit confused by there not going to be information about it but the ticket still being open like there might be information about it...
from amf.
When could we expect AMD Video Encoding (VCE) in OBS Studio / Linux? It's about time!
PS: For me it works using...
ffmpeg -vaapi_device /dev/dri/renderD129 -i input.mp4 -vf 'format=nv12,hwupload' -c:v h264_vaapi output.mkv
Can't that feature being used on OBS?
from amf.
Another vote for this.
from amf.
Will Linux be using VAAPI or AMD's AMF library? Or will both be available?
from amf.
in fact is here with amdgpu-pro 18.30:
amf-amdgpu-pro_1.4.9-633530_amd64.deb
installs at /opt/amdgpu-pro/lib/x86_64-linux-gnu:
lrwxrwxrwx 1 root root 15 Aug 3 19:47 libamfrt64.so -> libamfrt64.so.1
lrwxrwxrwx 1 root root 19 Aug 3 19:47 libamfrt64.so.1 -> libamfrt64.so.1.4.9
-rw-r--r-- 1 root root 3397408 Aug 3 19:47 libamfrt64.so.1.4.9
@MikhailAMD can update SDK with some sample for Linux?
from amf.
Few topic to cover:
- AMF on Linux is only in Pro driver because it uses closed source Vulkan extensions.
- VAAPI is open sourced and is in open source driver.
- FFmpeg is an open source project; they do support VAAPI.
- FFmpeg supports AMF on Windows. For AMF support on Linux the patch is in pipeline but FFmpeg review person is not committing our changes for several months, while agreed with them in principle. We are kind of blocked here.
from amf.
More info from Linux team:
- For best support for embedded chips you may want to contact your AMD Embedded Solutions representative.
- Nobody should use fglrx driver, it is frozen and not supported.
- VAAPI is supported on "radeon" (Pro) and "amdgpu". amdgpu should be used for Volcanic Islands and newer. Radeon should be used for Southern Islands and older.
- Embedded customers should use the All-Open (amdgpu) in almost all cases. The Pro driver is for Workstation and has no benefits for embedded. The Pro (radeon) driver is not tested on APUs
- The documentation is here: https://amdgpu-install.readthedocs.io/en/latest/
- gstreamer vaapi support should be installed by default with recent desktop installs of Ubuntu. For development one would need to install dev support for ffmpeg or gstreamer, all available from the distro.
from amf.
Performance is defined by HW. AMF and VAAPI just two APIs accessing the same.
One important difference though that on Linux AMF works via Vulkan and can be tightly integrated with Vulkan app.
And AMF exists on Windows and on Linux while VAAPI is Linux only
from amf.
PRO driver has AMF runtime for optional install and AMF SDK supports this. But I guess OBS still needs to do some work for Linux-specific integration.
from amf.
Thanks. Gonna close this after 3+ years :)
from amf.
This is probably a question that isn't exactly related to this SDK, but does VAAPI encoding work well enough to be used with official AMD drivers on linux (debian, ubuntu)?
from amf.
We really need AMF to work on linux too(we are using CentOS). So is there a schedule for this?
from amf.
The ending to this thread is a bit confusing. AMF is coming to Linux but by judging from your response, there's already VAAPI and somehow closed source AMF will do something with Vulkan? I am even more confused. I don't know what's the purpose of AMF on Linux. And VAAPI, you've indicated few times, is a community project not directly supported by AMD. People in past have been reluctant to support VAAPI because, apparently it's not stable enough. Sooo, even more confused again.
from amf.
"This forum is for AMF so I would leave VAAPI aside"
I asked "So, that's a yes? For HW encoding? in linux?" So AMF is not coming to linux?
from amf.
For 4. on your first reply, there is currently no maintainer for amfenc.c, amfenc.h, amfenc_h264.c, amfenc_h265.c listed in the maintainers file. That means that merging of patches takes significantly longer, unless a maintainer steps up to verify each patch for backwards incompatibility and similar changes. I was told this in reply to my own submission of a patch, which is also waiting for verification.
from amf.
Eagerly looking for Pro driver support for ARM platform or Vulkan extension for Encoder :)
- Looking at performance results shared in OBS using AMF below, matches 3 presets available in AMF
https://github.com/obsproject/obs-amd-encoder/wiki/Hardware-VCE3.4 - In VAAPI path, compression_level and quality presets available doesn't seem to vary performance much. we only achieve performance of "quality" preset.
from amf.
running rocm 3 and tried to install amdgpu-pro. It is impossible. Please test on your own. It is very bad for Deep Learning, this way noone can run the ffmpeg h264 in the AMD GPU. Please test and fix it. With NVIDIA its been always possible to run Deep Learning Object Detection and h264 encoding in the same GPU. With AMD, never. Why not just add the AMF and VAAPI, ffmpeg support to rocm if rocm and amdgpu cant work on the same machine? 2020 mid January..
from amf.
@jstewart-amd can you write any notice about plans for it?
from amf.
@jstewart-amd Hey bro! Any news? Will be rly cool to know when AMD will support Linux :3
Thanks
from amf.
This would really be nice to have in the future. On Linux all the APIs that would be needed are Host, Vulkan and OpenGL, with Vulkan being optional / in the future.
from amf.
So far AMD did not provide VAAPI encoder, decoder only.
from amf.
Ah okay, so it's probably something that the community mesa driver provides.
from amf.
You are asking in the wrong place. Someone has already started a vaapi plugin: https://obsproject.com/forum/threads/experimental-ffmpeg-vaapi-plugin.61529/
from amf.
I wonder how long will it take to implement AMF for Linux?
Hope AMD isn't too late to the party.
from amf.
Well, these brothers have a lot on their plate at the moment. Hopefully they will get to it.
from amf.
Another vote for this!
from amf.
Looking forward to some news related to AMF Linux ports.
from amf.
When could we expect AMD Video Encoding (VCE) in OBS Studio / Linux?
from amf.
@MikhailAMD Is there any rough guesstimate like "most likely within Q1 2018" or "when kernel version 4.15 releases" or something like that? Also is it true that the encoding performance of VCE is lower for polaris cards like the rx 480?
from amf.
Does it work now? VCE seems implemented with handbreak now.
from amf.
Why not?
from amf.
This forum is for AMF so I would leave VAAPI aside.
When an app does encoding or decoding using HW often it is about making GPU pipeline. For example render game, apply color conversion, submit to HW encoder.
For maximum throughoutput and minimum latency it is important that frames stay in video memory and are not transferred to system memory and back. To achieve this all components of video pipeline should use the same API. For AMF on Windows it is D3D9 or D3D11. Also OpenCL has interop with both as well as with OpenGL. On Linux our choice is Vulkan. It provides best access to GFX and Compute HW queues and maximally suites multimedia needs. Note that AMF will support Vulkan on Windows as well. If an application submits a frame in system memory, choice of API doesn't really matter.
from amf.
AMF is coming on Linux. It will provide access to HW encoding and decoding on AMD GPUs with submission of Vulkan 2d images or host/system memory.
from amf.
Thank you!
from amf.
Nice.. keep us updated on this thread please, @Xaymar ..
from amf.
@Xaymar SDK with Linux support has been shipping for two weeks.. any news on OBS AMD Encoder Linux support?
from amf.
There are no Debian drivers. AMD only allows Ubuntu users to install their drivers, so the only thing that I can use is VAAPI, and someone already made a plugin for that.
from amf.
Coming pretty soon
@MikhailAMD Do you still plan to publish SDK sample usage for Linux?
from amf.
Is this only supported by the AMDGPU-PRO driver? I'm using an embedded amd chipset (E91xx) which only has the amdgpu driver available from what I can tell.
from amf.
For open source driver you can look for VAAPI.
from amf.
Why is only VAAPI supported?
from amf.
Why is only VAAPI and therefore libva supported rather than ffmpeg?
from amf.
We are investigating use of VAAPI on embedded chipsets. Do you know if it will work with both the open source 'radeon' driver and the AMD Catalyst 'fglrx' driver on older GPUs? Has it been tested on newer GPUs with the 'amdgpu' driver. I'm having difficulty finding resources online specific for AMD gpus w/ VAAPI.
from amf.
Few topic to cover:
1. AMF on Linux is only in Pro driver because it uses closed source Vulkan extensions.
Which is a problem.
from amf.
We have a person who can be a maintainer by we need to introduce AMF context to share instance of AMF between encoder, decoder and converter but it is UTIL area not AMFENC.
from amf.
MikhailAMD what is the benefit of AMF rather than VAAPI? Is either the performance or quality better?
from amf.
Once Khronos finishes Vulkan extensions for encoder and decoder and Vulkan open source driver implements them we plan to make an open source version of AMF for amdgpu driver.
@MikhailAMD , any idea when vulkan extension for encoder and decoder would be available?
from amf.
Is Pro driver available for ARM platform?
from amf.
Only x86 or x86-64 :)
from amf.
I don't know Khronos timeline.
from amf.
So 4 months later, what are the news ?
I'm interested to see coming this OBS because actually I use VAAPI but it's not really using the GPU and I can't reach 1080p60fps smooth video
from amf.
OBS can integrate AMF via Vulkan on Linux with Radeon Pro driver. I cannot comment here on VAAPI integration/implementation. Khronos didn't release spec for video encoder yet.
from amf.
According to Tom Olson, the target release date for the Vulkan standards is first half of 2020.
from amf.
According to Tom Olson, the target release date for the Vulkan standards is first half of 2020.
2020, I think I have to wait 😢
from amf.
@MikhailAMD Oh ? So now if I install AMDGPU-PRO driver it will work ?
Also, I know that AMD didn't provide an official release for Arch Linux but we can find AUR packages of that drivers
from amf.
The prerequisites in the Readme file still refer to Windows as the only supported operating system:
https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/README.md
from amf.
@MikhailAMD I'm a little confused here - are you able to summarize current linux support for HW decode on AMD hardware ? For example, with ROCm installed, and Polaris card. Thank you :)
from amf.
ROCm is not relevant to AMF.
On Linux you will need Pro driver + Vulkan + AMF package.
Download: https://www.amd.com/en/support/kb/release-notes/rn-rad-lin-19-50-unified
Pro installation: https://amdgpu-install.readthedocs.io/en/latest/install-installing.html#installing-the-pro-variant
Install AMF: sudo apt install amf-amdgpu-pro
from amf.
Thanks - can the Pro driver be installed on a machine that already has ROCm installed ?
from amf.
Not an expert in the ROCm but according to what I read so far it should work.
from amf.
I've tried to launch it with Ubuntu 18.04 Kernel: x86_64 Linux 5.3.0-28-generi
CPU: Intel Xeon E3-1225 v3 @ 4x 3.6GHz
GPU: AMD/ATI Ellesmere [Radeon RX 470/480/570/570X/580/580X], Pilot
How can I find proper combination?
Error! Bad return status for module build on kernel: 5.3.0-28-generic (x86_64) Consult /var/lib/dkms/amdgpu/19.50-967956/build/make.log for more information.
Here it is
DKMS make.log for amdgpu-19.50-967956 for kernel 5.3.0-28-generic (x86_64) Вт фев 11 11:06:42 MSK 2020 make: Entering directory '/usr/src/linux-headers-5.3.0-28-generic' CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/scheduler/sched_main.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_drm.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_memory.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/main.o In file included from /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/../include/../backport/backport.h:8:0, from <command-line>:0: /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/../backport/include/kcl/kcl_amdgpu.h: In function ‘kcl_amdgpu_get_vblank_timestamp_kms’: /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/../backport/include/kcl/kcl_amdgpu.h:99:9: error: implicit declaration of function ‘amdgpu_get_vblank_timestamp_kms’; did you mean ‘kcl_amdgpu_get_vblank _timestamp_kms’? [-Werror=implicit-function-declaration] return amdgpu_get_vblank_timestamp_kms(dev, pipe, max_error, vblank_time, flags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kcl_amdgpu_get_vblank_timestamp_kms CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_tt.o /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.c: At top level: /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.c:1449:26: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .get_vblank_timestamp = kcl_amdgpu_get_vblank_timestamp_kms, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.c:1449:26: note: (near initialization for ‘kms_driver.get_vblank_timestamp’) /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.c:1450:26: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .get_scanout_position = kcl_amdgpu_get_crtc_scanout_position, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.c:1450:26: note: (near initialization for ‘kms_driver.get_scanout_position’) CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/symbols.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/scheduler/sched_fence.o cc1: some warnings being treated as errors CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_fence.o scripts/Makefile.build:288: recipe for target '/var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.o' failed make[2]: *** [/var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.o] Error 1 scripts/Makefile.build:519: recipe for target '/var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu' failed make[1]: *** [/var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu] Error 2 make[1]: *** Waiting for unfinished jobs.... CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_fence_array.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_drm_cache.o /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_fence.c:63:1: warning: ‘dma_fence_test_signaled_any’ defined but not used [-Wunused-function] dma_fence_test_signaled_any(struct dma_fence **fences, uint32_t count, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/scheduler/sched_entity.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_reservation.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_bo.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_device_cgroup.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_pci.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_suspend.o LD [M] /var/lib/dkms/amdgpu/19.50-967956/build/scheduler/amd-sched.o /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_pci.c: In function ‘amdkcl_pci_init’: /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_pci.c:189:84: warning: passing argument 2 of ‘amdkcl_fp_setup’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] _kcl_pcie_link_speed = (const unsigned char *) amdkcl_fp_setup("pcie_link_speed", _kcl_pcie_link_speed_stub); ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_pci.c:3:0: /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_common.h:23:21: note: expected ‘void *’ but argument is of type ‘const unsigned char *’ static inline void *amdkcl_fp_setup(const char *symbol, void *fp_stup) ^~~~~~~~~~~~~~~ CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_perf_event.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_perf_event.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_kthread.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_mm.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_mn.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_io.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_bo_util.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_workqueue.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_bo_vm.o LD [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/amdkcl.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_module.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_execbuf_util.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_page_alloc.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_bo_manager.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_page_alloc_dma.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_agp_backend.o LD [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/amdttm.o Makefile:1655: recipe for target '_module_/var/lib/dkms/amdgpu/19.50-967956/build' failed make: *** [_module_/var/lib/dkms/amdgpu/19.50-967956/build] Error 2 make: Leaving directory '/usr/src/linux-headers-5.3.0-28-generic'
Same here for your convinience https://pastebin.com/WneC2bsV
from amf.
I've tried to launch it with Ubuntu 18.04 Kernel: x86_64 Linux 5.3.0-28-generi
CPU: Intel Xeon E3-1225 v3 @ 4x 3.6GHz
GPU: AMD/ATI Ellesmere [Radeon RX 470/480/570/570X/580/580X], PilotHow can I find proper combination?
Error! Bad return status for module build on kernel: 5.3.0-28-generic (x86_64) Consult /var/lib/dkms/amdgpu/19.50-967956/build/make.log for more information.
Here it is
DKMS make.log for amdgpu-19.50-967956 for kernel 5.3.0-28-generic (x86_64) Вт фев 11 11:06:42 MSK 2020 make: Entering directory '/usr/src/linux-headers-5.3.0-28-generic' CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/scheduler/sched_main.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_drm.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_memory.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/main.o In file included from /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/../include/../backport/backport.h:8:0, from <command-line>:0: /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/../backport/include/kcl/kcl_amdgpu.h: In function ‘kcl_amdgpu_get_vblank_timestamp_kms’: /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/../backport/include/kcl/kcl_amdgpu.h:99:9: error: implicit declaration of function ‘amdgpu_get_vblank_timestamp_kms’; did you mean ‘kcl_amdgpu_get_vblank _timestamp_kms’? [-Werror=implicit-function-declaration] return amdgpu_get_vblank_timestamp_kms(dev, pipe, max_error, vblank_time, flags); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kcl_amdgpu_get_vblank_timestamp_kms CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_tt.o /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.c: At top level: /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.c:1449:26: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .get_vblank_timestamp = kcl_amdgpu_get_vblank_timestamp_kms, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.c:1449:26: note: (near initialization for ‘kms_driver.get_vblank_timestamp’) /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.c:1450:26: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .get_scanout_position = kcl_amdgpu_get_crtc_scanout_position, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.c:1450:26: note: (near initialization for ‘kms_driver.get_scanout_position’) CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/symbols.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/scheduler/sched_fence.o cc1: some warnings being treated as errors CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_fence.o scripts/Makefile.build:288: recipe for target '/var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.o' failed make[2]: *** [/var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu/amdgpu_drv.o] Error 1 scripts/Makefile.build:519: recipe for target '/var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu' failed make[1]: *** [/var/lib/dkms/amdgpu/19.50-967956/build/amd/amdgpu] Error 2 make[1]: *** Waiting for unfinished jobs.... CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_fence_array.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_drm_cache.o /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_fence.c:63:1: warning: ‘dma_fence_test_signaled_any’ defined but not used [-Wunused-function] dma_fence_test_signaled_any(struct dma_fence **fences, uint32_t count, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/scheduler/sched_entity.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_reservation.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_bo.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_device_cgroup.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_pci.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_suspend.o LD [M] /var/lib/dkms/amdgpu/19.50-967956/build/scheduler/amd-sched.o /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_pci.c: In function ‘amdkcl_pci_init’: /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_pci.c:189:84: warning: passing argument 2 of ‘amdkcl_fp_setup’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] _kcl_pcie_link_speed = (const unsigned char *) amdkcl_fp_setup("pcie_link_speed", _kcl_pcie_link_speed_stub); ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_pci.c:3:0: /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_common.h:23:21: note: expected ‘void *’ but argument is of type ‘const unsigned char *’ static inline void *amdkcl_fp_setup(const char *symbol, void *fp_stup) ^~~~~~~~~~~~~~~ CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_perf_event.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_perf_event.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_kthread.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_mm.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_mn.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_io.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_bo_util.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/kcl_workqueue.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_bo_vm.o LD [M] /var/lib/dkms/amdgpu/19.50-967956/build/amd/amdkcl/amdkcl.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_module.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_execbuf_util.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_page_alloc.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_bo_manager.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_page_alloc_dma.o CC [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/ttm_agp_backend.o LD [M] /var/lib/dkms/amdgpu/19.50-967956/build/ttm/amdttm.o Makefile:1655: recipe for target '_module_/var/lib/dkms/amdgpu/19.50-967956/build' failed make: *** [_module_/var/lib/dkms/amdgpu/19.50-967956/build] Error 2 make: Leaving directory '/usr/src/linux-headers-5.3.0-28-generic'
Same here for your convinience https://pastebin.com/WneC2bsV
Currently amdgpu-pro only supports the default kernel version on Ubuntu 18.04 LTS. In a few months, Ubuntu 20.04 LTS will be released with a 5.4 kernel. I think that AMD will update the driver to support higher kernel versions.
https://ubuntu.com/about/release-cycle
from amf.
I've got it.
Ubuntu 18.04.4 goes with 5.3.0-28 kernel version afaik.
I'd be glad to see it working out of the box in Ubuntu distros.
from amf.
I have ubunut 18.04.4 with installed amdgpu-pro and amf-amdgpu-pro. h264_amf works via ffmpeg. I install obs 25.0.8. How i can use for streaming and recording amd amf via obs? For streaming and recording i use VAAPI via ffmpeg:
DRI_PRIME=1 LIBVA_DRIVER_NAME=radeonsi ffmpeg -y
-hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi
-framerate 30 -video_size 1920x1050 -f x11grab -i :0.0 -f pulse -ac 2 -i default
-vf 'hwupload,scale_vaapi=w=1280:h=720:format=nv12'
-vcodec h264_vaapi -g 60 -sei identifier+timing+recovery_point
-bsf:v extract_extradata -b:v 3M -maxrate 3M -c:a aac -b:a 128k -ar 44100
-f flv OUTPUT
How this code must be if i want use h26_amf?
from amf.
If it works with regular FFmpeg, the command line for OBS should be similar: "-hwaccel h264_amf" but I didn't try OBS on Linux.
from amf.
Looks nice. I'll try it out later. Thanks for your work, Mikhail.
from amf.
How do you use ffmpeg to convert a video with amd, and how to screen capture too ?
from amf.
In FFmpeg command line you could use "-hwaccel h264_amf" to enable AMF hardware encoder inf you installed AMD Pro with with AMF. Here is more info for other variants: https://trac.ffmpeg.org/wiki/HWAccelIntro
For capture you would need an application, for example OBS.
from amf.
Hmm, doing the command ffmpeg -hwaccels
doesn't show me that h264_amf is avaible.
Here is the output:
vdpau
vaapi
drm
opencl
vulkan
from amf.
And when I do ffmpeg -codecs | grep h264
, it returns:
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m libopenh264 ) (encoders: libx264 libx264rgb libopenh264 h264_amf h264_omx h264_v4l2m2m h264_vaapi )
from amf.
My mistake, it is codec, not accelerator: -c:v h264_amf
from amf.
Hmm, doing the command
ffmpeg -hwaccels
doesn't show me that h264_amf is avaible.
Here is the output:vdpau vaapi drm opencl vulkan
what version of ffmpeg and linux you use?
from amf.
My mistake, it is codec, not accelerator: -c:v h264_amf
from amf.
i launch this command on my ubuntu 18.04.4 with latest ffmpeg compiled form source and i got:
Hardware acceleration methods:
vdpau
vaapi
Is vulkan must presented in this list for my configuration?
from amf.
- Which GFX driver do you have?
- if AMD Pro, did you install AMF package?
- did you build FFmpeg with AMF?
- Did you try command line: "FFmpeg -codecs" ?
from amf.
Btw, yesterday i test amdgpu-pro 20.10 on ubuntu, ubuntu-mate, xubuntu and lubuntu. I have got fail launch xubuntu and lubuntu after sucessfull installing amdgpu-pro with legacy opencl for my rx560 and rebooting. On ubuntu and ubuntu-mate i have got success. i use distros isos with version 18.04.4. After on ubuntu and ubuntu-mate i install amf. Then i compile ffmpeg with --enable-amf and copy files from AMF/..... to /usr/include/AMF/ . But i have fail. So to fix this i install libunistring-dev. After that i have successfully installed ffmpeg with amf. But when i start record my screen via ffmpeg with h264_amf i have fail. I have errors vulcan not inicial and some vulkan files not found. But amdgpu-pro worked and i start dota 2 with pro-vulcan and game works perfectly ( bwt with mesa drivers and opensource vulkan i cant play dota 2 normally cuz i always have laggs and freezes, and i dont know how to fix this problem with open stack). So to fix problem with using amf via ffmpeg you need use simple code somthing like that:
ffmpeg -y -framerate 60 -f x11grab -i :0.0 -f alsa -ac 2 -i default
-c:v h264 -b:v 6M -f flv h264.flv
I dont know how, but after using h264 you can use h264_amf via ffmpeg without any trouble. And in fmpeg logs vulkan successfully initialized and all files are found.
from amf.
Yeah i install amdgpu-pro and amf package and buid it with enable amf and ffmpeg -codecs:
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m ) (encoders: libx264 libx264rgb h264_amf h264_v4l2m2m h264_vaapi )
D.VIL. hap Vidvox Hap
DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (encoders: libx265 hevc_amf hevc_vaapi )
from amf.
Notes:
- AMF works via Vulkan private encoder. The fact that games that use Vulkan are running doesn't mean anything.
- Vulkan runtime should be from Pro driver. Sometimes there are conflicts and FFmpeg picks up open source version - try to uninstall it.
- Does the simple FFmpeg transcode command line work with h264_amf? If not what is the output?
- In your command line you didn't include amf. Could you please clarify how it is relevant?
from amf.
ffmpeg -y -loglevel debug -framerate 60 -f x11grab -i :0.0 -f alsa -ac 2 -i default
-c:v h264_amf -b:v 6M -f flv amf.flv -- for simple record desktop
But if you before dont run command ffmpeg -y -framerate 60 -f x11grab -i :0.0 -f alsa -ac 2 -i default
-c:v h264 -b:v 6M -f flv h264.flv wich use h264 , you cant use amf, you willbe got errors!!!
from amf.
ffmpeg -buildconf
ffmpeg version N-97814-g6275a7e Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/home/XXXX/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/XXXX/ffmpeg_build/include --extra-ldflags=-L/home/XXXX/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/XXXX/bin --enable-gpl --enable-gnutls --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-amf --enable-nonfree
libavutil 56. 46.100 / 56. 46.100
libavcodec 58. 84.100 / 58. 84.100
libavformat 58. 43.100 / 58. 43.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 81.100 / 7. 81.100
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
configuration:
--prefix=/home/XXXX/ffmpeg_build
--pkg-config-flags=--static
--extra-cflags=-I/home/XXXX/ffmpeg_build/include
--extra-ldflags=-L/home/XXXX/ffmpeg_build/lib
--extra-libs='-lpthread -lm'
--bindir=/home/XXXX/bin
--enable-gpl
--enable-gnutls
--enable-libass
--enable-libfdk-aac
--enable-libfreetype
--enable-libmp3lame
--enable-libopus
--enable-libvorbis
--enable-libvpx
--enable-libx264
--enable-libx265
--enable-amf
--enable-nonfree
from amf.
Very strange, dependencies between processes. What is the output for failure?
from amf.
sry i delete that messages with vulkan errors when i reinstall system
from amf.
Everything what you provided so far looks normal - except this strange run dependecy. My feeling is that if AMF failed to initialize Vulkan - it found a wrong driver. This cannot be controlled from AMF but by Vulkan installations.
from amf.
sudo dpkg --list | grep vulkan
ii libvulkan1:amd64 1.1.70+dfsg1-1ubuntu0.18.04.1 amd64 Vulkan loader library
ii vulkan-amdgpu-pro:amd64 20.10-1048554 amd64 AMDGPU Pro Vulkan driver
ii vulkan-amdgpu-pro:i386 20.10-1048554 i386 AMDGPU Pro Vulkan driver
from amf.
i saw libvulkan1:amd64 and he was instaled with steam
from amf.
So i need delete package libvulkan1:amd64 1.1.70+dfsg1-1ubuntu0.18.04.1?
from amf.
Related Issues (20)
- [Question]: How to import AMF SDK into a QT project? HOT 2
- Missing documentation AMF_VE_FCR_RADIUS HOT 1
- [Bug]: Unable to make AMF encoder to follow specified CBR bitrate. Filler data parameter is ignored for CBR in some cases.
- [Question]: Every 4 seconds of recording gets blury HOT 19
- [Question]: (H)QVBR mode on Ryzen 5 8600G with AV1 HOT 6
- [Bug]: MJPEG decoder crashes with some JPEGs HOT 2
- Encoding from D3D RGBA/BGRA surfaces (encoder fails to init) HOT 3
- [Bug]: RX7600 AV1 Decoder crashes HOT 1
- Handling encoder output status after Flush() HOT 6
- AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE reports always frame type either 'NONE' or 'IDR' HOT 3
- [Bug]: AMD DX12 video encode driver bug?: Error using new FFMPEG HEVC D3D12 encoder support in Intel cartwheel repo.. HOT 2
- [Request]: Help Plex get full video decoding working for AMD products. HOT 1
- [Bug]: HEVC decode crashes driver on D3D12
- [Question]: What are the maximum specifications for the MJPEG decoder? HOT 4
- [Question]: How to set 'low latency mode' for decoder? HOT 2
- [Bug]: CapabilityManager fails to create vulkan device "vkCreateDevice() failed, Error=-7" with RADV HOT 2
- [Question]: How to I install AMF? HOT 4
- Trouble installing AMF? HOT 1
- [Bug]: HEVC/AV1 decode crashes driver HOT 3
- [Request]: Add YUV 444 encoding/decoding for high quality video HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amf.