
Share your desktop as a webcam in OBS, Hangouts, Zoom etc. - luxpir
https://lukespear.co.uk/blog/share-desktop-as-webcam-in-obs-loopback/
======
Tepix
On iOS you can use the NDI HX capture app (currently free) to stream via low
latency NDI protocol to your PC. There‘s a video guide at Newtek.com.

App link: [https://apps.apple.com/de/app/ndi-hx-
capture/id1501247823](https://apps.apple.com/de/app/ndi-hx-
capture/id1501247823)

Their NDI HX camera app is also currently free. It turns your iPhone / iPad
into a low latency wireless webcam.

You can use these with the OBS NDI plugin or the software provided by Newtek
which turns an NDI source into a virtual camera.

~~~
JonathanFly
Just what I was looking for. It is quite literally cheaper to buy a used or
cheap smartphone than a webcam right now.

Is there anything this good an Android? There's a lot of apps that promise to
do it but they look a bit suspicious and I'm wary about putting them on my
phone.

~~~
skinnymuch
It says iOS 13.1 or later required. Brand new or refurbished at least, iOS
devices that can run iOS 13 aren’t that cheap yet. So yeah for sure I’d be
interested in an android equivalent. Little knowledge of the ecosystem but I
assume getting an okay Android device mostly just for this would be pretty
cheap.

------
rjmunro
The title of this is confusing. It should be something like "Share OBS output
as a webcam in Hangouts, Zoom etc."

OBS can do vision mixing between Webcams, pre-recorded video files, Screen
shares, NDI streams etc. with picture in picture, chroma key and many other
features.

