Resource icon

OBS Lua Browser Image Slideshow v2.0.2

decay59

New Member
Thank you for making this script! Some of my images are appearing rotated 90 degrees for some unknown reason? They look fine in the directory but in the slideshow they rotate themselves.

Is there a way to fix this? Did I goof?

I suspect it might be due to EXIF data in your images, if your images were taken with a camera. Most programs automatically use EXIF data to display images in their intended orientation, but my script doesn't handle EXIF data at the moment. To solve this, you may have to edit your images in an image editor, and save them in the correct orienation.

If this isn't the case, I'm not sure why they would be rotated incorrectly.
 

nicwillu

New Member
Hey there. Awesome script. I was wondering how I can make it stop on last slide? my JS skills are not that good. Or if you could update it with a simple setting in settings.js?
 

decay59

New Member
Hey there. Awesome script. I was wondering how I can make it stop on last slide? my JS skills are not that good. Or if you could update it with a simple setting in settings.js?

Hi there,

I've added your requested feature. Unfortunately I don't have the time to test it extensively, but so far it seems to work as intended. To enable your slideshow to stop on the last image, set stopOnLastImage in settings.js to true.

(make sure to re-download the code from the master branch, and update your source in OBS. you will probably need to integrate your modifications again.)

I have also closed your issue on Github.
 

Keith Schneider

New Member
Greetings -- Thank You for making this script - it filled my needs once I discovered the limitations of the OBS builtin Slideshow.

However, couple points - First, I unfortunately somehow downloaded an older release prior to your add to stop the looping of the show. But I used that as an opportunity to dig into how these things work and ened up adding the same thing you did -but slightly differently. I have not seen any docs on the OBS objects/api so I was guessing from your code. I just made a makeshift bool with an int set either 1 or 0. Since then I've looked at your latest code and now know about the bool OBS object option - sigh... But still was a HUGE learning experience.

When installing, your readme said to add a source->Browser -- I see no source of Browser. I'm on Fedora Linux with OBS V28x and there is no Browser source. I think they changed it so you just capture a desktop window and thus pick the Browers Window from a list when you setup the source. BUT - Now it seems there is no integration with OBS. When I start my slidshow, grouped with a media source, I click to show the group, which restarts the audio/video but I have to quickly manually refresh the browser page so it starts with the audio(with video). Seems that the start/refesh the browser integration is/was lost - I'm new to OBS so all I know is what I've read and my only hands on is with this V28.x version. Your Thoughts???

In working on the lua script, (never did lua before - but programmed for nearly 45 years), I realized that you write the images.js script using a popen (pipe open) and you use a DIR command which is total formatted for Windows and puts all the filenames in multiple columns. It specifies the /b command switch which is all Windows syntax. The script needs to determine if it is on Linux or Windows and construct the proper DIR command. I used the "dir -1 -b " command so it generates files in one column and -b for filenames needing escaping. I am so used to ls command that did not even realize that dir existed :-). Somewhere you came up with the shell script to refresh the files so the lua script doing that was perhaps thus forward ignored.

Trust me - Not complaining - I'm only giving feedback and THANKING YOU for the script and providing me with a HUGE learning experience - invaluable indeed!!!
 

decay59

New Member
Thanks for the feedback, glad you found the script useful

First, I unfortunately somehow downloaded an older release prior to your add to stop the looping of the show.
Apologies for this, I didn't think many people would find the "stop looping" functionality useful, and I've been too lazy to make a new release. I guess I should do so

Regarding your 2nd paragraph, I'm not familiar with OBS on Linux. Instead of using a Browser source, since the slideshow is an .html file, you may be able to open the .html file using your internet browser of choice, and capture that instead. Simply refresh the page to restart the slideshow if needed. I have not done any testing with video/audio, so I can't help much there.

Regarding your 3rd paragraph - The lua script was intended to be an optional alternative to running RefreshImages.sh or RefreshImagesW.cmd, and is meant to be used within OBS via its Tools > Scripts functionality (I don't know if OBS on Linux has this), allowing for a refresh to be done from within OBS. The initial release of this resource only had the .sh file, which some users weren't able to run, so I added the .cmd file, and then the .lua file in a later release. I'm not too familiar with scripting myself, and I'm unable to test in a Linux environment, so apologies for any issues.

Hope this cleared things up, and thanks again for taking the time to leave some feedback :)
 

decay59

New Member
decay59 updated Browser Image Slideshow with a new update entry:

Release v1.3

Official release on github, which adds the option to stop the slideshow from looping.

Release v1.3
This release adds the option to stop the slideshow on the last slide, preventing it from looping.

Enable this option by setting stopOnLastImage to true in settings.js, or by accessing the settings via lua script in OBS (see readme).
The option is off by default.

The readme has also been updated for...

Read the rest of this update entry...
 

decay59

New Member
Hi, thanks for this update, this is a tool I would really love to use, I work with slideshows every week, I have one request, would it be possible to add hotkeys to perform basic tasks like, refresh, restart, forward, backward, random, stop slideshow? Or adding that functionality to the LUA Script.
I think it should be possible. I'll look into it when I can
 

Roninpawn

New Member
This is EXACTLY what I was about to go write when I realized all the time I had taken, adding images to OBS' default image slideshow, had been wasted. But I was only going to write up the html, CSS, and javascript. This LUA implementation is BEAUTFUL! And now, all 80+ of my images actually show up. And are SHUFFLED randomly (uh, duh OBS) instead of individually selected at random, using a seed method that heavily favors certain positions in the list.

Great work.
 

decay59

New Member
decay59 updated Browser Image Slideshow with a new update entry:

v2.0.2 - Added captions & improved file extension filter

Added captions & improved file extension filter
  • Added captions that show the current image's filename (thanks to @NaGeLBaileyVT on GitHub). See details in updated readme
  • Added better filter for image file extensions (thanks to @SocksTheWolf on GitHub)
  • Files using the following extensions will now be recognized: "apng", "avif", "gif", "jpg", "jpeg", "jfif", "pjpeg", "pjp", "png", "svg", "webp", "bmp", "ico", "cur"
  • Added alphanumeric order
  • Updated readme
  • Updated jquery...

As of OBS Studio 30.1, OBS has rewritten their built-in slideshow. As I understand it, this new & improved version no longer has a 250mb uncompressed size limit. Since that size limit was the main reason for making this resource, the new OBS slideshow makes this one rather obsolete. Depending on your preference, it may be desirable to switch to OBS's new slideshow, as it is much simpler to use than html/lua scripts.
 
Last edited:

fullsalvo

New Member
ScreenShot_12_20_2024_3_15_59_PM.png

tried opening the java script file and it gave me this
 
Top