Jump to content

Droidcam: Difference between revisions

From NixOS Wiki
Klinger (talk | contribs)
m link to OBS Studio wiki article
Gepbird (talk | contribs)
m Put category at the bottom
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[https://droidcam.app/ Droidcam] is a mobile app (Android, iOS). With Droidcam the mobile device can be used as webcam for a PC.
[https://droidcam.app/ Droidcam] is a mobile app (Android, iOS). With Droidcam the mobile device can be used as webcam for a PC.


== Installing as an OBS-Studio plugin ==
== Using it as a virtual camera with OBS Studio ==
Its possible to use Droidcam as a virtual camera in [[OBS Studio]].
Its possible to use Droidcam as a virtual camera in [[OBS Studio]] with the following [[NixOS]] configuration:


<syntaxhighlight lang="nixos">
<syntaxhighlight lang="nixos">
# /etc/nixos/configuration.nix
{ pkgs, ... }:
{ config, pkgs, ... }:


{
{
   # Virtual cam settings: see https://wiki.nixos.org/wiki/OBS_Studio#Using_the_Virtual_Camera
   programs.obs-studio = {
  boot.extraModulePackages = with config.boot.kernelPackages; [
     enable = true;
     v4l2loopback
     enableVirtualCamera = true;
  ];
     plugins = with pkgs.obs-studio-plugins; [
  boot.extraModprobeConfig = ''
      droidcam-obs
     options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
  '';
  security.polkit.enable = true;
 
  # Install OBS Studio with droidcam-obs
  users.users.foo = {
     packages = with pkgs; [
      # ...
      (wrapOBS {
        plugins = with obs-studio-plugins; [
          droidcam-obs
        ];
      })
      # ...
     ];
     ];
   };
   };
}
}
</syntaxhighlight>
</syntaxhighlight>
Since this adds a kernel module, you will need to reboot your system. Once rebooted, open OBS Studio and add a DroidCam OBS source to a scene. Then activate the virtual camera to and make sure it is linked to your selected scene.
[[Category:Applications]]

Latest revision as of 19:17, 12 May 2025

Droidcam is a mobile app (Android, iOS). With Droidcam the mobile device can be used as webcam for a PC.

Using it as a virtual camera with OBS Studio

Its possible to use Droidcam as a virtual camera in OBS Studio with the following NixOS configuration:

{ pkgs, ... }:

{
  programs.obs-studio = {
    enable = true;
    enableVirtualCamera = true;
    plugins = with pkgs.obs-studio-plugins; [
      droidcam-obs
    ];
  };
}

Since this adds a kernel module, you will need to reboot your system. Once rebooted, open OBS Studio and add a DroidCam OBS source to a scene. Then activate the virtual camera to and make sure it is linked to your selected scene.