I actually wanted to do this about 10 years ago. I posted a question on
superuser and it's still getting upvotes now:
[https://superuser.com/q/78515/742](https://superuser.com/q/78515/742)

------
joecot
I'm on ubuntu 18.04 and haven't been able to get v4l2loopback related setup to
work with OBS using the obs-v4l2sink

* With the packages OBS Studio or the newest compiled

* With the DMKS v4l2loopback kernel module or the newest compiled

EDIT: Thank you for helpful comments. I managed to get this to work by:

1\. Purging my existing v4l2loopback-dkms

2\. Compiling latest v4l2loopback kernel module

3\. Compiling latest OBS Studio

4\. Compiling latest obs-v4l2sink plugin

5\. sudo rmmod v4l2loopback

6\. sudo modprobe v4l2loopback devices=1 video_nr=10 card_label="OBS Cam"
exclusive_caps=1

7\. unplugging my webcam and plugging it back in

If you're currently having problems, before trying 1-4, try 5-7. It seems like
v4l2loopback is getting loaded on boot, and some combo of that and my existing
webcam was messing this up. Once I rmmod the kernel module and put it back,
capture works but my webcam is gone. When I unplug my webcam and put it back,
it all works. It may very well work fine with the standard v4l2loopback-dkms
and obs packages without having to compile latest.

~~~
tastroder
Weird, worked pretty out of the box here besides some of the v4l2 parameters
for application compatibility. My system is a bit outdated though,
v4l2loopback-dkms 0.9.1-4ubuntu0.1 and OBS 24.0.3 (64 bit, installed through
whatever the quickstart guide suggested for Ubuntu).

I'm using this to initialize the loopback device:

    
    
        #!/bin/bash
        set -e
        if lsmod | grep "v4l2loopback" &> /dev/null ; then
            echo "v4l2loopback is loaded"
            lsmod | grep "v4l2loopback"
            sudo rmmod v4l2loopback
        fi
        sudo modprobe v4l2loopback devices=1 video_nr=2 exclusive_caps=1
        lsmod | grep "v4l2loopback"

~~~
joecot
I think you led me to the problem. I updated the original comment, but I think
the issue was that v4l2loopback was being loaded without any options and
screwing me up, so rmmod ing it and reloading it seems to help

~~~
nybble41
You can set default module options through a file in /etc/modprobe.d/. If
you're using systemd, it can also be configured to load the module
automatically on startup. This is what I'm using:

/etc/modprobe.d/v4l2loopback.conf:

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

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

    
    
        v4l2loopback
    

Working flawlessly so far in Hangouts and Zoom using OBS Studio and the
obs-v4lsink plugin.

------
cjcampbell
I'd been looking into OBS/obs-virtualcam until I discovered that macOS support
wasn't there.

Not free, but I have successfully tested ManyCam, which I believe will work
well for my streamlining the process of switching between screenshare and
secondary camera sources for Zoom.

~~~
johnboiles
I made a plugin that sorta works for this last week:
[https://github.com/johnboiles/obs-mac-
virtualcam](https://github.com/johnboiles/obs-mac-virtualcam)

~~~
skinnymuch
Awesome! Even if it is buggy or won’t work for me when I try it. Great that
you already have this shipped. Not saying it is buggy. Just if it is, no
problem having this out already!

Been waiting for something for OBS for a while. since 2019 when Mojave made
Syphon injecting much harder due to security changes. And demand for it and
any other similar injecting almost entirely waned.

------
elicash
Is there something I can use besides Adobe Character Animator to stream a
cartoon version of myself to Hangouts and Zoom? Something that talks when I
do, uses my webcam to copy my movements, press keys to move arms, etc?

~~~
skrebbel
Snap Camera comes close.

[https://snapcamera.snapchat.com/](https://snapcamera.snapchat.com/)

------
StaticSaga
I use this solution in a similar way, but I usually share a single window. I
use this command, change /dev/video2 with your virtual output and WINXID with
the XID of the window you want to view (use xwininfo to get it).

    
    
      gst-launch-1.0 ximagesrc use-damage=0 xid=WINXID ! videoconvert ! video/x-raw,format=YUY2 ! videoconvert ! queue ! v4l2sink device=/dev/video2
    

Also, I usually combine it with scrcpy, so I can share my Android
phone/tablet's screen on my computer's videoconference session.

------
KingMachiavelli
It's also a pretty good solution if you just want to display a static image or
loop a 5 minute clip giving the appearence of having video enabled and making
your screen more identifiable.

~~~
Igelau
Just a five minute loop of thoughtful nodding and the occasional brow furrow.

------
fangfufu
Just use webcamoid and get it done and over with. It is less hack.

~~~
bdcravens
You say that like it's a quick install. You have to build it on your machine
apparently:

[https://github.com/webcamoid/webcamoid/wiki/Raw-build-and-
in...](https://github.com/webcamoid/webcamoid/wiki/Raw-build-and-install)

~~~
poyu
The release page doesn't have what you want?

[https://github.com/webcamoid/webcamoid/releases](https://github.com/webcamoid/webcamoid/releases)

~~~
bdcravens
At first glance, those might work, but when I go to the README, there's no
mention of those binaries, and it links to the wiki under "Build and Install".

However going to the project website at
[https://webcamoid.github.io/](https://webcamoid.github.io/) it does link to
the executables, which is a little clearer.

I guess I've gotten used to going to the Github repo for projects more than
most would.

------
numpad0
I use SCFH DSF[0], updated for almost a decade and English support is a bit
limited but works mostly fine

[0]
[http://mosax.sakura.ne.jp/yp4g/fswiki.cgi?page=SCFH+DSF](http://mosax.sakura.ne.jp/yp4g/fswiki.cgi?page=SCFH+DSF)

------
imperialdrive
Good timing on the article - I was just setting this up yesterday with some
luck (Snap Camera doesn't seem to respect the virtual cam instance) but still
very cool.

------
ronyfadel
What's the use of this? I'm genuinely confused. Can't you already share your
Desktop in Hangouts/Zoom/etc..?

~~~
moron4hire
I don't get it for OBS, but for the teleconf apps it can let multiple people
share screens at the same time (rather than taking over presenter role), and
conceivable work better in browser versions that don't support desktop sharing
(I think chromium requires an extra plugin).

Edit: also, the page conspicuously mentions several times that it can be used
for "educational purposes" to steam video running on the desktop, so it seems
the intention is pirating video.

~~~
luxpir
A little uncharitable to say the entire intention is pirating, especially
given the global pandemic, quarantining and social issues this can help with.

But yes, showing legal or illegal copies of movies you own or don't own is
possible if one were so inclined, among the myriad legit uses. I can see why
it looked like that was implied.

~~~
moron4hire
If the page hadn't been so "wink wink nudge knudge" about it, you might have a
point. But they went out of their way to mention "for educational purposes" in
some very awkward ways, several times.

------
darkengine
This is a godsend. Zoom screen share doesn't seem to work at all on Wayland.

------
platz
you can already share your desktop in zoom

~~~
Igelau
Right, but this is about streaming something else instead of the webcam video.

