pedanticdan / obs-placeholder

Add a UI setting to OBS Studio for a custom placeholder.png file in MacOS and (some day) Windows
GNU General Public License v2.0
12 stars 0 forks source link

OBS 30 #6

Open StefanRied opened 8 months ago

StefanRied commented 8 months ago

any chance to get this working with OBS 30 on Sonoma again. The png move to another folder...

pedanticdan commented 8 months ago

The current version of OBS is 29.1.3 and this plug-in still seems to work, though the virtual camera now appears to be unstable.

If version 30 involves significant changes to the virtual camera, I'm not sure what I'll be able to do.

I have thought about trying to write a lua script to replace this plugin.

pedanticdan commented 8 months ago

I've now installed OBS 30, which I regret.

However, as far as I can tell, the plugin still works. It still gives the user an interface to copy an image of their choice, and the image does get copied to the correct location with the correct file name. I don't know yet why the OBS Virtual Camera is not using the custom file.

pedanticdan commented 8 months ago

Ok ... I was wrong ...

The virtual camera on OBS 30 has a different implementation. This new implementation does not provide a way to use a custom placeholder.png file. So far, I have not figured out how to replace the default placeholder.png file. The new implementation, plus Apple's security implementation, prevent me from replace the file manually.

At this point, I don't know if if will even be possible to replace the default placeholder.png file.

PatTheMav commented 6 months ago

Ok ... I was wrong ...

The virtual camera on OBS 30 has a different implementation. This new implementation does not provide a way to use a custom placeholder.png file. So far, I have not figured out how to replace the default placeholder.png file. The new implementation, plus Apple's security implementation, prevent me from replace the file manually.

At this point, I don't know if if will even be possible to replace the default placeholder.png file.

As far as we are able to tell there is no way to replace it without changing it in the system extension bundle: The system extension is staged by macOS when the application is launched, then checked and installed into a sandboxed location without wide file system access.

The system extension itself is installed into /Library/SystemExtensions/<UUID>/com.obsproject.obs-studio.mac-camera-extension.systemextension (that's an installation UUID, so fully random and different on every machine), where the placeholder is found in the Contents/Resources directory. The location requires elevated privileges to change its contents and as far as we could tell changing the image should not trigger macOS tampering protection (though we haven't tested this yet).

Because system extensions are sandboxed and do not have access to the wider filesystem, it's not possible to read an image from a custom location.