Using my Samsung Fold 6 as a webcam on Arch Linux
The Problem
I was trying to use my Android phone as a webcam for Discord using DroidCam OBS on Arch Linux, but ran into several frustrating issues:
- The virtual camera wouldn’t show up initially
- When it did appear, it would stay black in Discord
- Getting the error:
Failed to start streaming on '/dev/video0' (Invalid argument)
My Setup
- OS: Arch Linux x64
- Original OBS: Version 31 (installed via paru)
- Android App: DroidCam OBS
- Connection: Works with both USB cable and WiFi
The Solution
After some googling and troubleshooting, here’s what fixed it:
Step 1: Install Git Version of OBS
The issue was related to OBS bug #11891. I needed to install the development version:
paru -S obs-studio-git
Step 2: Reconfigure v4l2loopback Module
The key was reloading the v4l2loopback module with exclusive mode:
sudo rmmod v4l2loopback
sudo modprobe v4l2loopback video_nr=2 card_label="VirtualCamera" exclusive_caps=1
Step 3: Configure DroidCam OBS
- Start the DroidCam app on your Android phone
- Open OBS and add a DroidCam OBS source
- Double-click the source and configure:
- Resolution: 1920×1080
- Video Format: AVC/H.264
- Device: Select WiFi connection or your phone name (if USB)
- Click Activate then OK
Step 4: Set Up Virtual Camera
- Click the settings cog next to Start Virtual Camera
- Configure your Scene and Output Type settings
- Set your Output Selection preferences
- Start the virtual camera
Step 5: Update Android App Settings
- Restart the DroidCam app
- Set frame rate to 60 FPS for smoother video
Result
After following these steps, I can now:
- Start the DroidCam app on my phone
- Configure the source in OBS
- Start the virtual camera
- Use it seamlessly in Discord and other applications
The virtual camera now appears properly and provides a stable video feed without the black screen issues I was experiencing before.
Key Takeaways
- The git version of OBS resolved the underlying compatibility bug
- The
exclusive_caps=1
parameter for v4l2loopback was crucial for proper device access - Using
video_nr=2
instead of the default video device helped avoid conflicts
Filed under: Uncategorized - @ May 27, 2025 1:42 pm