CatxFish / obs-virtual-cam

obs-studio plugin to simulate a directshow webcam
https://obsproject.com/forum/resources/obs-virtualcam.539/
GNU General Public License v2.0
1.76k stars 341 forks source link

Hello CatxFish... Any way to install OBS-virtual-cam on ubuntu? #17

Open pixel-one opened 6 years ago

pixel-one commented 6 years ago

Hello. Hope youre doing fine. I was reading your other post that you said obs works with genymotion. then i realized i can't even stream. I mean it was complicated. Then i found out that youre talking about obs-virtualcam but i have obs studio. are these 2 different softwares? Sorry im alittle noobish.
If not so can i install obs-virtual cam on linux? Or can i do teh same with on obs studio? I have obs studio but i dunno how to stream internal. i want to use it as genymotion camera . but obs studio wants to conenct to a server and wants server keys and such. so i cant start streaming even to test to see if genymotion detects teh cam or not. Could you please help me? Thanks alot

tsankuanglee commented 4 years ago

@leoherzog Did you add a file /etc/modules-load.d/v4l2loopback.conf with the content:

v4l2loopback

as described in the automatic loading section?

leoherzog commented 4 years ago

@tsankuanglee That was it, thanks :raised_hands:

/etc/modprobe.d/v4l2loopback.conf:

options v4l2loopback devices=1 video_nr=10 card_label="OBS Virtualcam" exclusive_caps=1

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

v4l2loopback
claudemontreal commented 3 years ago

Hi, I am trying run OBS with virtual cam on Ubuntu 20.04. Followed this https://srcco.de/posts/using-obs-studio-with-v4l2-for-google-hangouts-meet.html.

However, need to run sudo modprobe v4l2loopback devices=1 video_nr=10 card_label="OBS Cam" exclusive_caps=1 every time I need to use OBS with virtual cam. Otherwise, I see a message "device open failed". Besides, it's not 100% certain that running modprobe OBS will work properly.

Any idea what I'm doing wrong? Btw, newbie here.

When trying to follow these instructions, I got "device open failed" in OBS.

When following other instructions, no error messages, but nothing would stream.

Any help please? Any step by step instructions for Ubuntu/Mint that really works?

MarioMey commented 3 years ago

@claudemontreal, maybe, that tutorial doesn't "really work" in your computer/system. There is no magic tutorial to make things work in every computer.

You did follow that tutorial...

claudemontreal commented 3 years ago

I can't find where to look in VLC to check if it detects the device.

Firefox does detect Dummy cam (0x0000) but nothing is streaming.

MarioMey commented 3 years ago

imagen

claudemontreal commented 3 years ago

@claudemontreal, maybe, that tutorial doesn't "really work" in your computer/system. There is no magic tutorial to make things work in every computer.

You did follow that tutorial...

* Everything went right?

* Did you install v4l2loopback-dkms or did you compile it?

Not sure, I did so many steps over and over again, following different tutorials. I may have tried both ways.

* Did you compile obs-v4l2sink?

I've installed it, but don't remember if it was by compiling or not.

* After running modproble, was there any error message?

no, no message at all.

* If not, is /video10 in /dev path?

I'm not sure what that means.

* By using VLC, can you see that device in the list?

I can't see that window in VLC. When I click on playlist, like you did, it doesn't pop up.

* If yes, did you try different resolutions (in OBS) and different Video Formats (in obs-v4l2sink)?

I tried all the formats. Only NV12 format seems supported, all the others give me an error message.

MarioMey commented 3 years ago

Not sure, I did so many steps over and over again, following different tutorials. I may have tried both ways. I've installed it, but don't remember if it was by compiling or not.

IMO, when you are lost by installing, removing, compiling... and you get no achievement, you have to start over again, from scratch. So, you will know what you are doing, step by step.

  • If not, is /video10 in /dev path?

I'm not sure what that means.

Do ls /dev. You have to see /video10 there. If it is not there, v4l2loopback module is not installed.

I can't see that window in VLC. When I click on playlist, like you did, it doesn't pop up.

