-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OBS v4l2 plugin can't see the loopback camera device #105
Comments
Thanks! Looks like this is a result of how the OBS v4l2 plugin finds inputs: In case you haven't found it, I have an experimental OBS plugin that uses |
So, I've tried this myself, and OBS only lists inputs with a valid video stream at the time it is started. If I have |
I tried starting backscrub before OBS and it did not make any difference. It is still not listed in the list of inputs. I am using 27.0.1. |
OK, reopening this as something is different ❓ |
Righto - I'm running OBS 26.1.2 (stock Debian 11 / stable), here's what I have configured and see:
(/etc/modules-load.d/v4l2loopback)
v4l2loopback (/etc/modprobe.d/v4l2loopback-options)
options v4l2loopback video_nr=10,11 exclusive_caps=1 card_label="Virtual Camera,Test Loopback" this gives me four devices at boot, two from my camera (
rwxrwxrwx 1 root root 0 Aug 29 18:43 video0 -> ../../devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/video4linux/video0
lrwxrwxrwx 1 root root 0 Aug 29 18:43 video1 -> ../../devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/video4linux/video1
lrwxrwxrwx 1 root root 0 Aug 29 18:43 video10 -> ../../devices/virtual/video4linux/video10
lrwxrwxrwx 1 root root 0 Aug 29 18:43 video11 -> ../../devices/virtual/video4linux/video11
% backscrub -c /dev/video0 -v /dev/video10
% obs
...(add a V4L2 source)
info: v4l2-input: Start capture from
error: v4l2-input: Unable to open device
error: v4l2-input: Initialization failed
info: User added source 'Video Capture Device (V4L2)' (v4l2_input) to scene 'Scene'
info: v4l2-input: /dev/video1 seems to not support video capture
libv4l2: error getting pixformat: Invalid argument
info: v4l2-input: Unable to open /dev/video11
info: v4l2-input: Found device 'Integrated Camera: Integrated C' at /dev/video0
info: v4l2-input: Found device 'Virtual Camera' at /dev/video10
info: v4l2-input: Found input 'Camera 1' (Index 0)
info: v4l2-controls: setting default for Power Line Frequency to 1
info: v4l2-controls: setting default for Exposure, Auto to 3
info: v4l2-input: Pixelformat: Motion-JPEG (unavailable)
info: v4l2-input: Pixelformat: YUYV 4:2:2 (available)
info: v4l2-input: Pixelformat: RGB3 (Emulated) (unavailable)
info: v4l2-input: Pixelformat: BGR3 (Emulated) (available)
info: v4l2-input: Pixelformat: YU12 (Emulated) (available)
info: v4l2-input: Pixelformat: YV12 (Emulated) (available)
info: v4l2-input: Stepwise and Continuous framesizes are currently hardcoded
info: v4l2-input: Stepwise and Continuous framerates are currently hardcoded
info: v4l2-input: Pixelformat: Motion-JPEG (unavailable)
info: v4l2-input: Pixelformat: YUYV 4:2:2 (available)
info: v4l2-input: Pixelformat: RGB3 (Emulated) (unavailable)
info: v4l2-input: Pixelformat: BGR3 (Emulated) (available)
info: v4l2-input: Pixelformat: YU12 (Emulated) (available)
info: v4l2-input: Pixelformat: YV12 (Emulated) (available)
info: v4l2-input: Stepwise and Continuous framesizes are currently hardcoded
info: v4l2-input: Stepwise and Continuous framerates are currently hardcoded
info: v4l2-input: Stepwise and Continuous framerates are currently hardcoded
info: v4l2-input: Start capture from /dev/video0
error: v4l2-input: Unable to set input 0
error: v4l2-input: Initialization failed
info: v4l2-input: Found input 'loopback' (Index 0)
info: v4l2-input: Pixelformat: YUYV 4:2:2 (available)
info: v4l2-input: Pixelformat: RGB3 (Emulated) (unavailable)
info: v4l2-input: Pixelformat: BGR3 (Emulated) (available)
info: v4l2-input: Pixelformat: YU12 (Emulated) (available)
info: v4l2-input: Pixelformat: YV12 (Emulated) (available)
info: v4l2-input: Stepwise and Continuous framerates are currently hardcoded
info: v4l2-input: Start capture from /dev/video10
info: v4l2-input: Input: 0
info: v4l2-input: Resolution: 640x480
info: v4l2-input: Pixelformat: YUYV
info: v4l2-input: Linesize: 1280 Bytes
info: v4l2-input: Framerate: 30.00 fps ..which seems to indicate that it cannot open
|
Test repeated using OBS Studio 27.0.1-dfsg1-1 (from Debian bookworm / testing), and everything still works as above. |
This is likely to be caused by the snap container then. |
I think so, thanks for raising the issue with snapcrafters, are we ok to close this here (possibly with a note in the docs and link to this ticket?) |
@phlash Once somebody™ added the note in the docs I'm fine with closing this. |
docs updated in README.md |
When selecting a v4l2 input device, only my real cameras are listed.
This is not a permissions problem - that would also prevent the gstreamer plugin from working. The virtual camera also has no problems working with mpv or web browsers, skype etc.
This can be worked around within OBS by using the gstreamer plugin instead of v4l2. Then use a pipeline like this:
I realise you probably can't fix this but I think it would be helpful to add the workaround to the documentation.
The text was updated successfully, but these errors were encountered: