Resource icon

Advanced Scene Switcher 1.25.4

WeirdEbeardE

New Member
hi i downloaded this plugin and placed the files in the plugin folder but when i open OBS it only shows automatic scene switcher but not the advanced version.
 

Warmuptill

Active Member
hi i downloaded this plugin and placed the files in the plugin folder but when i open OBS it only shows automatic scene switcher but not the advanced version.
Thank you for also reporting this issue!

can you try if installing the Redistributable for Visual Studio 2015 helps?
https://www.microsoft.com/en-us/download/details.aspx?id=48145

If not, does using this version help?
https://www.dropbox.com/s/mqxiy916qambwzj/advanced-scene-switcher.dll?dl=0

There are multiple plugins now that can leave the "now playing" details from vlc media we play and save those details to our hard drive, mostly mp3's, given what those other plugins can do, is it possible for your plugin to detect when the contents of a text file changes so we could swap to a scene that displays our now playing music details.

currently i change to my "now playing" scene every 2 minutes using scene sequencer but if the plugin could detect text file contents changing then we could swap to scenes like this when our media/text changes (via other plugins) which would be a lot more handy.

I quickly added the option to switch scenes based on the contents of a text file. If you redownload the plugin again there should be additional settings on the "read from file / write to file" tab. So you could switch if one of the other plugins wirtes a certain songname into a specified file.


pDXTxG6g.png



If it is unclear what to do there or something is broken please let me know!
 

Methanoid

New Member
The update added to reading text files contents is pretty good so far, it can be used in conjunction with people who run for example chat bots and other custom scripts, im going to spend some time trying to make good use of this feature and see what else it can do

So far from what you have just added then you would have 1 hell of an "event" triggered system in full for many to use with vlc plugins for music/media, and more importantly users of tools like Snaz, Streamlabs-Chatbot, Phantombot, etc etc will find they now have a world of new useful abilitys to play with.

massive thumbs up so far, adv scene switcher is only growing more powerful per update, this is a huge boon for streamers and content creators \o/

SO FAR IN TESTING:
the "file contains" part is working so far but only word matching full words, for example

i dump all my .txt files addons/scripts generate into a ramdrive to stop spamming up my Hard Drives, as such if i check for example the file R:\FileWatched.Txt for the word ".mp3" this does work ONLY if the file being watched only has ".mp3" in it, if there is more text in there such as "Example.mp3" then nothing triggers, can the searched for text be a partial word match instead of exact word match?

also the scene constantly fires away non stop meaning you never leave the target scene, again is it possible to have a check on the files "date modified" so scene switcher only check the contents of the file when the date modified changes, this would stop constant triggers/reads from the txt file making things much more manageable.

currently it looks like the txt files are read constantly for updates??, however if the following could be implimented, that would be amazing, here is a probably poorly written example.

R:\FileWatched.Txt - 22/05/2018 - 08:48:12 - First date/time check, no checks/trigger as has only started checking, notes current date/time.
R:\FileWatched.Txt - 22/05/2018 - 08:48:12 - Checking date/time, no change, do not check txt file contents
R:\FileWatched.Txt - 22/05/2018 - 08:48:12 - Checking date/time, still no change, do not check txt file contents
R:\FileWatched.Txt - 22/05/2018 - 08:57:23 - Checking date/time, date/time has changed, open file for reading, check txt file contents, set new date/time to check for to updated value, close file reading to avoid clashes with other programs.

R:\FileWatched.Txt - 22/05/2018 - 08:57:23 - Checking date/time, no change, do not check txt file contents
R:\FileWatched.Txt - 22/05/2018 - 08:57:23 - Checking date/time, no change, do not check txt file contents
R:\FileWatched.Txt - 22/05/2018 - 08:57:23 - Checking date/time, no change, do not check txt file contents

etc etc, maybe slap in a 1 second or 1/2 second delay between checks so our systems dont get hammered from all the checks, i think the delay as well as the date modified check could prove useful, i did encounter an occasional crash/lockup on my VLC when scene switcher started checking the txt files vlc was outputting, was scene switcher keeping the watched txt files open for reads? if the above date/time check is implimented then this lockup situation would probably go away if scene switcher only opens/reads the txt files once the date modified trigger occurs rather than keeping a file open for reads non stop (if thats what is occuring atm, could easily have been a vlc plugin issue).

