Skip to content

Instantly share code, notes, and snippets.

@markkvdb
Created February 13, 2026 14:11
Show Gist options
  • Select an option

  • Save markkvdb/949d49bf8d3da526c08465a7f6981660 to your computer and use it in GitHub Desktop.

Select an option

Save markkvdb/949d49bf8d3da526c08465a7f6981660 to your computer and use it in GitHub Desktop.

DroidCam + OBS (Flatpak) on Arch Linux: The Complete Guide

This guide covers how to set up an Android or iPhone as a webcam using DroidCam on Arch Linux, specifically when using OBS Studio via Flatpak. It includes steps for USB support (iOS/Android), High Definition (1080p), Microphone setup, and using the camera outside of OBS (Zoom, Discord, etc.).

Prerequisites: Host System Setup

Even though OBS is in a Flatpak, the drivers must be installed on your host Arch system.

1. Install Kernel Headers and Loopback Drivers

You need v4l2loopback to create the virtual camera device.

# For standard kernel
sudo pacman -S v4l2loopback-dkms linux-headers

# If using LTS kernel, use linux-lts-headers instead
# sudo pacman -S v4l2loopback-dkms linux-lts-headers

2. Install USB Support (Required for iPhone/iOS)

To use a USB cable with an iPhone, you need the usbmuxd libraries.

sudo pacman -S usbmuxd libimobiledevice

Note: You do not need to enable usbmuxd via systemctl; it is socket-activated and will start automatically when you plug in the phone.

3. Configure the Virtual Camera (Permanent)

To ensure the camera works with Chrome/Zoom, we must set exclusive_caps=1. We also want this to load automatically on boot.

Create the module load file:

echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf
echo "snd-aloop" | sudo tee -a /etc/modules-load.d/v4l2loopback.conf # Optional: For audio loopback

Create the module options file: Create /etc/modprobe.d/v4l2loopback.conf with your text editor and add:

options v4l2loopback exclusive_caps=1 video_nr=10 card_label="OBS Virtual Camera"

(Note: video_nr=10 creates the device at /dev/video10 to avoid conflicts with built-in webcams).

Apply changes immediately:

sudo modprobe -r v4l2loopback
sudo modprobe v4l2loopback exclusive_caps=1 video_nr=10 card_label="OBS Virtual Camera"

Part 2: OBS Flatpak Setup

1. Install OBS and the DroidCam Plugin

The standard DroidCam OBS plugin won't work in Flatpak; you need the Flatpak-specific version.

flatpak install flathub com.obsproject.Studio
flatpak install flathub com.obsproject.Studio.Plugin.DroidCam

2. Grant Permissions (Crucial!)

The Flatpak sandbox prevents OBS from seeing the host's video devices and the iPhone USB connection. Run this command to fix it:

# Allow access to video devices and the USB multiplexer socket
flatpak override --user --device=all --filesystem=/run/usbmuxd com.obsproject.Studio

Part 3: Connecting the Phone

Option A: Via Wi-Fi

  1. Connect phone and PC to the same Wi-Fi.
  2. Open DroidCam on the phone.
  3. In OBS, add a "DroidCam OBS" source.
  4. Enter the IP shown on the phone.

Option B: Via USB (iPhone/iOS) - Recommended

  1. Connect iPhone via USB.
  2. Unlock iPhone and tap "Trust" if prompted.
  3. Open DroidCam on the phone.
  4. In OBS DroidCam source properties:
    • Select "Use USB" (or select the device from the dropdown if available).
    • Click "Refresh" or "Activate".

Part 4: High Resolution (1080p) Setup

By default, DroidCam or OBS might default to 480p/720p.

  1. Phone App: Ensure you are using DroidCamX (Pro) or have unlocked HD settings if required by the app.
  2. OBS Video Settings:
    • Go to Settings > Video.
    • Set Base (Canvas) Resolution: 1920x1080.
    • Set Output (Scaled) Resolution: 1920x1080.
  3. DroidCam Source: Right-click the DroidCam source in OBS -> Properties -> Resolution -> Select 1920x1080.

Part 5: Audio / Microphone Setup

Scenario 1: Using the Mic inside OBS

  1. Add the DroidCam source.
  2. The audio should appear in the Audio Mixer.
  3. If not, go to Properties and check "Enable Audio".

Scenario 2: Sending Mic to Discord/Zoom (Virtual Mic)

To use the phone's mic in other apps, you need to route it out of OBS.

  1. Install PulseAudio Volume Control: sudo pacman -S pavucontrol
  2. Create a Virtual Sink (PipeWire/PulseAudio):
    pactl load-module module-null-sink sink_name=OBS_Voice sink_properties=device.description=Virtual_OBS_Mic
  3. Configure OBS:
    • Settings > Audio > Advanced > Monitoring Device: Select "Virtual_OBS_Mic".
    • Audio Mixer (Main Screen): Click the Gear icon next to DroidCam Audio -> Advanced Audio Properties.
    • Change Audio Monitoring to "Monitor and Output".
  4. Configure Discord/Zoom:
    • Set Input Device to "Monitor of Virtual_OBS_Mic" (or just Virtual_OBS_Mic).

Part 6: Using the Camera OUTSIDE OBS

To use the camera in Firefox, Zoom, or Teams:

  1. Open OBS.
  2. Set up your scene (DroidCam source).
  3. Click Start Virtual Camera in the Controls dock.
  4. Open your external app (e.g., Zoom).
  5. Select "OBS Virtual Camera" as your video source.

Troubleshooting: If the browser doesn't see the camera, ensure you unloaded and reloaded the v4l2loopback module with exclusive_caps=1 as shown in Part 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment