GPUOpen-LibrariesAndSDKs / AMF

The Advanced Media Framework (AMF) SDK provides developers with optimal access to AMD devices for multimedia processing
Other
610 stars 152 forks source link

Support for Linux #4

Closed boxerab closed 3 years ago

boxerab commented 8 years ago

For video transcoding, Linux is an ideal platform. And for this use case, no Vulkan support is necessary, just access to hardware decode/encode.

ovr commented 8 years ago

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

jstewart-amd commented 8 years ago

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

ovr commented 8 years ago

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

Xaymar commented 8 years ago

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.

tnarine-amd commented 8 years ago

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.

Xaymar commented 7 years ago

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)?

MikhailAMD commented 7 years ago

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

Xaymar commented 7 years ago

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

nuggs commented 7 years ago

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

cRaZy-bisCuiT commented 7 years ago

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?

Xaymar commented 7 years ago

You are asking in the wrong place. Someone has already started a vaapi plugin: https://obsproject.com/forum/threads/experimental-ffmpeg-vaapi-plugin.61529/

Shatatel commented 7 years ago

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

boxerab commented 7 years ago

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

AndrewJDR commented 7 years ago

Another vote for this!

boxerab commented 7 years ago

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.

Shatatel commented 7 years ago

Looking forward to some news related to AMF Linux ports.

MikhailAMD commented 7 years ago

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.

papajo-r commented 6 years ago

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

MikhailAMD commented 6 years ago

I cannot comment on dates. It is in progress.

papajo-r commented 6 years ago

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

MikhailAMD commented 6 years ago

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?

cysin commented 6 years ago

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

MikhailAMD commented 6 years ago

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

Lucretia commented 6 years ago

Another vote for this.

cRaZy-bisCuiT commented 6 years ago

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

MikhailAMD commented 6 years ago

It is coming.

Xaymar commented 6 years ago

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

MikhailAMD commented 6 years ago

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

bugz8unny69 commented 6 years ago

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

MikhailAMD commented 6 years ago

Why not?

bugz8unny69 commented 6 years ago

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.

MikhailAMD commented 6 years ago

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.

bugz8unny69 commented 6 years ago

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

MikhailAMD commented 6 years ago

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.

bugz8unny69 commented 6 years ago

Thank you!

oscarbg commented 6 years ago

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?

MikhailAMD commented 6 years ago

Coming pretty soon

Xaymar commented 6 years ago

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

oscarbg commented 6 years ago

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

oscarbg commented 6 years ago

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

Xaymar commented 6 years ago

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.

tmm1 commented 6 years ago

Coming pretty soon

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

MikhailAMD commented 6 years ago

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

cfadeley commented 5 years ago

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.

MikhailAMD commented 5 years ago

For open source driver you can look for VAAPI.

Lucretia commented 5 years ago

Why is only VAAPI supported?

Lucretia commented 5 years ago

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

cfadeley commented 5 years ago

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.

MikhailAMD commented 5 years ago

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.
MikhailAMD commented 5 years ago

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.