I have been exploring Xvfb but honestly did not make it very far yesterday.
Here's what I have gotten to thus far.
Start a Xvfb running firefox:
xvfb-run -n 99 -a --server-args="-screen 0 1024x8000x24 -ac -nolisten tcp -dpi 96 +extension RANDR" /snap/bin/firefox
Start recording with FFMPEG and make available via port 4444:
ffmpeg -video_size 640x1208 -f x11grab -i :99 -c:v libx264 -c:a aac -g 50 -b:v 4000k -maxrate 4000k -bufsize 8000k -f flv -listen 1 rtmp://localhost:4444/stream
Now tune into the virtual frame buffer from linux desktop:
ffplay -fflags -nobuffer -flags low_delay -probesize 32 -flags low_delay -analyzeduration 0 -i rtmp://localhost:4444/stream
Once more refined channels could subscribe to the the 4444 port or might have to uplink to nginx-rtmp (haven't made it this far yet).
Next steps are to get browser automation working via selenium.