MY WEBCAM TEST GUIDE

How to set up OBS Virtual Camera on Arch Linux

Set up OBS Virtual Camera on Arch Linux with v4l2loopback, check that apps can see it, and route a DSLR or mirrorless camera into OBS.

The short answer

On Arch Linux, the OBS Virtual Camera needs a kernel module called v4l2loopback. A kernel module is a piece of code loaded into the Linux kernel. This one creates a fake video device that other apps read as if it were a webcam. Install OBS Studio, the v4l2loopback-dkms package and the kernel headers for the kernel you actually run. Then click Start Virtual Camera in OBS. OBS tries to load the module itself and asks for your administrator password the first time. After that, browsers and call apps should list a camera named OBS Virtual Camera.

Two details change the steps. First, check how you installed OBS. A Flatpak build of OBS cannot install or load kernel modules, so v4l2loopback must still be installed on the host system. Second, check whether you want to send a DSLR or mirrorless camera through OBS. That is a separate step that happens before the virtual camera, and it is covered further down.

Before you start

  • Find out which kernel you are running with the command uname -r. The standard kernel, linux-lts and linux-zen each need their own matching headers package.
  • Make sure you have sudo rights. Loading a kernel module requires administrator permission.
  • Check whether Secure Boot is enabled. If your setup only allows signed modules, a module built locally by DKMS may be refused until you sign it. How to sign it depends on your boot setup.
  • Decide between the OBS package from the official repositories and the Flatpak. The steps below assume the repository package, but the v4l2loopback steps apply to both.

Step 1: Install the packages

sudo pacman -Syu
sudo pacman -S obs-studio v4l2loopback-dkms linux-headers v4l-utils

If you use a different kernel, replace linux-headers with the matching package, such as linux-lts-headers or linux-zen-headers. DKMS (Dynamic Kernel Module Support) builds v4l2loopback for your kernel, and it rebuilds the module whenever the kernel is updated. The v4l-utils package provides v4l2-ctl, which you will use to check the result.

Success check: run dkms status. It should list v4l2loopback as installed for the kernel version that uname -r reports. If the system upgrade installed a new kernel, reboot before you continue. Otherwise the module is built for a kernel you are not running yet.

Step 2: Start the virtual camera in OBS

  • 1. Open OBS and add at least one source to a scene so there is a picture to send.
  • 2. In the Controls panel, click Start Virtual Camera.
  • 3. When prompted, enter your password so OBS can load v4l2loopback.

Success check: the button changes to Stop Virtual Camera. In a terminal, run v4l2-ctl --list-devices. A device labeled OBS Virtual Camera should appear with a path such as /dev/video followed by a number. If the button is missing entirely, OBS did not detect v4l2loopback. Go back to Step 1.

Optional: load the module automatically at boot

If you do not want a password prompt each session, or OBS fails to load the module itself, you can load the module at every boot with your own options. Create the following two files as root.

# /etc/modules-load.d/v4l2loopback.conf
v4l2loopback

# /etc/modprobe.d/v4l2loopback.conf
options v4l2loopback devices=1 video_nr=10 card_label="OBS Virtual Camera" exclusive_caps=1

Here is what the options do:
• The exclusive_caps=1 option makes the device appear as a capture device only while something is feeding it video. Chromium-based browsers need this to list the camera.
• The video_nr option fixes the device number, so it does not shift around when you plug in other cameras.
To apply the settings without rebooting, run sudo modprobe -r v4l2loopback while OBS is closed. Then run sudo modprobe v4l2loopback and check again with v4l2-ctl --list-devices.

Step 3: Confirm that an app can see and display it

Start the virtual camera in OBS first, then open the browser or call app. Some apps only scan for cameras when they start. In the app's camera settings, or in the site's camera permission prompt, choose OBS Virtual Camera. If the browser has blocked camera access for that site before, allow it in the site permissions.

These checks prove different things:
• The device appearing in v4l2-ctl proves only that the module loaded.
• The camera appearing in an app's list proves the app can access the device.
• Seeing your OBS scene in the app's preview proves that video is actually flowing.
None of these checks shows how the picture looks to other people on a call. The far end's video quality also depends on bandwidth, the app's compression and its own processing. To check that, run a short test call with someone, or use a call service's built-in test if it has one.

Using a DSLR or mirrorless camera as the source

The virtual camera only sends out whatever OBS shows. To use a DSLR or mirrorless camera, you first have to get its picture into OBS. There are two common ways to do this on Linux.

HDMI capture card: connect the camera's HDMI output to a USB capture device. Most such devices appear on Linux as standard video devices. In OBS, add a Video Capture Device (V4L2) source and select the capture device. For a usable picture, the camera needs to output a clean HDMI signal without menus or focus overlays, and it must not shut off after a timeout. Which models can do this varies, and no model-specific evidence was available for this guide.

USB live view through gphoto2: some cameras can stream their live view over USB through the gphoto2 tool. With the gphoto2 and ffmpeg packages installed, you can pipe that stream into a second loopback device and then add that device to OBS as a source. To create two devices, change the modprobe options so the DSLR feed and the OBS output each get their own device.

# /etc/modprobe.d/v4l2loopback.conf
options v4l2loopback devices=2 video_nr=10,11 card_label="OBS Virtual Camera","DSLR Feed" exclusive_caps=1,1

# Feed the camera's live view into /dev/video11
gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -f v4l2 /dev/video11

Keep that command running, then add /dev/video11 to OBS as a Video Capture Device (V4L2) source. If gphoto2 reports that the camera is busy, your desktop's file manager may have claimed it as a storage device. Unmount the camera there and try again. Whether a particular camera supports live view over USB, and at what resolution, depends on the model and its gphoto2 support. This guide could not verify either for any specific camera.

Audio is not part of the virtual camera

The OBS Virtual Camera carries video only. Call apps still take audio from a microphone you select separately. If you want audio processed in OBS to reach a call, you have to route it separately, for example with a virtual audio device in PipeWire. That falls outside a basic virtual camera setup.

If something goes wrong

Symptom | Likely cause | What to try
No Start Virtual Camera button | v4l2loopback is not installed or OBS cannot find it | Install v4l2loopback-dkms and the matching headers, then restart OBS
Module fails to load after a kernel update | The module was built for a different kernel, or headers are missing | Install headers for the running kernel, check dkms status, then reboot
Module refused with a signature or permission error | Secure Boot is enforcing signed modules | Sign the module or adjust your Secure Boot setup
Camera missing in a Chromium-based browser | exclusive_caps is not enabled | Reload the module with exclusive_caps=1
Camera listed but the preview is black | The virtual camera was not started, or the OBS scene is empty | Start the virtual camera, check the OBS preview, then reopen the app
Device number keeps changing | Other cameras take numbers first | Set video_nr in the modprobe options

What this guide could not verify

No test results, performance figures or camera compatibility data were available for this guide. It recommends no resolution, frame-rate or latency targets, and no technical thresholds were verified for this setup. Package names and module options can change over time. If a step behaves differently, check the package descriptions in pacman and the v4l2loopback documentation installed with the package.