Closed GreatAg closed 2 days ago
v4l2loopback
(at the time of writing this is 0.13.2)docker run --rm -ti alpine:latest bash
Thanks for the replay,
I run my container using this command:
docker run -d --device=/dev/video2 ubuntu:20:04
which i have chrome installed in that image and i want to use webcam in container.
also i checked the latest version and the problem still there. This is really weird.
I run my container using this command:
that was really just an example. i would need all commands you run, and I need know where you run each of them (within the container, or outside).
e.g. in your example there is no a producer anywhere.
You can take a look at kasm application (https://kasmweb.com/) I am doing pretty much the same thing in my app Also kasm using v4l2loopback
sorry, I don't think i will (find the time to) checkout kasm, just to reproduce this issue.
please try to provide a minimal reproducible example.
Thanks, you are right If it is possible help me by answering my question to fix my problem. I install v4l2loopback by building the source rather than using dkms in every update of my app i upgrade the kernel (apt upgrade) and then build and load v4l2loopback modules without rebooting the OS, does it a problem? When i remove the older version of the kernel, i build and load v4l2loopback module again and everything was fine. What is the problem you think? And please tell me how can i entirely remove v4l2loopback from my kernel like it never was exist?
in every update of my app i upgrade the kernel (apt upgrade) and then build and load v4l2loopback modules without rebooting the OS, does it a problem?
rmmod v4l2loopback
), before you can load the module again (same version or older version)kexec
and friends will reduce the downtime, but you essentially still need to restart the kernel and restart PID 0 (and everything that depends on it...which is practically everything); i don't know about ksplice
Ok i see, So here is the scenario:
everything should work in this scenario, right?
and what if i use dkms? i shouldnt do stage 4 because dkms build the module for the new kernel automatically right?
yes.
you can also build the module for a specific kernel without rebooting (e.g. before rebooting), by setting the KERNELRELEASE
(make-)variable. i see that this was not mentioned in the README (but is fixed now).
Is there an existing issue for this?
Detail
I am using v4l2loopback for webcam as a virtual device in container for chrome application. Here is the scenario: 1- i build the source and load the devices with exclusive_caps 2- i run the container and map the device into container using --device flag 3- open the webcam test in chrome and everything is fine 4- delete the container and run again 5- that device no longer known as a webcam or capture device!!
I run v4l2-ctl device=/dev/video2 --all before and after using it in container and find out after destroy the container the device lose it's capture device capability!!
Here is the log before i run container at fresh loading:
And this is after i remove the container:
What is wrong? what is modifying the device? how can i resolve this?
v4l2loopback version
0.12.5
kernel version
OS Version
Ubuntu 20.04
Which CPU are you using?
amd64/x86_64 ("64bit Intel")