You open that window by clicking on "Open Capture Device" on menu or Ctrl-C.

I tried all the formats. Only NV12 format seems supported, all the others give me an error message.

So, is NV12 working? Why do you say "seems supported"?

I think this is not the place to discuss this... or is it? This is obs-virtual-cam issues page...

claudemontreal commented 3 years ago

Ok deleted all the packages in Synaptic, starting everything over.

I follow this tutorial: https://www.youtube.com/watch?v=Eca509IDLdM

1-I install OBS though command line following their instructions on obsproject.com https://obsproject.com/wiki/install-instructions#linux

2-git clone https://github.com/umlaeute/v4l2loopback.git

3-cd v4l2loopback make make && sudo make install sudo modprobe v4l2loopback

4-ls/dev/video* It gives me: /dev/video0 /dev/video1 /dev/video2

5-Open OBS, go in tools. See the option is not there.

6-It's not in the video tutorial, author forgot a step, but I remember installing obs-v4l2sink so I go here: https://github.com/CatxFish/obs-v4l2sink git clone --recursive https://github.com/obsproject/obs-studio.git git clone https://github.com/CatxFish/obs-v4l2sink.git cd obs-v4l2sink mkdir build && cd build cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr .. make -j4 sudo make install

7-Open OBS again. Choose my desktop as source. Go in tools. I now see V4L2 video output

8-Path: /dev/video2, video format NV12, click start

9-With Firefox, I go to https://www.onlinemictest.com/fr/webcam-test/ It asks me to choose a camera. I choose Dummy video device (0x0000)

And same problem than before. Nothing streams. Stuck at the same place again.

MarioMey commented 3 years ago

Recommendations/suggestions:

claudemontreal commented 3 years ago

Recommendations/suggestions:

* Use `sudo modprobe v4l2loopback devices=1 video_nr=10 card_label="OBS Cam" exclusive_caps=1`. This will create /dev/video10 with name and an option that someone said that it is necessary to use with Chrome (browse).

* Try with Chrome or Chromium. In spite that onlinemitest just worked for mi in Firefox, I had troubles to put OBS in a browser. With Chromium I had no problems and/or a good performance.

* Don't you have any other application to test video? VLC, Cheese, Guvcview, etc.

* At the first time I use this plugin, I go around for hourse until discovered that it didn't work in FullHD, just HD or less. But you already said that you tried with different resolutions...

* Look at OBS messages in console. For this, launch OBS in a terminal and you will see if there is any error.

I just tried with Chrome. It doesn't let me choose which webcam to use and just uses my PC webcam, or it doesn't seem to identify or detect OBS Cam.

In Firefox, it's still not working with that command line. It sees the OBS cam but it doesn't stream anything.

If I select device10 with VLC, it gives me this in the terminal: [00005581eceebb40] main playlist: playlist is empty Segmentation error (core dumped)

No error messages for OBS.

MarioMey commented 3 years ago

Sorry, man. I can't help you more. I suggest to report your problem as an issue in obs-v4l2sink github. You better post all process you do to (try to) make it work and all the messages you receive in console. Maybe someone from there can help you more than me.

Good luck.

floeschie commented 3 years ago

It seems the build system does not quite adjust to the different paths on different distributions (and may different obs-devel versions). On Fedora 31 I had to do the following, which might help some folks: change external/FindLibObs.cmake as follows (look at the changed include):

All I had to do was:

sudo dnf install obs-studio-devel

and then proceed with the cmake command.

webfischi commented 3 years ago

Ok deleted all the packages in Synaptic, starting everything over.

I follow this tutorial: https://www.youtube.com/watch?v=Eca509IDLdM

1-Install OBS through command line following their instructions on obsproject.com https://obsproject.com/wiki/install-instructions#linux

2-git clone https://github.com/umlaeute/v4l2loopback.git

3-cd v4l2loopback make make && sudo make install sudo modprobe v4l2loopback

4-ls/dev/video* It gives me: /dev/video0 /dev/video1 /dev/video2

