My goal is to render the web as a video stream on linux and the requirements for rendering speed are relatively high.
There are two ways to render the web as a video stream.
One is to use xvfb or other virtual desktops and obtain the screen and encode to a video.
Another is to use offscreen rendering by rewriting OnPaint() and encode.
In my computer on windows,I did tests,and I need to run my program on linux.
In onscreen rendering mode, the frame rate can reach 120fps+. However, in off screen rendering mode, the frame rate is only 29-30fps.
But if I use onscreen rendering mode,I also need to obtain the screen content and encode to a video.This seems to be a waste of computing resources. If I use off screen rendering mode,the speed is not ideal.
If I want to use off screen rendering on linux, what can I do to improve the fps?
It is hard to decide which to use?Hope to receive your advice.