Enable Source Named in Text File


New Member

If I have a text file "File.txt", and the contents of the file is "Background1", I'd like to have OBS automatically make a source I have Named "Background1" visible, and keep monitoring the text file for changes.

I've looked at txt-trigger and have a reasonable idea about monitoring the file but I'm having trouble actually setting the visibility of the scene from its name. I guess the input for obs_sceneitem_set_visible(obs_sceneitem_t *item, bool visible) is meant o be an "item" not a "name", so do I need to somehow get it to determine the item from the name? Any help would be greatly appreciated!

Suslik V

Active Member
Advanced Scene Switcher plugin can do the job.

As for ideas, if you don't wish to get item manually, you can simulate hotkey press for OBS and assign corresponding hotkey to the source show/hide.