This can be done with DroidCam. This has three parts: an app that you install in your Android device or iPhone, a Linux executable, and a Linux kernel module.
I did a search of the forum, and see that 666philb has got it going in Fossapup:
The only catch is, when the kernel is changed, you will have to recompile the DroidCam module. It is 'v4l2loopback-dc.ko', and to make it easy to compile, I have pulled just the module source out as a separate package, see 'droidcam-v4l2loopback-dc-1.8.2.tar.gz' attached.
I have setup the kernel build for EasyOS so that the DroidCam module will always be compiled. The same could be done for the woof-ce kernel-kit. @dimkr
EasyOS 3.4.7 has the kernel module, and the 'droidcam-cli' CLI executable. I didn't compile the GTK app. And yay, it works:
https://bkhome.org/news/202204/droidcam ... works.html
Easy has GUVCView builtin, snapshot:
...the green bar shows that audio is working, when I speak to the phone.
Success with OBS Studio also.
Had some difficulty at first, as Easy uses pulseaudio.
In the blog post, I reported that video is stuck on 640x480, however, I discovered that resolution needs to be specified when loading the kernel module:
https://www.dev47apps.com/droidcam/linux/
Modern phones have very sophisticated optics and processing, and work real nice as a webcam.
The only problem is, some kind of holder is needed -- plenty available.
What I would like to do next is write a little GUI, to automate all the steps that I did manually.