MCPcopy Index your code
hub / github.com/dev47apps/droidcam-linux-client

github.com/dev47apps/droidcam-linux-client @v2.1.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.1.5 ↗ · + Follow
248 symbols 617 edges 18 files 47 documented · 19%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DKMS for v4l2loopback_dc

The DKMS mechanism is a convenient way to have extra Linux kernel modules managed outside of the kernel tree source to survive kernel updates.

Once the v4l2loopback_dc module, which is necessary for Droidcam to work, has been built and installed, you may face at some point that after a system update, implying a kernel update, Droidcam may not work anymore... when running droidcam, it may fail starting with the following message:

Device not found (/dev/video[0-9]).
Did you install it?

This is just because the newly installed kernel does not come with the v4l2loopback_dc module, thus you would then have to re-install it manually again. You may have forgotten what you did the first time, have to dig again into documentation, how you did it on the first place...

This is where DKMS comes into the picture.

By properly declaring the v4l2loopback_dc module as a DKMS module, future installs of kernel upgrades will automatically take v4l2loopback_dc module re-installation into account after the kernel has been updated.

If your system supports DKMS, it should probably be your prefered install mechanism. Both for the fact it survives kernel updates, but also for the fact it keeps your kernel module tree clean, as extra DKMS modules are kept in separated directories.

DKMS flavour installation of droidcam

First clone the droidcam Github repo anywhere you want (in /opt for example):

$ git clone https://github.com/dev47apps/droidcam.git

Build it following the standard procedure described here.

:information_source: The pre-requisite for what's coming next is that the previous build succeeded.

From within the repository, go to the linux directory, and then issue a:

$ sudo ./install-dkms [width] [height]

If you want specific webcam resolution, you can directly pass the width and height to the script (as for the standard install script). Default is 640 480.

:information_source: After this, the module is built, loaded (you may check this using lsmod|grep v4l2loopback_dc), and its config for the webcam resolution is created in the file /etc/modprobe.d/droidcam.conf (you may want to edit this file afterwards, or you can re-run the install script multiple times with different parameters which is harmless). Supported webcam resolutions are listed here.

Uninstalling droidcam after a DKMS install

From within the repository, go to the linux directory, and then issue a:

$ sudo ./uninstall-dkms

Or alternatively, in case you removed the original repository after install, you can issue:

$ sudo /opt/droidcam-uninstall

Core symbols most depended-on inside this repo

v4l2loopback_getdevice
called by 31
v4l2loopback/v4l2loopback-dc.c
xrun_recovery
called by 6
src/decoder_snd.c
v4l2loopback_cd2dev
called by 5
v4l2loopback/v4l2loopback-dc.c
allocate_buffers
called by 5
v4l2loopback/v4l2loopback-dc.c
RecvAll
called by 5
src/connection.c
xioctl
called by 5
src/decoder_v4l2.c
set_timeperframe
called by 4
v4l2loopback/v4l2loopback-dc.c
check_timers
called by 4
v4l2loopback/v4l2loopback-dc.c

Shape

Function 167
Class 75
Enum 6

Languages

C96%
C++4%

Modules by API surface

v4l2loopback/v4l2loopback-dc.c127 symbols
src/decoder.c22 symbols
src/droidcam.c18 symbols
src/connection.c15 symbols
src/decoder_v4l2.c13 symbols
src/droidcam-cli.c9 symbols
v4l2loopback/test.c8 symbols
src/decoder_snd.c7 symbols
src/av.c7 symbols
src/queue.c5 symbols
src/usb.c4 symbols
src/settings.h4 symbols

For agents

$ claude mcp add droidcam-linux-client \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact