scudmonkey84

New Member
Hello! I am looking for a scripting expert to help me with a project. I use OBS to produce shopping livestreams for local brands/businesses, and I'm constantly re-building my scenes/sources based on the photos that I receive from those brands. It’s a lot of repetitive tasks, and I’m hoping there’s a way to automate my process.

Wondering if you can help me!

Basically, I’m having the client send me a folder structure with images that look like the image below. Simple numbered folders containing jpg files. I’d like to automatically add all of those folders as Groups, containing the corresponding jpg files. Such as in the second image.

Screenshot 2023-02-06 at 11.05.23 PM.png

Screenshot 2023-02-06 at 11.05.53 PM.png


Furthermore, I’d like the script to automatically set all of the Show and Hide Transitions to Fade, and to ‘Hide’ every group that’s been added, so that I can unhide them when they’re needed.

I’m using OBS 28 currently, and MacOS (Ventura). I’m aware this may require some coding outside of OBS, potentially as javascript? But I am not an expert.

I’d be much appreciative if someone were willing to help me with this. If there are any scriptors here interested in this job, please let me know if what I’m asking is possible, and what the scope of the work might entail. If you think you can write a script that will perform this automation for me, please send me a quote.

Thanks and have a great one
 

DCStrato

Member
Hey, Scudmonkey84:

Saw your post and was interested in the challenge.

Load the attached Images2Groups LUA script into OBS
1. Enter the full path to your folder of image folders .
2. Enter the desired name of your Root Scene. Your example showed "Product Images Full Page".
3. Press Create Image Groups Button

Code follows directory structure and adds groups based on Directory Names.
Files from each directory are added to the corresponding group.
images are hidden and set to Fade transition.

I did limited testing but the script was pretty simple. FYI... Fade transition has to exist and be called "Fade"


images2Groups.jpg


Hope it works for you.
Cheers!

D.C.
 

Attachments

  • Images2Groups.zip
    1.2 KB · Views: 73

DCStrato

Member
Not sure if you are still interested in this script or not, but I realized you said you were using a Mac and forgot to code for multiple OS file path issues. This new version fixes that. If you get a chance to try it, let me know how it goes. I do not have a Mac to test with but used what I have done before that seemed to work.

D.C.
 

Attachments

  • ImagesToGroups.zip
    1.2 KB · Views: 29

DCStrato

Member

scudmonkey84


Here is another update. OBS creates the groups in the reverse order of the image directory and leaves the groups expanded. This version reverses the order so the group order matches the order of the sub directories, and also collapses the groups by default.

D.C.
 

Attachments

  • ImagesToGroups2.zip
    1.3 KB · Views: 38
Top