Coder Social home page Coder Social logo

Comments (161)

jstewart-amd avatar jstewart-amd commented on June 12, 2024 10

For this project, I am basically just the GitHub monkey. I'll ping the AMF team for comment.

from amf.

Xaymar avatar Xaymar commented on June 12, 2024 10

I'm looking forward to adding Linux support to the OBS AMD Encoder.

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 10

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 8

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 7

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.

tnarine-amd avatar tnarine-amd commented on June 12, 2024 6

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 6

Understood. I cannot share the schedule but this is work in progress. But check existing drivers if they work for your OS.

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 5

I cannot comment on dates. It is in progress.

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 5

Coming pretty soon

from amf.

boxerab avatar boxerab commented on June 12, 2024 4

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 4

It is coming.

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 4

Open source driver already has VAAPI and closed source driver will have AMF working on Vulkan.

from amf.

bugz8unny69 avatar bugz8unny69 commented on June 12, 2024 3

So, that's a yes? For HW encoding? in linux?

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 3

In the resent AMF update (v1.4.9) Linux support was added including Linux support in most of samples.

from amf.

nuggs avatar nuggs commented on June 12, 2024 2

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.

cRaZy-bisCuiT avatar cRaZy-bisCuiT commented on June 12, 2024 2

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.

Lucretia avatar Lucretia commented on June 12, 2024 2

Another vote for this.

from amf.

Xaymar avatar Xaymar commented on June 12, 2024 2

Will Linux be using VAAPI or AMD's AMF library? Or will both be available?

from amf.

oscarbg avatar oscarbg commented on June 12, 2024 2

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 2

Few topic to cover:

  1. AMF on Linux is only in Pro driver because it uses closed source Vulkan extensions.
  2. VAAPI is open sourced and is in open source driver.
  3. FFmpeg is an open source project; they do support VAAPI.
  4. 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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 2

More info from Linux team:

  1. For best support for embedded chips you may want to contact your AMD Embedded Solutions representative.
  2. Nobody should use fglrx driver, it is frozen and not supported.
  3. 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.
  4. 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
  5. The documentation is here: https://amdgpu-install.readthedocs.io/en/latest/
  6. 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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 2

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 2

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.

boxerab avatar boxerab commented on June 12, 2024 2

Thanks. Gonna close this after 3+ years :)

from amf.

Xaymar avatar Xaymar commented on June 12, 2024 1

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.

cysin avatar cysin commented on June 12, 2024 1

We really need AMF to work on linux too(we are using CentOS). So is there a schedule for this?

from amf.

bugz8unny69 avatar bugz8unny69 commented on June 12, 2024 1

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.

bugz8unny69 avatar bugz8unny69 commented on June 12, 2024 1

"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.

Xaymar avatar Xaymar commented on June 12, 2024 1

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.

madanm2 avatar madanm2 commented on June 12, 2024 1

Eagerly looking for Pro driver support for ARM platform or Vulkan extension for Encoder :)

from amf.

belmontpier avatar belmontpier commented on June 12, 2024 1

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.

ovr avatar ovr commented on June 12, 2024

@jstewart-amd can you write any notice about plans for it?

from amf.

ovr avatar ovr commented on June 12, 2024

@jstewart-amd Hey bro! Any news? Will be rly cool to know when AMD will support Linux :3
Thanks

from amf.

Xaymar avatar Xaymar commented on June 12, 2024

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

So far AMD did not provide VAAPI encoder, decoder only.

from amf.

Xaymar avatar Xaymar commented on June 12, 2024

Ah okay, so it's probably something that the community mesa driver provides.

from amf.

Xaymar avatar Xaymar commented on June 12, 2024

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.

Shatatel avatar Shatatel commented on June 12, 2024

I wonder how long will it take to implement AMF for Linux?
Hope AMD isn't too late to the party.

from amf.

boxerab avatar boxerab commented on June 12, 2024

Well, these brothers have a lot on their plate at the moment. Hopefully they will get to it.

from amf.

AndrewJDR avatar AndrewJDR commented on June 12, 2024

Another vote for this!

from amf.

Shatatel avatar Shatatel commented on June 12, 2024

Looking forward to some news related to AMF Linux ports.

from amf.

papajo-r avatar papajo-r commented on June 12, 2024

When could we expect AMD Video Encoding (VCE) in OBS Studio / Linux?

from amf.

papajo-r avatar papajo-r commented on June 12, 2024

@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.

cRaZy-bisCuiT avatar cRaZy-bisCuiT commented on June 12, 2024

Does it work now? VCE seems implemented with handbreak now.

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

Why not?

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

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.

bugz8unny69 avatar bugz8unny69 commented on June 12, 2024

Thank you!

from amf.