5-Open OBS, go in tools. See the option is not there.

6-It's not in the video tutorial, author forgot a step, but I remember installing obs-v4l2sink so I go here: https://github.com/CatxFish/obs-v4l2sink git clone --recursive https://github.com/obsproject/obs-studio.git git clone https://github.com/CatxFish/obs-v4l2sink.git cd obs-v4l2sink mkdir build && cd build cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr .. make -j4 sudo make install

7-Open OBS again. Choose my desktop as source. Go in tools. I now see V4L2 video output

8-Path: /dev/video2, video format NV12, click start

9-With Firefox, I go to https://www.onlinemictest.com/fr/webcam-test/ It asks me to choose a camera. I choose Dummy video device (0x0000)

And same problem than before. Nothing streams. Stuck at the same place again.

Seems like this guide needs an update:

1-I install OBS though command line following their instructions on obsproject.com https://obsproject.com/wiki/install-instructions#linux

2-git clone https://github.com/umlaeute/v4l2loopback.git

3-cd v4l2loopback sudo apt install libc6-dev make sudo make install

4-launch obs-studio

5-click the new "start virtual camera" button that appeared

6-enter password

Now you can select OBS Virtual Cam in every application

kqvanity commented 3 years ago

i had to install linux headers , then install v412loopback.deb file .... then just simply start the virtualcam

webfischi commented 3 years ago

It stopped working for me after a kernal update. When I tried to install it, I got a missing System.map skipping depmod error, which seems like a Linux headers issue first, but it actually is a Linux kernel module SSL error. To fix this issue type:

sudo depmod sudo modprobe v4l2loopback sudo make all install clean

Then it should work again.

aryapramudika commented 3 years ago

Ok deleted all the packages in Synaptic, starting everything over. I follow this tutorial: https://www.youtube.com/watch?v=Eca509IDLdM 1-Install OBS through command line following their instructions on obsproject.com https://obsproject.com/wiki/install-instructions#linux 2-git clone https://github.com/umlaeute/v4l2loopback.git 3-cd v4l2loopback make make && sudo make install sudo modprobe v4l2loopback 4-ls/dev/video* It gives me: /dev/video0 /dev/video1 /dev/video2 5-Open OBS, go in tools. See the option is not there. 6-It's not in the video tutorial, author forgot a step, but I remember installing obs-v4l2sink so I go here: https://github.com/CatxFish/obs-v4l2sink git clone --recursive https://github.com/obsproject/obs-studio.git git clone https://github.com/CatxFish/obs-v4l2sink.git cd obs-v4l2sink mkdir build && cd build cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr .. make -j4 sudo make install 7-Open OBS again. Choose my desktop as source. Go in tools. I now see V4L2 video output 8-Path: /dev/video2, video format NV12, click start 9-With Firefox, I go to https://www.onlinemictest.com/fr/webcam-test/ It asks me to choose a camera. I choose Dummy video device (0x0000) And same problem than before. Nothing streams. Stuck at the same place again.

Seems like this guide needs an update:

1-I install OBS though command line following their instructions on obsproject.com https://obsproject.com/wiki/install-instructions#linux

2-git clone https://github.com/umlaeute/v4l2loopback.git

3-cd v4l2loopback sudo apt install libc6-dev make sudo make install

4-launch obs-studio

5-click the new "start virtual camera" button that appeared

6-enter password

Now you can select OBS Virtual Cam in every application

how to change device name "VirtualCam OBS"?

aryapramudika commented 3 years ago

many platform like OME blocked VirtualCam OBS name, how to solve?

MarioMey commented 3 years ago

how to change device name "VirtualCam OBS"?

Here it is: https://github.com/obsproject/obs-studio/blob/master/plugins/linux-v4l2/v4l2-output.c#L56

aryapramudika commented 3 years ago

how to change device name "VirtualCam OBS"?

Here it is: https://github.com/obsproject/obs-studio/blob/master/plugins/linux-v4l2/v4l2-output.c#L56

Thx u :)