Feed an image to Genymotion Camera Context:

I use WhatsApp on Genymotion. Chatting in the WhatsApp via Genymotion is fine, except, I wish to enable the WhatsApp web too, so I could free myself from bringing up the genymotion window all the time, instead, could just have all in my host machine browser.

To enable WhatsApp Web, it requires to scan a QR code generated on the web. 

What I want to do:


Open web.whatsapp.com
Take a screenshot, crop the QR code only
Make the image available in Genymotion
Feed that image into the preview camera, which would be in turn available when I bring up the WhatsApp Web activation in WhatsApp.
The WhatsApp app would then think of the feed as coming live, thus enable the authorization.


Summary:

I wish to feed an image to show in the Genymotion camera preview. How do I do that?
I failed to get this working on Ubuntu 18.04. Here's what I found:


The Ubuntu repos contain a program called Webcamoid which can create a virtual camera that uses your desktops as the camera input.
However, the version of Webcamoid that's installed by sudo apt install webcamoid at time of writing (version 8.1.0+dfsg-7) dies with a segmentation fault. You can get around this by downloading from the webcamoid website.
To create a virtual camera with Webcamoid, you also need to install v4l2loopback, e.g., using sudo apt install v4l2loopback-utils.
The virtual camera will be created as /dev/video* (e.g. /dev/video0).
Even with all this, Genymotion does not detect the camera. I suspect it is looking for USB devices rather than just looking at /dev/video*. The Webcamoid wiki says, "If the programs detects the webcams by listing USB devices, the programs will be not able to detect the webcam, but it will be possible in a future."


So the answer on Ubuntu seems to be that it's not yet possible but may be in future. I suspect that any other Linux software that tries to create a virtual camera will run into this same issue.

Update 2020-03: I notice that the Webcamoid wiki now shows that development versions of Webcamoid support using akvcam as the virtual camera driver. I have not tested it, but their compatibility table suggests that many programs which did not find the camera using v4l2loopback do find it with akvcam.