oscarbg avatar oscarbg commented on June 12, 2024

Nice.. keep us updated on this thread please, @Xaymar ..

from amf.

oscarbg avatar oscarbg commented on June 12, 2024

@Xaymar SDK with Linux support has been shipping for two weeks.. any news on OBS AMD Encoder Linux support?

from amf.

Xaymar avatar Xaymar commented on June 12, 2024

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.

tmm1 avatar tmm1 commented on June 12, 2024

Coming pretty soon

@MikhailAMD Do you still plan to publish SDK sample usage for Linux?

from amf.

cfadeley avatar cfadeley commented on June 12, 2024

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

For open source driver you can look for VAAPI.

from amf.

Lucretia avatar Lucretia commented on June 12, 2024

Why is only VAAPI supported?

from amf.

Lucretia avatar Lucretia commented on June 12, 2024

Why is only VAAPI and therefore libva supported rather than ffmpeg?

from amf.

cfadeley avatar cfadeley commented on June 12, 2024

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.

Lucretia avatar Lucretia commented on June 12, 2024

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

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.

cRaZy-bisCuiT avatar cRaZy-bisCuiT commented on June 12, 2024

MikhailAMD what is the benefit of AMF rather than VAAPI? Is either the performance or quality better?

from amf.

madanm2 avatar madanm2 commented on June 12, 2024

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.

madanm2 avatar madanm2 commented on June 12, 2024

Is Pro driver available for ARM platform?

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

Only x86 or x86-64 :)

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

I don't know Khronos timeline.

from amf.

Aurnytoraink avatar Aurnytoraink commented on June 12, 2024

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

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.

nirbheek avatar nirbheek commented on June 12, 2024

According to Tom Olson, the target release date for the Vulkan standards is first half of 2020.

image-5a78e4de-0707-413f-934f-e955b0b13442

from amf.

Aurnytoraink avatar Aurnytoraink commented on June 12, 2024

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.

Aurnytoraink avatar Aurnytoraink commented on June 12, 2024

@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.

Civil-Code avatar Civil-Code commented on June 12, 2024

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.

boxerab avatar boxerab commented on June 12, 2024

@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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

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.

boxerab avatar boxerab commented on June 12, 2024

Thanks - can the Pro driver be installed on a machine that already has ROCm installed ?

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

Not an expert in the ROCm but according to what I read so far it should work.

from amf.

Shatatel avatar Shatatel commented on June 12, 2024

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.

nyanmisaka avatar nyanmisaka commented on June 12, 2024

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

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.

Shatatel avatar Shatatel commented on June 12, 2024

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.

koreanfan avatar koreanfan commented on June 12, 2024

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

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.

Shatatel avatar Shatatel commented on June 12, 2024

Looks nice. I'll try it out later. Thanks for your work, Mikhail.

from amf.

Aurnytoraink avatar Aurnytoraink commented on June 12, 2024

How do you use ffmpeg to convert a video with amd, and how to screen capture too ?

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

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.

Aurnytoraink avatar Aurnytoraink commented on June 12, 2024

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.

Aurnytoraink avatar Aurnytoraink commented on June 12, 2024

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

My mistake, it is codec, not accelerator: -c:v h264_amf

from amf.

koreanfan avatar koreanfan commented on June 12, 2024

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

My mistake, it is codec, not accelerator: -c:v h264_amf

from amf.

koreanfan avatar koreanfan commented on June 12, 2024

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024
  • 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.

koreanfan avatar koreanfan commented on June 12, 2024

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.

koreanfan avatar koreanfan commented on June 12, 2024

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

Notes:

  1. AMF works via Vulkan private encoder. The fact that games that use Vulkan are running doesn't mean anything.
  2. Vulkan runtime should be from Pro driver. Sometimes there are conflicts and FFmpeg picks up open source version - try to uninstall it.
  3. Does the simple FFmpeg transcode command line work with h264_amf? If not what is the output?
  4. In your command line you didn't include amf. Could you please clarify how it is relevant?

from amf.

koreanfan avatar koreanfan commented on June 12, 2024

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.

koreanfan avatar koreanfan commented on June 12, 2024

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.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

Very strange, dependencies between processes. What is the output for failure?

from amf.

koreanfan avatar koreanfan commented on June 12, 2024

sry i delete that messages with vulkan errors when i reinstall system

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

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.

koreanfan avatar koreanfan commented on June 12, 2024

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.

koreanfan avatar koreanfan commented on June 12, 2024

i saw libvulkan1:amd64 and he was instaled with steam

from amf.

koreanfan avatar koreanfan commented on June 12, 2024

So i need delete package libvulkan1:amd64 1.1.70+dfsg1-1ubuntu0.18.04.1?

from amf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.