Jay Taylor's notes

back to listing index

Share your desktop as a webcam in OBS, Hangouts, Zoom etc. | Hacker News

[web search]
Original source (news.ycombinator.com)
Tags: zoom webcam news.ycombinator.com
Clipped on: 2020-04-18

Image (Asset 1/2) alt=


Image (Asset 2/2) alt=
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

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.


Other iOS methods that may also be useful (as a general FYI):

If you're just looking to share your iOS device to Zoom or other meeting apps, you can long-press the Control Center "Screen Recording" icon to select which app to direct your screen sharing to.

If you'd like your iOS/tvOS device to be shown in a window on your desktop using only native iOS/tvOS/macOS tools, you can plug it into a macOS computer and use Quicktime Player > File > New Movie Recording and then select the iOS/tvOS device from the dropdown to the right of the Record button — no need to start recording — and it'll give you a live low-latency view of the iOS device.


In the more casual-ish Zoom rooms I’m in. It’s pretty disliked for someone to natively Zoom screen share. Takes up too much space and initially focuses too much too.

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.


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.

You could use scrcpy (or even Miracast) to send an Android phone's screen on your PC, and then use your favourite virtual webcam app to share the stream with Zoom.

Any one have any idea why the screen capture and cam apps have low-ish stars? I know how flimsy and unreliable App Store reviews are. Still wondering.

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


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.


It's being worked on:

Tobi Lutke (Shopify CEO) has put out a $10,000 bounty for cross platform virtual camera for OBS

- https://twitter.com/tobi/status/1242641154576965634

- https://github.com/obsproject/obs-studio/issues/2568

- https://github.com/obsproject/rfcs/pull/15

via dashesyan https://news.ycombinator.com/item?id=22749401


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

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.


Thanks for posting. I will give it a shot!

On OS X 10.9 (which I'm running), I use CamTwist (v3.0) for this. I have no idea if CamTwist also works in modern macOS, but probably worth a try.

http://camtwiststudio.com/


Went down that rabbit hole this weekend too, I got an HDMI capture device so I could stream my Switch on Zoom with friends and the lack of virtual cam in OBS was a bummer. Hopefully it will be added soon.


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.


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"

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

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.

Anyone else reading this post and wondering if it's worth trying, I was able to get it working on ubuntu 18.04 without much fuss, just followed this post[1] and compiled v4l2loopback from source[2] (needed to have version >=12)

[1] https://srcco.de/posts/using-obs-studio-with-v4l2-for-google...

[2] https://github.com/umlaeute/v4l2loopback/tree/v0.12.3


Some time ago I got it working with ffmpeg with raw video, but I'm afraid it got lost in bash history.

edit: Relevant section from my ~/.config/obs-studio/profiles/Untitled/basic.ini

    [AdvOut]
    TrackIndex=1
    RecType=FFmpeg
    RecTracks=1
    FFOutputToFile=false
    FFFilePath=/dev
    FFURL=tcp://localhost:55555
    FFFormat=rawvideo
    FFFormatMimeType=
    FFExtension=yuv
    FFVEncoderId=13
    FFVEncoder=rawvideo
    FFAEncoderId=0
    FFAEncoder=
    FFAudioMixes=1
    FFVCustom=
    Encoder=obs_x264
    FFVBitrate=15000
    RescaleRes=1600x900
    RecRescaleRes=1600x900
    FFRescaleRes=1600x900
    FFMCustom=
    FFVGOPSize=50
    FFIgnoreCompat=false
In the UI these stuff are set under Output > Recording, Type is "Custom Output (FFmpeg)". It did require some fiddling on the receiving side in my ffmpeg command line.

Did you try purging the dkms version and building the one in the post?

I also spent an inordinate amount of time messing with it, but in the end the actual steps that worked were simple. I couldn't get it to work with my flatpak version, and Debian stable is not fun trying to compile OBS (need more recent version of cmake).

But Ubuntu should be more straightforward... Did you get the option in the Tool menu yet? The other thing I got reading through all the GitHub issues was the need to sometimes change the YUV setting in that dialogue to YU2 (from memory).

Hope you get it cracked without much grief, and I can share what I can remember fwiw.


I did attempt purge DKMS, and confirmed the kernel module is the one I've just compiled.

I have it in the tool menu in OBS Studio. If I start the stream with RGB the camera doesn't work. If I start it with YUV32 as suggested in most guides, OBS just segfaults. switching it to YU2 was a helpful hint -- it just doesn't work as opposed to segfaulting.


Another quick thought, did you check you're using the right device? In that tool menu dialogue you could switch it to 0 instead of 1 etc or try grepping for the device list...

And can you view the device in VLC even when RGB? There are individual settings per input for RGB/YUV etc which I think default to the latter.


I updated the top comment, but you got me looking closer at the device list. It seems that v4l2loopback and my webcam were interfering with each other. rmmod-ing v4l2loopback, running the mopprobe myself, unplugging my webcam and plugging it back in seemed to resolve it.

Eyy, victory. Linux, the OS you love to hate. Wouldn't have it any other way.

Is your system running Wayland? I recall OBS screenshare wasn’t compatible with Wayland at all. I had to log out and log in using the X11 fallback to get it to work. It’s a rather unfortunate condition that past tutorials say “just do XYZ and it works” but they quietly assumed X11.

It's not the screenshare that's the problem, it's the v4l loopback to emulate a webcam

The joys of working with Linux ;)

I'm on RHEL. The install instructions for OBS Studio go on for paragraph after paragraph.


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?

Snap Camera comes close.

https://snapcamera.snapchat.com/


On Windows there's Facerig [0], although I don't think it does arm motions. It also has a Live2D plugin that does cel-style rendering [1].

[0] https://facerig.com/

[1] https://youtu.be/OQ6nTQW4u94?t=12


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.

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.

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

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

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...


The release page doesn't have what you want?

https://github.com/webcamoid/webcamoid/releases


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/ 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.


Which is scary, and unintentional gate keeping, because the average user sees a GitHub landing page as a list of folders they have no clue what to do with - and leaves.

No scrolling, no clicking "Readme.MD". They just give up. Seen it happen personally, unfortunately.


It might be available on your distro. It is certainly available on Debian.

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


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.

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

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.


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.


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.

> to share your desktop with more than 1 person (Hangouts) > to not have your meeting cut off at 40 minutes if over 3 people (Zoom). > Or you could play your old home movies and films to friends and family. Your call!

Ok, I guess it's a neat little hack


Share both your desktop and your face. Share specific windows instead of the whole desktop. Then there is the scene builder that lets you basically do anything.

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

you can already share your desktop in zoom

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



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: