write a program in python that makes OBS automatically import a scene collection and profile

AJMN

New Member
If I want to write a program in python that OBS automatically imports a scene collection and profile, which obs program should I start directly or which folders should I modify
 
The functions obs_frontend_set_current_scene_collection and obs_frontend_set_current_profile will do what you want.
https://docs.obsproject.com/reference-frontend-api

Note that you can also specify profile and/or scene collection via command-line switches, no scripting required. I have multiple shortcuts on my desktop to run OBS with different profiles and scene collections for different purposes.
 
The functions obs_frontend_set_current_scene_collection and obs_frontend_set_current_profile will do what you want.
https://docs.obsproject.com/reference-frontend-api

Note that you can also specify profile and/or scene collection via command-line switches, no scripting required. I have multiple shortcuts on my desktop to run OBS with different profiles and scene collections for different purposes.
That's useful, but the initial request was for importing, not just switching to.
I am also curious if there's a way to do that since I would like to basically automate importing a scene collection right after installing OBS, so things are just good to go before an end user ever gets to the program.
 
What do you mean y "import"? Where would the scene collection and profile come from? Presumably a scene collection or profile created in OBS and then exported as a file or group of files.

In OBS, "File", "Show Settings Folder", it will show you where available scene collections are stored. On my computer it is C:\Users\{my username}\AppData\Roaming\obs-studio\basic\scenes.

If you copy a scene collection json into that folder before you run OBS, it will be available to OBS without explicit import. You could then use either obs_frontend_set_current_scene_collection or the command-line switch to specify the scene collection.

Profiles can be done similarly
 
Back
Top