While I am aware of rfbproxy and ffmpeg's x11grab capability, all the examples online seem to be aimed at users wanting to record their own sessions. My usage model is to maintain a (reasonably) trustworthy audit record of remote access to a system.
My problem is how to reconcile the files these create with the session metadata (notably the authenticated username). If the recording is started from within the session then I can capture the username, although this will expose the invocation to the user (e.g. if done via an XDG autostart).
(logging the input events might be a viable alternative to full video recording)
If the start/stop of the recording is not invoked from the users session, then how do I synchronize the start/stop with the beginning/ed of the users session?
Users will be connecting to a Linux desktop (I've not started thinking about how Wayland fits in all this) via VNC.