News for hackers. Stuff that matters.
Re:OBS (macOS) Virtual Camera by whywhywhywhy on Wednesday June 03, 2020 @01:34PM (#23406160)
Been 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)

Re:OBS (macOS) Virtual Camera by johnboiles on Wednesday June 03, 2020 @05:04PM (#23408722)
FWIW there's definitely some performance optimization that could be done in my plugin. Three things I know of:

1) Potentially an entire framebuffer memory copy could be avoided if we could get CMBlockBufferCreateWithMemoryBlock to work. See the CMSampleBufferCreateFromDataNoCopy method (currently unused -- linked below) in my code. It mostly worked but the virtual camera video wouldn't show up at full resolution in OBS, which is how I typically test while developing. Not sure why it wasn't working; possible it's an obscure OBS bug.

https://github.com/johnboiles/obs-mac-virtualcam/blob/master...

2) It might also be possible to get the virtual camera to advertise one of the pixel formats that OBS supports natively which would avoid the pixel format conversion in the CPU. I _bet_ this is where the majority of the performance hit from my plugin happens. I'm not sure if this is possible, however. Maybe OBS doesn't natively support any formats you can use for virtual cameras.

https://github.com/johnboiles/obs-mac-virtualcam/issues/102

3) If #2 isn't possible, maybe the pixel format transformation could happen on the GPU? I don't know much about GPU programming but maybe this would help.

Re:OBS (macOS) Virtual Camera by aksss on Wednesday June 03, 2020 @02:27PM (#23406895)
May go without saying but disabling the video preview really helps resource usage.
Re:OBS (macOS) Virtual Camera by johnboiles on Wednesday June 03, 2020 @04:57PM (#23408631)
Whoa 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!

Re:OBS (macOS) Virtual Camera by groobongithub on Wednesday June 03, 2020 @01:43PM (#23406284)
My 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.

Re:OBS (macOS) Virtual Camera by wastedhours on Wednesday June 03, 2020 @01:49PM (#23406377)
Tangentially 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.
Re:OBS (macOS) Virtual Camera by londons_explore on Wednesday June 03, 2020 @05:51PM (#23409282)
Tab 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.

Re:OBS (macOS) Virtual Camera by codazoda on Wednesday June 03, 2020 @03:01PM (#23407299)
Make sure the power adapter is connected at the right (not left) side of the MBP.
Re:OBS (macOS) Virtual Camera by woodrowbarlow on Wednesday June 03, 2020 @03:24PM (#23407553)
i'm marveling at how well this comment exemplifies everything that's wrong with USB-C.
Re:OBS (macOS) Virtual Camera by Dunedan on Wednesday June 03, 2020 @03:50PM (#23407842)
That's not related to problems with USB-C, but to Apple messing up their hardware design. This was discussed recently here: https://news.ycombinator.com/item?id=22957573
Re:OBS (macOS) Virtual Camera by woodrowbarlow on Thursday June 04, 2020 @09:05AM (#23416054)
i didn't realize; thank you for the context.

i'd still point back to USB-C's complexities, though. apple isn't the only major company to have gotten USB-C wrong; look at the nintendo switch.

Re:OBS (macOS) Virtual Camera by whywhywhywhy on Wednesday June 03, 2020 @04:44PM (#23408464)
Don't have a choice, my MBP only has two ports on the left side.
Re:OBS (macOS) Virtual Camera by buglite on Wednesday June 03, 2020 @04:01PM (#23407956)
Right now there is an open issue about a performance degradation in the last versions of OBS for macOS.

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

I don't know if it is correlated to your problem though.

Re:OBS (macOS) Virtual Camera by tmpz22 on Wednesday June 03, 2020 @02:43PM (#23407089)
What surface were you using your laptop on? IMO Apple made the design choice to be hot as hell on some surfaces as a trade off for other advantages, so maybe some of the fault is not on this software.
Re:OBS (macOS) Virtual Camera by whywhywhywhy on Wednesday June 03, 2020 @04:44PM (#23408470)
Wooden table.
Re:OBS (macOS) Virtual Camera by FraKtus on Thursday June 04, 2020 @01:19AM (#23412773)
You can lower the size of the canvas to need fewer resources.

I am using OBS a lot with a MacBook Pro Mid 2012 but I stay in 720p.

Re:OBS (macOS) Virtual Camera by trillic on Wednesday June 03, 2020 @02:38PM (#23407037)
13" or 15"? Dedicated GPU? Looking for some more info before I attempt to use it on my machine.
Re:OBS (macOS) Virtual Camera by whywhywhywhy on Wednesday June 03, 2020 @04:45PM (#23408475)
13" no GPU.