Skip to content
umläute edited this page Feb 13, 2020 · 24 revisions

Frequently Asked Questions for the v4l2loopback kernel module


Usage

Q: I need to use several loopback devices simultaneously. How?

A: use the 'devices' module parameter. e.g. # modprobe v4l2loopback devices=3 will create 3 loopback devices


Q: How can I use mplayer to write to a v4l2loopback device?

A: Please refer to the MPlayer examples to see how to do that.


Q: How can i use a virtual webcam with flash in a browser with v4l2loopback devices?

A: Please refer to the MPlayer examples to see how to do that.


Q: How can i use skype with v4l2loopback devices?

A: Please refer to the Skype examples to see how to do that.


Q: Why doesn't v4l2loopback rescale/convert the videoframes to the format I desire?

A: v4l2loopback is a kernel-module and thus runs in kernel-space. while you can do many a-thing in kernel-space that you cannot do in user-space, there are also some things that you only do in user-space (like using a dynamic library). what's more there are things that you shouldn't do in the privileged kernel-space (mostly all the things that you can easily do in user-space). scaling images and converting between colorspaces, is something that should be done in user-space, and thus cannot be done in the v4l2loopback module. See also Colorspace Issues.


Installation

Q: Where can I get packages for Ubuntu with the latest version?

A: Latest package v4l2loopback-dkms can be downloaded for example here:
https://launchpad.net/ubuntu/+source/v4l2loopback
Or you can use this PPA:
https://launchpad.net/~rayanayar/+archive/v4l2loopback

Q: I get SSL error when building the kernel module. What sould I do?

When running make, I get errors like the following:

make -C /lib/modules/uname -r/build M=/home/me/src/v4l2loopback modules_install
make[1]: Entering directory '/usr/src/linux-headers-5.0.0-0'
INSTALL /home/me/src/v4l2loopback/v4l2loopback.ko
At main.c:160:

    SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
    SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79
    sign-file: certs/signing_key.pem: No such file or directory
    DEPMOD 5.0.0-0
    Warning: modules_install: missing 'System.map' file. Skipping depmod.
    make[1]: Leaving directory '/usr/src/linux-headers-5.0.0-0'

A: you can safely ignore these "errors" (they only say, that the kernel-module could not be cryptographically signed).

To check whether the build actually succeeded, check the exit code of the build process. It should be 0:

$ make
[...]
$ echo $?
0
$
Clone this wiki locally