basically exactly the same as what you have now but with a "date modified" check before any action is taken.
 
Last edited:

Warmuptill

Active Member
The update added to reading text files contents is pretty good so far, it can be used in conjunction with people who run for example chat bots and other custom scripts, im going to spend some time trying to make good use of this feature and see what else it can do

So far from what you have just added then you would have 1 hell of an "event" triggered system in full for many to use with vlc plugins for music/media, and more importantly users of tools like Snaz, Streamlabs-Chatbot, Phantombot, etc etc will find they now have a world of new useful abilitys to play with.

massive thumbs up so far, adv scene switcher is only growing more powerful per update, this is a huge boon for streamers and content creators \o/

SO FAR IN TESTING:
the "file contains" part is working so far but only word matching full words, for example

i dump all my .txt files addons/scripts generate into a ramdrive to stop spamming up my Hard Drives, as such if i check for example the file R:\FileWatched.Txt for the word ".mp3" this does work ONLY if the file being watched only has ".mp3" in it, if there is more text in there such as "Example.mp3" then nothing triggers, can the searched for text be a partial word match instead of exact word match?

also the scene constantly fires away non stop meaning you never leave the target scene, again is it possible to have a check on the files "date modified" so scene switcher only check the contents of the file when the date modified changes, this would stop constant triggers/reads from the txt file making things much more manageable.

currently it looks like the txt files are read constantly for updates??, however if the following could be implimented, that would be amazing, here is a probably poorly written example.

R:\FileWatched.Txt - 22/05/2018 - 08:48:12 - First date/time check, no checks/trigger as has only started checking, notes current date/time.
R:\FileWatched.Txt - 22/05/2018 - 08:48:12 - Checking date/time, no change, do not check txt file contents
R:\FileWatched.Txt - 22/05/2018 - 08:48:12 - Checking date/time, still no change, do not check txt file contents
R:\FileWatched.Txt - 22/05/2018 - 08:57:23 - Checking date/time, date/time has changed, open file for reading, check txt file contents, set new date/time to check for to updated value, close file reading to avoid clashes with other programs.

R:\FileWatched.Txt - 22/05/2018 - 08:57:23 - Checking date/time, no change, do not check txt file contents
R:\FileWatched.Txt - 22/05/2018 - 08:57:23 - Checking date/time, no change, do not check txt file contents
R:\FileWatched.Txt - 22/05/2018 - 08:57:23 - Checking date/time, no change, do not check txt file contents

etc etc, maybe slap in a 1 second or 1/2 second delay between checks so our systems dont get hammered from all the checks, i think the delay as well as the date modified check could prove useful, i did encounter an occasional crash/lockup on my VLC when scene switcher started checking the txt files vlc was outputting, was scene switcher keeping the watched txt files open for reads? if the above date/time check is implimented then this lockup situation would probably go away if scene switcher only opens/reads the txt files once the date modified trigger occurs rather than keeping a file open for reads non stop (if thats what is occuring atm, could easily have been a vlc plugin issue).

basically exactly the same as what you have now but with a "date modified" check before any action is taken.


Thanks for the feedback!

I added support for pattern matching using regular expressions. So if you want to match a file that contains the word "test" you would type ".*test.*" as the pattern. See the checkbox in the image below

I added support for the modification date check. That should reduce the file open / close quite a lot. See the image below.

You can set the interval of the scene switcher main thread on the general tab "Check switch conditions every ...ms". (Default is 300ms)

gDjXhq7.png


Let me know if I broke something :)
 

Methanoid

New Member
It works flawlessly, the only time things go wrong (as in repeated triggers) is when other plugins that provide the text source keep banging out text constantly rather than when needed, i had 1 vlc script writing non stop during song play which ofc triggered scene switcher non stop, switch to a different script that only wrote text when a song actually changed and everything worked perfectly.

This also works using chatbots/custom scripts, all that is needed is to have scene switcher move to your needed scene via the new addition then have Scene Sequencer drop you back to your main scene several seconds later, works a charm, now off to find more uses for it.

