Is there a way to redirect a real webcam to a virtual webcam from the command line, for example using the v4l2loopback
module with ffmpeg
?
Details
I have an old webcam which works with most software (vlc, cheese, etc.), but not with others (Skype).
A possible workaround to make it work with such software is to redirect it to a virtual webcam using the v4l2loopback
module, as done by Webcamoid, but I need to do it from the command line, for example via ffmpeg
.
I am sure this is possible via ffmpeg
as well, but since real webcams are rarely redirected to virtual ones, I found no examples online (the only examples I have found, like this one, redirect screen captures or existing videos to the virtual webcam instead).
Based on this answer (already mentioned in the question) I think I have found a solution by myself, and it works with Skype!
Suppose the real webcam is in
/dev/video0
. When you runthe module creates a second (virtual) webcam, for example in
/dev/video1
. At this point, it is sufficient to execute:and the new virtual webcam is ready to be used and selected with Skype as well.
For me i must place
LD_PRELOAD
before like this :Precision : for Q4OS