This is a simple setup. Basically, you just need to install v4l2loopback
for your kernel, sometimes a DKMS module.
Run this to load it manually, if it isn't automatically loaded and configured in your /etc settings:
sudo modprobe v4l2loopback exclusive_caps=1 card_label=<camera label>
For camera label, I went with "camerafun" but any alphanumeric string will work. This will be the name of the video source.
Then you run a script based on this to pipe from your camera's video device into the loopback, decoding it from whatever native format it is into raw video.
#!/bin/sh
ffmpeg -f v4l2 -input_format mjpeg -framerate 15 -video_size 1920x1080 -i /dev/video0 -c:v rawvideo -pix_fmt yuyv422 -f v4l2 /dev/video2 &> /dev/null
Adjust mjpeg, video_size, and framerate to match your camera's preferred format for the resolution you want. Also adjust the /dev/video paths to match your camera (video0 above) and the loopback (video2 above).
To find which formats your camera supports, use the following:
v4l2-ctl --list-formats-ext
For some reason, this only lists the formats and not which devices they're associated with here, so use the following to identify your devices:
v4l2-ctl --list-devices