Awesome speedy additions, this version seems to work perfectly as intended so far, will report back once i have messed around with it more, heres a quick/dirty vid showing it working with vlc. for the pattern match to match anything i used ".*.*" and it works with any change made to the text file which is great.

 

p2bben

New Member
Hi, i Love the PlugIn from you. Is there a possibility to automate switch back to a other Scene after a Pause?
Or is it possible to reactivate the Auto Scene Switcher after all Videos from Mediasource are played (this would be the best).

I read the Scenes from TextFile and sometimes i Play from a Mediasource Videos but i don´t know how long the Duration is before.
Thats why i Pause the Advanced Sezene Switcher in this case. But if the Videos from Mediasource are played, i have a Black or Still Image OnAir and i must restart Advanced Sezene Switcher from Pause to a new Scene .

If there is a solution to reactivate Advanced Scene Switcher from pause, after all Videos from media source are Played or a Still Image/ Black Screen / Silence Audio is detected, it would be a big Help.

Maybe you can do something like this: Pause the Sczene Switcher on Scene XYZ, Reactivate if Textile (Read scene name to be switched from this file) contains XYZABC

Best regards
Ben
 

Methanoid

New Member
Hi, i Love the PlugIn from you. Is there a possibility to automate switch back to a other Scene after a Pause?
Or is it possible to reactivate the Auto Scene Switcher after all Videos from Mediasource are played (this would be the best).

I read the Scenes from TextFile and sometimes i Play from a Mediasource Videos but i don´t know how long the Duration is before.
Thats why i Pause the Advanced Sezene Switcher in this case. But if the Videos from Mediasource are played, i have a Black or Still Image OnAir and i must restart Advanced Sezene Switcher from Pause to a new Scene .

If there is a solution to reactivate Advanced Scene Switcher from pause, after all Videos from media source are Played or a Still Image/ Black Screen / Silence Audio is detected, it would be a big Help.

Maybe you can do something like this: Pause the Sczene Switcher on Scene XYZ, Reactivate if Textile (Read scene name to be switched from this file) contains XYZABC

Best regards
Ben

Are the video's you play random or a specific/set video you specifically play for your scene(s)?
 

p2bben

New Member
Hi, the Videos are mostly only one File, or it is a Playlist (ffconcat version 1.0). I play it only with the Mediasource, because VLC Video Source has problems with Audio fading.... Random i don´t use. It is only one Video in one Scene or a Playlist in one Scene.
 

Methanoid

New Member
Hi, the Videos are mostly only one File, or it is a Playlist (ffconcat version 1.0). I play it only with the Mediasource, because VLC Video Source has problems with Audio fading.... Random i don´t use. It is only one Video in one Scene or a Playlist in one Scene.

what are you using to actually trigger the playback? keypress to the scene in OBS? batch/scripts? something else?
 

p2bben

New Member
I use your Scene switcher...;-) With Read from text file. I have a Radio Automation System (SPL) an this is writing witch Scene has to be currently
OnAir, in a textfile. This textile is linked in Advanced Scene Switcher (Enable switching of scenes based on file input).
We use this system to broadcast Visual Radio..Everytime the Song or Element in Radio is switching, also the Video Scene in OBS switch automatically Here is the Webstream : . ( https://rrr.sz.xlcdn.com/?account=n...N-Video&type=live&service=wowza&output=player )
 

Methanoid

New Member
I use your Scene switcher...;-) With Read from text file. I have a Radio Automation System (SPL) an this is writing witch Scene has to be currently
OnAir, in a textfile. This textile is linked in Advanced Scene Switcher (Enable switching of scenes based on file input).
We use this system to broadcast Visual Radio..Everytime the Song or Element in Radio is switching, also the Video Scene in OBS switch automatically Here is the Webstream : . ( https://rrr.sz.xlcdn.com/?account=n...N-Video&type=live&service=wowza&output=player )

its Warmuptill's work btw, im just a fan/feature requester like you :D

btw if all you want is to have 1 scene that has a vid or music playing and 1 that doesnt then couldnt you just use the actual VLC player (making full use of playlists or single plays) and just grab its output into OBS? scene switching when the actual VLC program is running then swapping to a diff scene when VLC is not running is pretty simple or is it more indepth than that?
 

p2bben

New Member
Thanks, if you want we can look with team viewer to the System ;-)
The idea with the VLC i try, but it don´t work for me.

