

Also depends if FFmpeg supports it. Wayland is not mentioned in the Documentation.
https://ffmpeg.org/ffmpeg-devices.html
Edit: Different comment mentioned the wf-recorder, which uses FFmpeg’s libraries but not the CLI utility, so I guess that’s the closest you can get to using FFmpeg. They also show some CLI usage.
I used to do this (before my server died). You can for example use this to bypass Proton’s free tier one user per account limit.
Basically it’s about correctly setting the wireguard’s AllowedIPs and DisallowedIPs. Your laptop wants to send everything through wireguard. Your home server wants to send everything through Proton (or Mullvad or aVPN) except the communication with your laptop.
(I did that by marking the packets from one VPN with fwmark and sending marked packets to the other but that is a dumb solution for such a simple problem.)