/ #webcam #image 

How to use a static picture as output of your webcam

When registering for banks or exchanges online you will be asked to show your ID to the webcam. The quality of my notebook webcam is poor, so the automatic ID verification failed again and again. I looked up ways to provide a picture taken with my phone (or any picture) as if it was coming from my webcam. This instruction is for the Ubuntu operating system.

I can use the kernel module v4l2loopback to create a video-device that I can use as I like.Download the latest release of v4l2loopback here (https://github.com/umlaeute/v4l2loopback/releases), unzip it and in the unzipped folder, run

$ make && sudo make install

(You might have to be ‘root’ to have all necessary permissions to install the module.)

To use additional kernel modules, disable “secure boot” in the BIOS/UEFI. Restart and load the v4l2loopback module with

$ sudo modprobe v4l2loopback

This will create a video-device, e.g. /dev/video1, we can use as we wish. This will not work if “secure boot” is enabled.

I use ffmpeg to supply the image to the video-device. Install ffmpeg with

$ sudo apt install ffmpeg

To stream your input.jpg to /dev/video1, run ffmpeg with these arguments:

$ ffmpeg -loop 1 -re -i input.jpg -f v4l2 -vcodec rawvideo -pix_fmt yuv420p /dev/video1

Open OnlineMicTest.com and choose “Dummy video device” as your webcam. I cannot choose the fake camera in google chrome but in firefox it works.

You have to load v4l2loopback again after every reboot using sudo modprobe v4l2loopback. Don’t forget to enable secure boot again, when you are done.

I made the exchange Coinbase.com aware of this possibility and they did not view it as a security threat. I guess they chose to use an automatic ID reader because it is more scalable than a call center with humans.

Note: Ffmpeg arguments.