Using Video 4 Linux 2
Video 4 Linux 2 (v4l2) is an essential toolkit for working with and managing video devices in Linux. If you've used a webcam, then you've already used v4l (probably without even knowing).
The v4l2loopback project provides a loadable kernel module to create v4l2 devices from running application instead of from video cards (as would be exposed by your webcam).
Commands
v4l2loopback-ctl
: Control v4l2 loopback devices v4l2-ctl
: Create and control v4l2 devices