Skip to content

My solution to missing necessary steps to have virtual camera on browsers (chromium+firefox) on Debian13 #304

@kevinkaw

Description

@kevinkaw

I am happy to finally have droidcam working on my system! Writing this report so that the instructions can be updated for more user friendliness.

My system:
Thinkpad T480s, Debian 13 KDE, iphone13pro.

flatpak route:
I followed all 3 steps and installed the v4l2loopback module. All via the terminal, but still no "start virtual camera" option. OBS and DroidCam client detects my phone fine. But without the virtual camera, it's not useful.

Debian 13 repo route:

  1. install OBS studio
  2. in the terminal run ffmpeg -version. Here I found out that debian 13 comes with ffmpeg 7.1.3
  3. I then proceed to the release history of OBS droidcam plugin linked here https://github.com/dev47apps/droidcam-obs-plugin/releases, do a ctrl+f for "ffmpeg". The release version that uses ffmpeg7 is v2.4.1.
  4. I then download this and run the automatic install sudo chmod +x ./install.sh then ./install.sh
  5. install the v4l2loopback module
  6. VIOLA! "Start virtual camera" is now in OBS!!
  7. BUT!! when I start it, I was having this error
Starting the output failed. Please check the log for details.
Note: If you are using the NVENC or AMD encoders, 
make sure your video drivers are up to date.
  1. Then I figured out that I have to run this code to enable the v4l2loopback sudo modprobe v4l2loopback [1]

  2. YESS!! the virtual webcam is running!!!! Tests were done with this site https://webcamtests.com/mirror

  3. The virtual webcam registers in firefox (zen browser) BUT NOT in chrome!!

  4. Figured out that I have to run sudo modprobe v4l2loopback exclusive_caps=1 [2]

  5. Chrome (and helium browser) now detects the virtual webcam!!!

  6. BUT!!! when I restart, it doesn't work again! I have to run the modprobe thing always.

  7. Permanent solution (with the help of AI, duck.ai/chat):

  8. disable any running session sudo modprobe -r v4l2loopback

  9. Create this file sudo nano /etc/modprobe.d/v4l2loopback.conf

  10. Inside the file, paste this options v4l2loopback exclusive_caps=1 card_label="Virtual Webcam" devices=1 video_nr=21.

  11. save and exit

  12. reload the v4l2loopback sudo modprobe v4l2loopback or reboot your system.It should run now by default and your browsers will see the virtual webcam

Important note: this approach works with DroidCam linux client without issues. No need for OBS studio.

Hope it saves you 3 hours of headache.

References:
[1] https://community.frame.work/t/i-cant-start-the-virtual-camera-in-obs-ubuntu-framework-13/57388/23
[2] https://stackoverflow.com/questions/68433415/using-v4l2loopback-virtual-cam-with-google-chrome-or-chromium-on-linux-while-hav

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions