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.).
Even though OBS is in a Flatpak, the drivers must be installed on your host Arch system.
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-headersTo use a USB cable with an iPhone, you need the usbmuxd libraries.
sudo pacman -S usbmuxd libimobiledeviceNote: You do not need to enable usbmuxd via systemctl; it is socket-activated and will start automatically when you plug in the phone.
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 loopbackCreate 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"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.DroidCamThe 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- Connect phone and PC to the same Wi-Fi.
- Open DroidCam on the phone.
- In OBS, add a "DroidCam OBS" source.
- Enter the IP shown on the phone.
- Connect iPhone via USB.
- Unlock iPhone and tap "Trust" if prompted.
- Open DroidCam on the phone.
- In OBS DroidCam source properties:
- Select "Use USB" (or select the device from the dropdown if available).
- Click "Refresh" or "Activate".
By default, DroidCam or OBS might default to 480p/720p.
- Phone App: Ensure you are using DroidCamX (Pro) or have unlocked HD settings if required by the app.
- OBS Video Settings:
- Go to Settings > Video.
- Set Base (Canvas) Resolution:
1920x1080. - Set Output (Scaled) Resolution:
1920x1080.
- DroidCam Source: Right-click the DroidCam source in OBS -> Properties -> Resolution -> Select 1920x1080.
- Add the DroidCam source.
- The audio should appear in the Audio Mixer.
- If not, go to Properties and check "Enable Audio".
To use the phone's mic in other apps, you need to route it out of OBS.
- Install PulseAudio Volume Control:
sudo pacman -S pavucontrol - Create a Virtual Sink (PipeWire/PulseAudio):
pactl load-module module-null-sink sink_name=OBS_Voice sink_properties=device.description=Virtual_OBS_Mic
- 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".
- Configure Discord/Zoom:
- Set Input Device to "Monitor of Virtual_OBS_Mic" (or just Virtual_OBS_Mic).
To use the camera in Firefox, Zoom, or Teams:
- Open OBS.
- Set up your scene (DroidCam source).
- Click Start Virtual Camera in the Controls dock.
- Open your external app (e.g., Zoom).
- 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.