This is sort of what PipeWire is for, as far as I'm aware. The one advantage of a more monolithic approach (where most of the AV handling is done in the same way as ordinary desktop compositing) is that buffers that originated on the GPU don't need to leave it until very late in the process. If you're really careful, no buffers leave your GPU except encoded complete compositions.
Comments
This is sort of what PipeWire is for, as far as I'm aware. The one advantage of a more monolithic approach (where most of the AV handling is done in the same way as ordinary desktop compositing) is that buffers that originated on the GPU don't need to leave it until very late in the process. If you're really careful, no buffers leave your GPU except encoded complete compositions.
https://pipewire.org/