14 ms·
OBS (macOS) Virtual Camera
- diroussel 6y agoThis should work in Zoom, as in the latest release of Zoom 5 they have re-enabled virtual webcam support.
- tpetry 6y agoWhy can zoom block a virtual camera? Couldn’t the virtual camera just pretend to be like any other real camera?
- whywhywhywhy 6y agoIt's seemingly a MacOS Code Signing limitation. https://github.com/johnboiles/obs-mac-virtualcam/issues/4 https://github.com/johnboiles/obs-mac-virtualcam/issues/4
- jiveturkey 6y agooptional restriction, not limitation.
- comex 6y agoThe limitation is that CoreMediaIO plugins still run in-process (and not just in some daemon but in arbitrary application processes!), when Apple's direction for over a decade has been to move all plugin mechanisms towards an out-of-process model. There's nothing about video plugins in particular that would prevent them from being out-of-process; in fact, most of Apple's CoreMediaIO plugins already have the bulk of the logic in a separate "assistant" process, but the IPC layer is reimplemented by each individual plugin rather than being done generically by CoreMediaIO itself. It's clear what has to happen, but Apple hasn't done it yet.
- galad87 6y agoBecause an app can disable loading libraries/plugins signed with a different developer id certificate, and it seems Core Media IO wants to load the plugin in the actually app process, and it doesn't use an helper process.
- sschueller 6y agoThis is the downside of a walled garden and locked down devices. Of course many will say its for security and its wonderful but how much freedom are you willing to give up for security?
- colecut 6y agoI'm unfortunately not seeing it in Zoom, even after reinstalling zoom. I see "OBS Virtual Camera" in the source list of Video Capture Device, so I know it's running. I do see Snap Cam (from SnapChat) listed in Zoom, so it doesn't seem to be a global virtual webcam block.
- johnboiles 6y agoThe Zoom release notes are a bit misleading. They didn't enable all virtual cameras, but instead a very specific list of virtual cameras. Here's how you can see that list strings /Applications/zoom.us.app/Contents/Frameworks/nydus.framework/Versions/A/nydus | grep "Developer ID Application" A number of folks have reached out to Zoom support to request that my plugin be added. See the latest in https://github.com/johnboiles/obs-mac-virtualcam/issues/4 https://github.com/johnboiles/obs-mac-virtualcam/issues/4 for details. I wouldn't fault Zoom for being restrictive about what they include in their allow list, since every addition adds risk, but it looks like they've already included closed-source applications from individuals as of 5.0.5. At least my code is open source and auditable!
- developer2 6y agoDoing that grep interestingly includes "Developer ID Application: NewTek, Inc. (W8U66ET244)", which may match the other comment thread[1] talking about NewTek's NDI Virtual Input (note: the top comment there mistyped "NewTek" as "MediaTek"). So using the NDI solution may work with Zoom without editing entitlements. [1] https://news.ycombinator.com/item?id=23406438 https://news.ycombinator.com/item?id=23406438
- wilsmex 6y agoDid @johnboiles get the 10k bounty that was put up (I think by Shopify CEO) for this plugin?
- johnboiles 6y agoNo but iirc the terms from @tobi were that the feature needs to be cross-platform and merged into the main OBS codebase. There is work happening on both of these fronts, and absolutely my goal is to get this plugin merged into OBS eventually. We'll figure out some sort of splitting scheme when that time comes.
- whywhywhywhy 6y agoBeen hoping to use this but it just brings my MBP 2019 to it's knees, like actually feels dangerously hot about 30 seconds after activating it. Windows version doing the same thing feels light as a feather when running (3% CPU, <10% GPU usage)
- groobongithub 6y agoMy experience has been that my MBP gets hot if I try to share a specific window. Switching from a window as a source, to a full screen source has improved OBS performance quite a bit. And I do use this plugin.
- wastedhours 6y agoTangentially related, I've seen that behaviour with Google Meet as well. Sharing a specific tab takes a much bigger performance hit than sharing the whole screen.
- londons_explore 6y agoTab sharing has code deep into the Blink rendering engine... To the extent that it's actually possible to share a specific <div> or other HTML element, even if it isn't visible! (Not sure if you can do that from javascript, but you can totally do it from C++) The side effects seems to be that a bunch of the code that prevents the same thing being re-rendered with every frame if it hasn't changed gets bypassed, and I'd bet that kills performance.
- aksss 6y agoMay go without saying but disabling the video preview really helps resource usage.
- johnboiles 6y agoWhoa I didn't even know this was an OBS feature and (obviously) I've spent a good bit of time with OBS :) I'll definitely be using this!
- dfabulich 6y agoI don't understand what problem OBS solves. It records video, but Windows and macOS already come with video recorders built in. So OBS is better somehow. How? Why is OBS better than built-in OS recorders?
- dbbk 6y agoIt does more than record video. The use case I have for it is applying green screen to a camera feed, and then being able to pipe that video into an app that doesn't natively support green screens (ie Google Meet)
- aloer 6y agoIs the project linked here what you use to add OBS output to a video call or is there another way? What would I do if I want the enhanced stream to be piped to screen share instead of webcam? Most video chat solutions will show webcam and shared screen differently
- rzzzt 6y agoVirtualCam was already a thing, but only for Windows (not sure what is the backstory behind the more recent version being maintained by someone else; I think I'm using catxfish's version): https://obsproject.com/forum/resources/obs-virtualcam.539/ https://obsproject.com/forum/resources/obs-virtualcam.539/ OBS has full desktop as well as window capturing capabilities, so if you only want to show the contents of a single window, you would add a "window capture" item to your scene: https://github.com/obsproject/obs-studio/wiki/Sources-Guide#window-capture https://github.com/obsproject/obs-studio/wiki/Sources-Guide#... ...then select "VirtualCam" from the Tools menu, and click "Start" to start sending images to the selected virtual camera. These virtual devices appear in eg. Zoom, so if you select it and enable video within the app, others will see 5 faces and Visual Studio Code having a conversation. (Of course you can add more sources to the scene, aligning them appropriately, so you can have your face in the corner alongside the captured window.)
- mdszy 6y agoOBS is primarily for streaming. It also has a lot of advanced features beyond simple recording of a video source or your screen. ALSO the name is literally "open broadcaster studio" Maybe take two seconds to investigate what you're talking about before making comments like this. Sheesh.
- rcarmo 6y agoYou can also use MediaTek's NDI Virtual Input with some desktop apps (like Skype), but I personally use this with OBS to do two things: - Send out a composite overlay (screen capture + webcam + lower thirds) on Teams/Skype/etc. - Send out screen capture from another machine (usually OBS to OBS via NDI and then out via this plugin) OBS is a lot of fun, but, alas, extremely demanding on system resources in some configurations, enough that I've started considering getting a new machine solely for video conferencing.
- mistersquid 6y agoSearching for "MediaTek NDI Virtual Input" does not turn up results with "MediaTek" for me. Did you mean "NewTek" or another NDI tool? I couldn't find an NDI product for macOS from NewTek.
- kfriede 6y agoYes, it's NewTek. Specifically you're looking for this page: https://ndi.tv/tools/#download-tools https://ndi.tv/tools/#download-tools
- fsflyer 6y agoNewTek does NDI for Mac. The tools and SDK are available for Mac. https://ndi.tv/tools/ https://ndi.tv/tools/ The OBS NDI plugin is not part of OBS proper, but available separately: https://github.com/Palakis/obs-ndi/releases https://github.com/Palakis/obs-ndi/releases
- developer2 6y agoHoly smokeballs, thank you so freaking much!!! This thread caught my eye as I've been wanting to customize my Zoom and MS Teams "stream" (ie. webcam + extra background/overlay goodies). I hate to say it, but I skipped past the OP's project and tried this suggestion of NDI first. Amazing. It took a good 30 minutes to figure it all out, but I now have the output of OBS (in my case, just the preview itself without needing to stream/record) as a video/webcam input source for Zoom, Microsoft Teams, and within Firefox. Note: doesn't work with Discord or QuickTime's File > New Movie Recording. And all this with me being on macOS. Not Windows, but macOS. Incredible. Steps (should work for macOS and Windows, not sure about Linux): 1. Install OBS. Run it, and set up a basic scene for testing (eg. webcam and a text label). 2. Download/install NDI Tools for your OS from https://ndi.tv/tools/#download-tools https://ndi.tv/tools/#download-tools (note: system restart required). You only need the "NDI Virtual Input" app; on macOS each app had its own .pkg file bundled in the single .dmg archive; on Windows I assume it's an install wizard with checkboxes for each component. Again, only need "NDI Virtual Input" app/component. 3. Run the NDI Virtual Input application installed in step 2. It should live in your systray (without doing anything useful yet). 4. Download/install the obs-ndi plugin for your OS from https://github.com/Palakis/obs-ndi/releases https://github.com/Palakis/obs-ndi/releases - right now for Windows or macOS it's version 4.9.0 (expand the "Assets" link). There's a 4.9.1 update specifically for Ubuntu/Debian, but I'm not sure how those OS's are supported when there is no NDI Tools for Linux in step 2. 5. Run OBS. If you're lazy and didn't read the GitHub release notes in step 4, starting OBS should popup with a direct link to the NDI runtime you also need to download/install; then restart OBS. 6. In OBS, go to Tools > NDI Output Settings. If you want to "clone" the OBS output to the NDI virtual device only when you start streaming/recording in OBS (ie. to disk or to a streaming platform like Twitch), check "Main Output". Otherwise check "Preview Output", in which case your OBS preview will be output to the virtual video device at all times without having to start OBS streaming/recording. 7. In your operating system's systray (ie. top-right on macOS, bottom-right on Windows), you should have an NDI icon living there as started in step 3. With OBS running and configured according to step 6, you should be able to click the systray icon and select that output source as the input source for the NDI virtual device. 8. Open Zoom, Teams, or hopefully other apps which will work. Wherever you configure which input source to use for video/camera within that app's settings, there should be an "NDI Video" source. Select that… and BAM – your OBS canvas is now your input source!! That took so long to type out, I hope someone manages to make use of it. :)
- oger 6y agoFinally. I‘ve been waiting / looking for a decent solution for quite a while now...
- wegs 6y agoWhat was wrong with CamTwist? I've been using OBS+CamTwist to do this for years now. I mean, this will save a couple minutes setup time, but it's not like that wasn't decent.
- BrandonSmith 6y agoCamTwist requires disabling macOS SIP. For many this is too high bar.
- jonpurdy 6y agoI find that CamTwist destroys the i7 on my 2015 13" MBP as well, slowing it down so much that I can barely use Google Sheets at the same time.
- weakwire 6y agoFinally!
- ceocoder 6y agoIf you are a linux user and own a nice camera you can use gphoto2 and ffmpeg to create a virtual camera. I posted howto on HN couple of days ago[0][1], here it is for anyone who might need it. I tried it with both Sony RX100VA and Sony A7III, in both cases it works really well. edit: forgot to mention that this works over USB, you don't have to pay crazy markup for capture card edit2: (because I'm so excited about getting this to work) here is a list of supported cameras[2] - sadly I was not able to get GoPro Hero 6 to work. [0] https://www.crackedthecode.co/how-to-use-your-dslr-as-a-webcam-in-linux/ https://www.crackedthecode.co/how-to-use-your-dslr-as-a-webc... [1] https://news.ycombinator.com/item?id=23325143 https://news.ycombinator.com/item?id=23325143 [2] http://www.gphoto.org/proj/libgphoto2/support.php http://www.gphoto.org/proj/libgphoto2/support.php
- christiangenco 6y agoHah, I just followed your guide after stumbling on it on Google yesterday to set up a Canon M50 on Linux Mint! It works incredibly well—heads and shoulders above the video quality from a webcam, and now that I'm piping video through ffmpeg there's tons of potential to do some weird stuff with filters and swapping to pre-recorded video.
- ceocoder 6y agoI wish I can take credit for this, Ben Chapman did all the work, I just happened to google it :) And yeah, 100% agree on video quality, it is so much better than what you get from that potato sensor on MBP
- bronco21016 6y agoDo you have any idea if this works with the older GoPro models? Plan to give it a go later tonight but wondering if anyone has any success stories.
- dmerrick 6y agoIt does not look like it does: http://www.gphoto.org/proj/libgphoto2/support.php http://www.gphoto.org/proj/libgphoto2/support.php
- wbobeirne 6y agoI recently tried to do some work on making a virtual camera, and was shocked to see just how difficult it is, let alone making something cross-platform. Anyone know of any projects that are trying to make this easier to hack on?
- farisjarrah 6y agoThis project seems like its the farthest along in this endeavor on linux: https://github.com/umlaeute/v4l2loopback https://github.com/umlaeute/v4l2loopback
- johnboiles 6y agoNot sure about cross-platform, but for macOS I started this plugin by creating a minimal virtual camera: https://github.com/johnboiles/coremediaio-dal-minimal-example https://github.com/johnboiles/coremediaio-dal-minimal-exampl... @seanchas116 made a Swift port of my minimal example https://github.com/seanchas116/SimpleDALPlugin https://github.com/seanchas116/SimpleDALPlugin Overall it _was_ very difficult! Apple's documentation and sample code for CoreMediaIO DAL (virtual camera) plugins are terrible. I just brute forced it for hours trying all sorts of different combinations of things before I got something to work.
- andrekandre 6y agothis is fantastic, i wish i had your example when i worked on mine (closed source)... it was the same for me, total brute force ... and apples examples are in c++ but i ended up doing it using straight c out of frustration since thier (c++) examples were so convoluted
- johnboiles 6y agoVery very convoluted. I found it near impossible to read.
- an_opabinia 6y agoUse Wirecast instead. It works better. OBS just isn’t for macOS users. If you record video with it it’ll be corrupted. The performance is bad. It’s for people who stream to Twitch on a Windows computer. The real problem is that the macOS security model broke virtual cameras in the latest version of Zoom.
- zapzupnz 6y agoCan you substantiate any of your claims? I've used OBS on macOS for a long time and your experience doesn't correspond to mine. It's true that there are some performance concerns and hardware encoding isn't available for streaming purposes on macOS due Apple's Video Toolbox API not exposing the appropriate encoder options. However, I doubt that OBS would be responsible for corrupted video. It uses the industry-standard x264 encoder — if there's a problem with the video, it derives from (A) your settings, and (B) x264. I'm more inclined to believe A than B. I'm more than happy to use Wirecast if you'll pay for a licence. I and most other people, mostly amateurs, don't have a spare US$599 lying around.
- AdamGibbins 6y ago> If you record video with it it’ll be corrupted You state this like a fact. I have recorded video, it was not corrupted. OBS works fine for my needs.
- FraKtus 6y agoI am a happy OBS user on macOS and use it both from streaming and recording. I never had any issue playing an OBS recording on macOS or uploading it to YouTube.
- some-guy 6y agoSlight tangent, does anyone know of any virtual "audio" device (in Mac OS or Windows) that you can attach VSTs / AUs to? I know that technically Zoom allows you to share computer audio but a controlled audio device would allow more granular control of the input.
- stevenpetryk 6y agoMaybe Soundflower? https://rogueamoeba.com/freebies/soundflower/ https://rogueamoeba.com/freebies/soundflower/
- philsnow 6y agoOne of these (probably Loopback?) should work https://rogueamoeba.com/ https://rogueamoeba.com/ I don't know of free, good alternatives.
- zapzupnz 6y agoFree: iShowU Audio, Soundflower Paid: Loopback, Audio Hijack, Sound Siphon
- adamzegelin 6y agoSoundflower + AULab (download from https://developer.apple.com/download/more/ https://developer.apple.com/download/more/), both free. Alt AULab link, without the requirement of an Apple ID to download: https://www.apple.com/ca/itunes/mastered-for-itunes/ https://www.apple.com/ca/itunes/mastered-for-itunes/
- savoyard 6y agoBlackHole [1] is a modern alternative to Soundflower. [1] https://github.com/ExistentialAudio/BlackHole https://github.com/ExistentialAudio/BlackHole
- jack_maris 6y agoSeconding blackhole, in my experience it works as well as Soundflower worked 5 years ago
- 6y ago
- alpb 6y agoI've been using this repo for a while now and it's a champ. It has been making my webcam rock, as OBS does a great job chroma key'ing green screen behind me. Plus I can add effects as I wish. Thanks for reminding this and I'll make a donation to this person. Hope this becomes the actual implementation and he gets the $10k bounty by @tobi.
- skrowl 6y agoDroidCam (works on iOS too despite the name) https://www.dev47apps.com/ https://www.dev47apps.com/ works great on Windows if you're looking for an alternative on a business / gaming OS and you have a smartphone (or tablet). I've used it with Zoom / Google Meet / Discord and it's never failed me.
- ojosilva 6y agoI use Iriun Webcam to use my (leftover) Android phone as a webcam into my MacBook Air and iMac, with Zoom, OBS and Quicktime. It works pretty decently, the only gripe is that I can't control exposure from the phone camera so it needs the right lighting to look nice. There are also other apps out there, besides DroidCam and Iriun, that support different phone-computer connections.
- supernintendo 6y agoFor anyone looking to set up a virtual OBS webcam in Arch Linux, here's how I did it: 1. Install headers for your Linux kernel: - sudo pacman -S linux56-headers 2. Install v4l2loopback-dkms from AUR: - git clone https://aur.archlinux.org/v4l2loopback-dkms.git - cd v4l2loopback-dkms - makepkg -scCi 3. Create a virtual video capture device: - sudo modprobe v4l2loopback devices=1 video_nr=10 card_label="OBS Cam" exclusive_caps=1 4. Set up a virtual audio device to avoid latency: - sudo modprobe snd-aloop index=10 id="OBS Mic" - pacmd 'update-source-proplist alsa_input.platform-snd_aloop.0.analog-stereo device.description="OBS Mic"' 5. Run ffmpeg: ffmpeg -an -probesize 32 -analyzeduration 0 -listen 1 -i rtmp://127.0.0.1:1935/live/test -f v4l2 -vcodec rawvideo /dev/video10 6. Setup OBS to stream to ffmpeg: - File > Settings > Stream, set Service to "Custom..." and "Server" to `rtmp://127.0.0.1:1935/live/test` 7. Setup low latency streaming: - File > Settings > Output, set Buffer Size to 0, CPU Usage Preset to "ultrafast" and Tune to "zerolatency". 8. Start Streaming in OBS. 9. Select your virtual camera and audio devices in Google Meet / Zoom / etc. I get virtually no latency with this setup but I'm running an AMD Ryzen 7 2700X with 32GB of RAM. As always, YMMV.
- tobias2014 6y agoOr you can use the obs v4l2loopback plugin to replace steps 5 and 6: https://github.com/CatxFish/obs-v4l2sink https://github.com/CatxFish/obs-v4l2sink
- supernintendo 6y agoThanks! I’ll try this out.
- fouc 6y agoAny idea if we could just simplify this by using a virtualbox VM setup with the right software? Then it'd be cross platform and just a matter of running an optimized VM that can run on a limited amount of resources.
- jabberwik 6y agoMost meeting software already allows you to broadcast your webcam and a screen-share session at the same time. So this is only necessary if you want your webcam feed to be embedded inside your screen-share, and you want your screen-share to be your webcam feed. For example, this sounds like it would be a horrible experience in something like a Zoom gallery view. Am I understanding correctly?
- rahimnathwani 6y agoOBS can do a lot more than embed your webcam over your screen share. You can: - combine and arrange multiple portions of the screen as you like - filter things - switch between different layouts whilst you're in a call
- jabberwik 6y agoI'm asking specifically about the virtual camera. Why not just screen-share OBS' preview window?
- frob 6y agoI believe you aren't. Obs+virtual cam means you can run a live, multifeed show without having to rely on zooms auto-switching. Essentially, you can spotlight your feed, use zoom and other software to feed into obs, and then have a talking-heads experience with multiple people on the same view at the same time without the jumping jitters between two speakers. You can also then embed anything else you want, like video files, images, text, etc. Essentially, it let's you run a live production over zoom and it is a blast. I've run two shows myself and helped with tech on another two with this setup and they've all been fun.
- jabberwik 6y agoThe advantages of OBS are clear, but I still don't understand the virtual camera. Why not just screen-share OBS' preview window?
- 6y ago
- j45 6y agoZoom appears to have released an update fixing the Virtual Cam Support. "Changes to existing features Re-enable virtual camera support Support for virtual cameras will be re-enabled for users on client version 5.0.4. " https://support.zoom.us/hc/en-us/articles/201361963 https://support.zoom.us/hc/en-us/articles/201361963
- johnboiles 6y agoThose release notes are a bit misleading. See my comment above
- j45 6y agoThanks for taking the time to bring my attention to it.
- PatrolX 6y agoCanon recently released a driver that lets you use an EOS camera as a USB webcam. It's available for Mac and Windows. So you can use it directly as a normal webcam or pull it into OBS and manipulate it with filters and text etc. then use OP's tool to output the OBS processed version of your EOS. https://www.usa.canon.com/internet/portal/us/home/support/self-help-center/eos-webcam-utility/ https://www.usa.canon.com/internet/portal/us/home/support/se...
- baliex 6y agoHoly macaroni this looks exciting!! Sadly it only supports a rather short list of cameras, their latest and greatest by the looks of things. The whole 5D range normally gets this sort of thing but this time it starts on the IV unfortunately.
- ojosilva 6y agoI'm excited about this... But I wonder how much resources it requires to stream 720p 30fps into my older Macs without jitter and dropped frames. I had higher hopes on Elgato Cam Link, if it was in stock anywhere, since it does the processing on chip, but it's just speculation since not a lot of people measure performance on these setups either because it all works so well on Windows and/or they have high end machines for gaming (also Windows). Very few streamers/reviwers use Mac as it is underperformant and undersupported in the video streaming arena. It's really frustrating to realize this right in the middle of this "new normal" where webcams and video capture devices are all sold-out globally and one finds himself with a couple of video-worthless Macs. Ironically Apple came up with FireWire a long time ago to bring (mostly prerecorded) video faster into Macs and now they lag far behind in every aspect related to video. This includes their webcams, which are terrible. Now that's a different story on iOS devices...
- unkulunkulu 6y agoThank you! This is very relevant! Now I get a zoom meeting with my friends aaaand, chatroulette, here we go!
- raben_ 6y agoCamtwist can be another option if you want a virtual cam on Mac http://camtwiststudio.com/ http://camtwiststudio.com/
- saikiran91 6y agoThis is a good news.