Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a functionality to capture screen directly and encode at GPU buffer memory?? #156

Closed
js21c opened this issue Apr 15, 2019 · 9 comments

Comments

@js21c
Copy link

js21c commented Apr 15, 2019

I'm trying to develop game screen capture and transfer mode.
To achieve low latency, I want to capture frames and encode directly at GPU buffer memory level without copying screen buffer to system memory.
I know that DEC mode is vanished.
Are there any similar modes at SDK?

@MikhailAMD
Copy link
Collaborator

Yes, it is possible. There is MSFT's Desktop Duplication API to capture screen. It works reasonably well and one can wrap the captured D3D11 texture into AMF surface, make a GPU copy and continue with AMF color converter and encoder. We plan to publish am AMF sample with simple implementation.

@tobi-tobsen
Copy link

That sample would be much appreciated, looking forward to it!

@roman380
Copy link

amf\public\src\components\DisplayCapture already has code which is basically wrapping DD API into AMF component. If my memory serves me right DVR sample shows how to use it (source code definitely has traces that it was/is working).

@MikhailAMD
Copy link
Collaborator

Yes, thanks.

@MikhailAMD
Copy link
Collaborator

Closed as answered

@npip99
Copy link

npip99 commented Jun 21, 2020

@MikhailAMD Is there a similar API for Linux?

@tobi-tobsen
Copy link

I just scrolled through the header and CPP file @MikhailAMD linked and saw that it is not using windows Dxgi screenduplikation but AMFCreateComponentDisplayCapture.

If something like that was working on Linux too, this would give AMD an edge over competitors imo (currently this is not possible under Linux afaik and you would have to use systemmemory to grab the screen and the reupload to the GPU for encoding).

@MikhailAMD
Copy link
Collaborator

I hear you :)

@gitautas
Copy link

Has anything changed since? Is there a way to do this on Linux?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants