snapcrafters / obs-studio

This is a community-supported modified build of OBS Studio.
https://snapcraft.io/obs-studio
111 stars 37 forks source link

Virtual Camera not Working in Ubuntu 20.04 #136

Closed sagalpreet closed 2 years ago

sagalpreet commented 2 years ago

Operating System Info

Ubuntu 20.04

Other OS

No response

OBS Studio Version

27.0.1

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/aRq8O7VSpwOoNXGQ

OBS Studio Crash Log URL

No response

Expected Behavior

The "Start Virtual Camera" button should change to "Stop Virtual Camera" and virtual camera should start.

Current Behavior

There is no effect on pressing the "Start Virtual Camera" button.

Steps to Reproduce

  1. Install OBS 27.0.1 from Ubuntu Software.
  2. Install v4l2loopback using command sudo apt-get install v4l2loopback-dkms

Anything else we should know?

The description on Ubuntu Software application has following command for v4l2loopback installation:

sudo snap connect obs-studio:kernel-module-observe sudo apt -y install v4l2loopback-dkms v4l2loopback-utils echo "options v4l2loopback devices=1 video_nr=13 card_label='OBS Virtual Camera' exclusive_caps=1" | sudo tee /etc/modprobe.d/v4l2loopback.conf echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf sudo modprobe -r v4l2loopback sudo modprobe v4l2loopback devices=1 video_nr=13 card_label='OBS Virtual Camera' exclusive_caps=1

but this gives an error on my machine:

tee: invalid option -- 'r'
Try 'tee --help' for more information.
error: unknown flag `y'

This issue is quite similar to mine but the solution here didn't work for me.

flexiondotorg commented 2 years ago

Those commands are on separate lines in the documentation. Like this:

sudo snap connect obs-studio:kernel-module-observe
sudo apt -y install v4l2loopback-dkms v4l2loopback-utils
echo "options v4l2loopback devices=1 video_nr=13 card_label='OBS Virtual Camera'    exclusive_caps=1" | sudo tee /etc/modprobe.d/v4l2loopback.conf
echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf
sudo modprobe -r v4l2loopback
sudo modprobe v4l2loopback devices=1 video_nr=13 card_label='OBS Virtual Camera' exclusive_caps=1