From 39140979070b03f3afe656ac78a982463fd82e2b Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 18 Mar 2025 05:52:33 +0100 Subject: [PATCH] obs/v4l2: added troubleshooting for error --- wiki/linux/package_manager.md | 13 +++++++++++++ wiki/linux/v4l2.md | 20 ++++++++++++++++++++ wiki/obs.md | 17 +++++++++++++---- 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/wiki/linux/package_manager.md b/wiki/linux/package_manager.md index f4f19d5..4c3142f 100644 --- a/wiki/linux/package_manager.md +++ b/wiki/linux/package_manager.md @@ -19,6 +19,19 @@ It features the same syntax. This section addresses various usages of the arch linux package managers. +### Downgrading Packages + +Packages of the AUR can be downgraded by using the +[Downgrade](https://github.com/archlinux-downgrade/downgrade) program. +This program can then easily be used to an AUR package. +This works like the following assuming the package `v4l2loopback-dmks` needs to be downgraded. + +```sh +sudo downgrade v4l2loopback-dmks +``` + +Afterwards the target version can be selected and the downgrading process will conclude. + #### Manual Installation of a `PKGBUILD` File A `PKGBUILD` file is a [shell](/wiki/linux/shell.md) script that contains the installation diff --git a/wiki/linux/v4l2.md b/wiki/linux/v4l2.md index 9d80019..aab788b 100644 --- a/wiki/linux/v4l2.md +++ b/wiki/linux/v4l2.md @@ -21,6 +21,11 @@ package needs to be installed. Some distributions have a package named `v4l2loopback-dkms` in the package manager, making the manual installation process unnecessary. +Make sure to +[start the service](/wiki/linux/systemd.md#startstopenabledisable-a-service) by +running `systemctl start v4l2loopback.service` and/or enable it to start after each +boot with `systemctl enable v4l2loopback.service`. + ### Usage This section focusses on various use-cases for the v4l2loopback software. @@ -75,3 +80,18 @@ Afterwards enable the service to start at every boot process by running: ```sh sudo systemctl enable v4l2loopback ``` + +## Troubleshooting + +This section focusses on various errors that can appear in the v4l2loopback software. + +### `Failed to start streaming on '/dev/video2' (Invalid argument)` + +This error does occur most of the time when trying to start +[OBS' virtual camera](/wiki/obs.md#virtual-camera). +This section is based on an +[OBS Forum entry by rebelduck](https://obsproject.com/forum/threads/obs-virtual-camera-failed-to-start-streaming-on-dev-video2-invalid-argument.184717/) +To fix it downgrade the packages `v4l2loopback-dkms` and `v4l2loopback-utils` to the last working +version. +For [Arch Linux](/wiki/linux/arch-linux.md) this can be achieved by using +[Downgrade](/wiki/linux/package_manager.md#downgrading-packages). diff --git a/wiki/obs.md b/wiki/obs.md index b61ca77..a436e34 100644 --- a/wiki/obs.md +++ b/wiki/obs.md @@ -20,10 +20,6 @@ camera. First of all [V4L2](./linux/v4l2.md) needs to be set up. This guide assumes it is set up according to the section in the [V4L2 entry](./linux/v4l2.md#v4l2loopback). -Make sure to -[start the service](/wiki/linux/systemd.md#startstopenabledisable-a-service) by -running `systemctl start v4l2loopback.service` or enable it to start after each -boot with `systemctl enable v4l2loopback.service`. Afterwards the virtual camera can be started. ### Background Removal @@ -39,3 +35,16 @@ describes various possibilities to install the background removal for OBS on different systems. On Linux systems background removal is often contained in a package named `obs-backgroundremoval` or similarly. + +## Troubleshooting + +This section focusses on various errors that can appear by using OBS. + +### `Output Failed: If you are using NVENC or AMD encoders, make sure the video drivers are up to date` + +This error does occur most of the time when trying to start +[OBS' virtual camera](/wiki/obs.md#virtual-camera). +If all the drivers are up to date there is a chance that it is caused by a bug or error in the code +of [V4L2](/wiki/linux/v4l2.md). +A possible fix is described in a +[corresponding section of the V4L2 entry](/wiki/linux/v4l2.md#failed-to-start-streaming-on-devvideo2-invalid-argument).