Hacker News new | ask | show | jobs
by atoav 2259 days ago
I wonder: does anyone know of a solution which does something similar in a more software agnostic way? I imagine a software that takes a webcam manipulates the image and emulates another webcam which one could select then in every software that supports webcams.

Does such a thing exist?

6 comments

On Linux ffmpeg can output to a /dev/videoX device using v4l2loopback in order to spoof a webcam, I was able to play a looped video as a webcam and connect to websites that require a webcam.

On kubuntu I had to mknod (I think) the video device, then apt install v4l2loopback, then modprobe videodev and the v4l2loopback module, then use ffmpeg.

ffmpeg can capture from any video source including your running Xsession (eg a desktop area). So in theory you could output a pythonCV window or something this way.

OBS can probably do that better.

Yes, you can do this with OBS. The virtual webcam feature can be added as a plugin. And chroma-keying is a built-in feature. I use a Mac, and I've been toying with this a bit over the last weeks (e.g. https://davidbieber.com/snippets/2020-04-09-exploring-obs/)
It's super easy...if you have a suitable chromakey backdrop and decent lighting on it. What I'd love is a plugin that replicates (or at least approximates) some of the "virtual chromakey" features of Zoom et al.

I don't currently have access to a good chromakey backdrop and it really is much easier to do it well with a bright green matte screen behind you.

It ain't important, but it would sure be nice!

For Windows, Snapchat have a standalone virtual cam called Snapcamera https://snapcamera.snapchat.com/

There are green screen plugins for that. You could chain Snapcamera's virtual cam output into OBS and use OBS 's chromakey filter to underlay whatever other content you like. Y I u can then output OBS to another virtual cam output for use in Zoom or wherever else via the Virtualcam plugin for OBS.

It'd be really nice if someone would make a nice OpenCV virtualcam output so one could drive all this from a (relatively) simple Python script.

Oh hey, this worked fairly well. I used one of the Snap fake-greenscreen filters and fed it to OBS as you suggested. It really does highlight the limitations of fake-chromakey (edges are fuzzy/flickery) but that's to be expected without a real, properly lit backdrop.

I won't be using this in any work meetings but it could be fun for calls with friends.

https://www.xsplit.com/vcam and https://www.chromacam.me

both work with OBS, but only for Windows or Mac.

Windows only. No Mac support.
Snap Camera, CamTwist, and OBS are all options for that. Zoom recently had issues with using these virtual webcams on macOS, don't know if it's been fixed.
Snap camera and Zoom on macOS works well. I used it all the time.
The tricky bit for OS X is that there isn't a virtual webcam driver for it. (Someone posted a proposed bounty last month: https://news.ycombinator.com/item?id=22686333)

You can do this today on Windows and Linux, I believe.

Snapcamera.snapchat.com does this!