How to capture PC screen and record audio in UWP?

2k views Asked by At

I am new in developing UWP apps. I have recently developed desktop application for screen recording which captures the screen, records audio. For this I have used some filters from the DirectShowLib, WindowsMediaLib.

Now to build the same application in UWP, I am not getting any clue from where to start and also not finding the API's in UWP that will help me. Anyone knows, please help me...

2

There are 2 answers

2
Péter Bozsó On BEST ANSWER

There's no way to do that in UWP. Please see the answer here. The answer there talks about taking a screenshot, but the same is true for capturing system video/audio output in a UWP app:

As a sandbox technology it will not allow capture the whole system's screen. It does not meet the security reason of UWP sandbox. If you want to do this you may have to consider develop a desktop app and then convert and use our Desktop Converter technology.

Of course this way your app won't be truly portable, it will only work on desktop Windows, but as I understand from your question, you already have such a desktop app developed. This way, you can convert it to a UWP app so you'll be able to upload it to the Store, thus increasing the reach (in terms of users) of your application.

12
James Hancock On

The accepted answer is no longer true. As of April 2018 version of Windows 10, version 1803, you can now capture the screen and record audio.

Screen capture (Windows.Graphics.Capture namespace)

The part that I haven't figured out is how to record that to an mp4 file.