I am trying to record the screen using FFMPEG. I made it work by adding a USceneCaptureComponent2D and calling the USceneCaptureComponent2D::CaptureScene() method. I get 60fps at 720p but I want to try higher resolution video at higher fps.
I think the performance issue now is that I am basically rendering the screen twice. I only want to copy the memory where the screen pixels are stored, copy them to the CPU memory, and call the pipe method all in the rendering thread. But I could not find such a method in the API. How can I achieve this? How can I get screen pixel values?