QScreenCapture and X11 virtual framebuffer
-
wrote on 7 Apr 2025, 13:28 last edited by RobertB 4 Aug 2025, 02:10
Exotic question time :D
On X11, Xvfb is a tool you can use to start a virtual framebuffer. Within this new display, you can run applications.
sudo xvfb-run --listen-tcp --server-num 99 -s "-nocursor -ac -screen 0 1280x720x24" firefox -kiosk "https://qt.io"
Then, for example, with ffmpeg you could record this by pointing it to DISPLAY 99:
ffmpeg -y -f pulse -framerate 30 -f x11grab -video_size 1280x720 -draw_mouse 0 -i :99 -pix_fmt yuv420p -vcodec libx264 -crf 24 -acodec aac -b:a 128k -movflags +faststart test.mp4
My question is, can we use QScreenCapture to capture DISPLAY 99?
I know
QScreenCapture
usesQScreen
to capture from, but from a quick glance at the documentation, I could not determine how to do the equivalent of ffmpeg's 'x11grab'. -
Hi,
Interesting one !
As is, I don't think so, at least from an "external application" recording point of view.
I think it should work if the application is started on the virtual frame buffer.
1/2