By switching from hc to hap, I was able to clean up some code.
This version was tested on macOS Big Sur 11.3.1 (20E241) and on a Raspberry Pi running Raspberry Pi OS 32-bit (Kernel version: 5.10, Debian version: 11 (bullseye)). On macOS I've used the built-in iSight camera. On the Raspberry Pi I was able to get it to work with a USB camera (ELP 1080P) and a standard camera module. (The camera module requires Legacy Camera Support though.)
There is currently no pre-configured Raspberry Pi image available because installing v4l2loopback and ffmpeg is easy to install via apt-get
(see Readme).