My Problem is to Play TV-Shows or Commercials. At the Moment i extract the SoundFile from the TV-Show Video and so i have the same length in Radio and TV but if i play Commercials, i don´t know before how long they are, because i use in Mediasource the possibility to play Playlists.
Thats why i want to Stop/Pause Advanced Scene Switcher automatically, if i Play the Commercial Playlist from Mediasource in OBS and if the Playlist is ending i want to reactivate Advanced Scene Switcher automatically.
If Advanced Scene Switcher can detect (Video(s) in Scene, are finish played and end the Pause it would be the best...
 

Methanoid

New Member
again regular vlc might be a solution to not knowing when a playlist ends, you cant capture VLC's window by default but with a few tweaks its pretty easy, if you look in VLC Tools/Preferences, bottom left of the prefs screen click from SIMPLE to ALL, scroll down to VIDEO, look in the video section/dropdown for OUTPUT MODULES, change from Automatic to OPENGL VIDEO OUTPUT FOR WINDOWS, save the settings, quit/relaunch VLC.

Now to capture that into OBS you instead of WINDOWS CAPTURE, instead now use GAME CAPTURE and choose CAPTURE SPECIFIC PROCESS and pick VLC, untick capture cursor. Rightmouse the game capture, click TRANSFORM / EDIT TRANSFORM, and make sure BOUNDING BOX TYPE is set to STRETCH TO BOUNDS to make sure all videos play back the same size in OBS.

you can also have VLC quit/end after a play or playlist ends helping out in OBS (in vlc PLAYLIST options is the option to 'play and exit', handy if using manually or even via scripts), in advanced scene switcher, inside the EXECUTABLE section, you can add VLC.exe, the scene you want to run when VLC is running/playing music/vids, in the GENERAL tab you can pick IF NO SWITCH CONDITION IS MET SWITCH TO <<Scene Name>>.

that quick/dirty method means you would switch to a scene when vlc is running whatever you want, and when you quit vlc, manually or when a playlist ends, scene switcher would take you back to a different/default scene.
 

p2bben

New Member
Wow, this sounds nice... I will try it in the Night. Thank You for this!!! I only tried with the VLC source before;-(

For the Future is there maybe a way to put a solution in the Advanced Scene Switcher to auto reactivate after a pause,
or activate Scene XY if all Videos from Mediasource are played?
 

Methanoid

New Member
Wow, this sounds nice... I will try it in the Night. Thank You for this!!! I only tried with the VLC source before;-(

For the Future is there maybe a way to put a solution in the Advanced Scene Switcher to auto reactivate after a pause,
or activate Scene XY if all Videos from Mediasource are played?

ul have to wait for a response from Warmuptill for that, ill guess that if it was an "all inside auto scene switcher" solution then hed be all over it, what you are asking for is external to his plugin and probably harder to accomplish.

What i asked for in a feature, he could do pretty quickly and i imagine easily with his talent because it was work done directly to his plugin, your feature request requires his plugin to talk to other plugins which probably isnt so simple.

heres a quick yt vid showing all the above in a quick test, excuse the onscreen lag, i had to use bandicam to capture and it seems my machine doesnt like multiple capture software all running/capturing at once, everything in OBS is normal/smooth when i dont use bandicam to capture everything.

 

CodeSpent

New Member
So I've noticed most other plugins contain contents to put in the data directory except this one. I've gotten many plugins to work except this for some reason. I've followed instruction meticulously, but nothing shows in UI. Tried a few reinstalls, updates, starting fresh. Nothing seems to be working.
 

Warmuptill

Active Member
So I've noticed most other plugins contain contents to put in the data directory except this one. I've gotten many plugins to work except this for some reason. I've followed instruction meticulously, but nothing shows in UI. Tried a few reinstalls, updates, starting fresh. Nothing seems to be working.

Can you please post a log file of the version that does not work without an outdated data folder? (Help -> Log Files -> Show Log files)
I cannot reproduce it on fresh windows install, with a fresh OBS Install. Are you sure that is what fixed it?

And sorry that old versions of this plugin contain bugs... that is usually the reason why I update the plugin.

EDIT:
Also please send a log file of the version where the screen region detection did not function properly, since that code was unchanged since it was implemented and that bug should still be present now.
 
Last edited:

CodeSpent

New Member
Can you please post a log file of the version that does not work without an outdated data folder? (Help -> Log Files -> Show Log files)
I cannot reproduce it on fresh windows install, with a fresh OBS Install. Are you sure that is what fixed it?

And sorry that old versions of this plugin contain bugs... that is usually the reason why I update the plugin.

EDIT:
Also please send a log file of the version where the screen region detection did not function properly, since that code was unchanged since it was implemented and that bug should still be present now.

I understand that is why you update, the passive aggression is a little premature ..but in your update no en-us is present so there is no UI option. Which is a problem that causes me to resort to looking at a previous version. Log file sent over! Shouldn't really be necessary to scrub, though, simply adding the missing data directory should have it good to go! 10/10 product itself, though, took a while fighting it, but loving it!

1527922635917.png
 

Warmuptill

Active Member
I understand that is why you update, the passive aggression is a little premature ..but in your update no en-us is present so there is no UI option. Which is a problem that causes me to resort to looking at a previous version. Log file sent over! Shouldn't really be necessary to scrub, though, simply adding the missing data directory should have it good to go! 10/10 product itself, though, took a while fighting it, but loving it!

View attachment 36962
I apologize if I came across as passive agressive, it certainly wasnt intended.

Could it be that you are currently using both an old version of the Scene Switcher (SceneSwitcher.dll) and the new version(advanced-scene-switcher.dll) at the same time?
If so, you probably still havnt resolved the issue with the new version.
I would not recommend the old version, since it contains many bugs and might contain memory leaks, depending on the version you are currently using.

Could you try if installing the Visual C++ Redistributable for Visual Studio 2017 helps? (for the new version)
x86: vc_redist.x86.exe
x64: vc_redist.x64.exe
(https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)


I doubt that the missing data folder makes a difference, because even the old version seems to load without issues when deleting the data folder.
The log will then contain "Failed to load 'en-US' text for module: 'SceneSwitcher.dll'", which does not occur in your log file.
And even if it would, it just contains different translations for the Scene Switcher general tab, which are not essentail, because the plugin will fallback to using the the literal placeholder text for translations. (see image below)
1527936560962.png

(This is how the OLD version of the Scene Switcher looks, btw. If you do not have the option to change the priority of the diffrenent switching types on the general tab, you are using the old version still)

I removed the support for different languages, because I thought it might be quite confusing to have mixed languges for the Scene Switer instead of just using English, since not the whole of the advanced scene switcher was translated. That is why the data folder is no longer needed.
 
Last edited:

CodeSpent

New Member
I apologize if I came across as passive agressive, it certainly wasnt intended.

Could it be that you are currently using both an old version of the Scene Switcher (SceneSwitcher.dll) and the new version(advanced-scene-switcher.dll) at the same time?
If so, you probably still havnt resolved the issue with the new version.
I would not recommend the old version, since it contains many bugs and might contain memory leaks, depending on the version you are currently using.

Could you try if installing the Visual C++ Redistributable for Visual Studio 2017 helps? (for the new version)
x86: vc_redist.x86.exe
x64: vc_redist.x64.exe
(https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)


I doubt that the missing data folder makes a difference, because even the old version seems to load without issues when deleting the data folder.
The log will then contain "Failed to load 'en-US' text for module: 'SceneSwitcher.dll'", which does not occur in your log file.
And even if it would, it just contains different translations for the Scene Switcher general tab, which are not essentail, because the plugin will fallback to using the the literal placeholder text for translations. (see image below)
View attachment 36964
(This is how the OLD version of the Scene Switcher looks, btw. If you do not have the option to change the priority of the diffrenent switching types on the general tab, you are using the old version still)

I removed the support for different languages, because I thought it might be quite confusing to have mixed languges for the Scene Switer instead of just using English, since not the whole of the advanced scene switcher was translated. That is why the data folder is no longer needed.



15:17:15.280: Failed to load 'en-US' text for module: 'obs-browser.dll' does appear prior to adding the data folder. Not sure, I just know that with the data directory, it works, without, it does not. Regardless I am using the latest DLL, just with the previous Data directory.
 
Top