Windows version doing the same thing feels light as a feather when running (3% CPU, <10% GPU usage)
Windows version doing the same thing feels light as a feather when running (3% CPU, <10% GPU usage)
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.
I'll definitely be using this!
And I do use this plugin.
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.
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.
https://github.com/obsproject/obs-studio/issues/2841
I don't know if it is correlated to your problem though.
I am using OBS a lot with a MacBook Pro Mid 2012 but I stay in 720p.