Advanced Scene Switcher

Advanced Scene Switcher 1.28.1

Warmuptill

Active Member
@CodeYan you can find a build containing the requested screenshot feature here:
As usual you need to be logged into GitHub to be able to download it.

Screenshot.PNG

Let me know if everything works as expected. :)

@grimofdoom , @CodeYan I expanded upon the existing macro action "macro" to allow running other macros.
RunMacro.PNG

You can find a build with this functionality here in a few minutes:
Note that you have to be logged into GitHub to be able to download the build.
Let me know if there are any issues! :)
 
Last edited:

grimofdoom

New Member
1.) Unfortunately not yet - I have added it to the todo list and will probably look into it on the weekend.
You could maybe use the "wait" action as that supports waiting for random amounts of time, but this might of course get rather messy.
2.) Not yet - will also look into it on the weekend.
(Both of these points were suggested a few comments earlier so I will raise the priority of those tasks)

3. ) Unfortunately no - this might be a bit more complex, but I will make sure to look into it as it was requested multiple times now already.

I apologize, that basically all answers were "no, not yet".
Thank you for the reply. They are not 'problems' at all, I clearly have a fully working solution. They are just, curious if I was not using the software to its fullest or things that may be coming. Number 2 is obviously just aesthetics (As a programmer, I purposely put opening brackets on the same line to keep things clean).
 

lindenkron

Member
Hey Warmuptill.

Wanted to ask if you could try something for me and see if you get similar behaviour. I started messing around a bit with the parameter VLC link you showed me.

On one, I used the old method - but included the parameter --qt-start-minimized and the other I used default 'fallback' method.

This resulted in when I switched back and forth between the two, that I'd end up with a VLC player with no process running, but still playing music. With seemingly no way to turn it off other than rebooting the PC.

Is this a plugin thing, or a VLC thing? It's a rather.. strange interaction at least.

This is the process that would be still running playing music:
1637816695175.png


Thanks,
-lind
 

lindenkron

Member
So I narrowed it down a bit. Seems the old script
tasklist /fi "imagename eq vlc.exe" |find ":" > nul
if errorlevel 1 taskkill /im "vlc.exe"

In combination with --qt-start-minimize simply glitches out and makes VLC player run while taskkilled.. some how.

Tried closing it with another script; but I can only get it to work running it manually. vlc vlc://quit. If I try to run it in Adv-ss, so far it does nothing. Either way, I don't think it had anything to do with Adv-ss :)

I added a environmental path for VLC; and then ran the above. Could the filepath in the .bat be incorrect when fired through OBS/Adv-ss and thus it won't work cus it can't find vlc to execute vlc://quit? Not that great at pathing >.<
 
Last edited:

lindenkron

Member
So, it seems OBS does not allow for environmental paths to be used within OBS itself.
"C:\Program Files\VideoLAN\VLC\vlc.exe" vlc://quit did the trick, even though it's a lot of .bat flashing :giggle:

Rather interesting though, not sure why that'd be.
 

Laczkó

New Member
I have serious reliability issues with the Advanced Scene Switcher. I set up the OBS and Advanced Scene Switcher to three machines for testing (one is running Windows 7, the others are Windows 10 – I'll refer to them as Win7, Win10/1, Win10/2). All the machines have the same version of OBS (27.1.3), also Advanced Scene Switcher (1.16.3), same profile, same Scene collection, everything similar in the software until the very last bit of setting, yet it works completely differently on the three machines.

On Win10/1 machine if I click on Advanced Scene Switcher in the tools dropdown menu, it immediately kills OBS in about 90% of the cases. In these cases OBS doesn't even make a crashlog. If I don't try to open the Advanced Scene Switcher settings, it works fine for a short time (tipically 1/2 to 2 hours), but after that it never switchs scene again. If I try to open Advanced Scene Switcher settings when it no longer does anything, than clicking on it in the dropdown menu kills OBS not only 90%, but 100% of the cases.

On Win7 machine Advanced Scene Switcher works almost as it should, but there are set some changes, which it never execute. An other problem that there is a setup for a slideshow to switch over if it's played for 15 minutes, but Advanced Scene Switcher always switch over after 30 minutes instead. I have tried to change the 15 minutes setting to a shorter time, also to longer, but it has no effect on Advanced Scene Switchers behaviour. It still switchs over after 30 minutes.

On Win10/2 machine there are no unique faulty behaviour, it's just produces the only problem, that is common to all the three machines. This is the one above, that some scene changes that were set up, never executed.

There is a typical setup, when scene change doesn't executed: when there are two playlist in a scene and one of them sets to continously repeate while the second one isn't. In this case if there is a scene change set up based on the second one list played to end, it'll never change (the second one – the not repeated – could be media source, not just playlist, and the problem still exist). But there are other changes, which never executed, and I couldn't find any schema to figure out, what is differentiate the changes those are executed and those are not. Some of them based on time, some based on a source played to end, or played for a certain period of time. But if a change never executed, it won't be executed even if I try to do it in an other way. For example there is a command to change scene if a source played to end, which is never executed, so I tryed to create a setting on the Video tab, to change scene when that source 'has not changed' for two seconds (based on the thought, that the last frame of the source freezed forever as the scene not changed, so it should detect the no changing there), but it also doesn't worked, the last frame of the source remained there forever. I even calculated the length of the source and set up to change scene after played for that time, also set up to write the name of the active scene to a file and change scene if that file cointains that scene's name for the calculated time and so on, but neither worked. It seems like if it doesn't want to execute a specific scene change, than it won't and doesn't matter, how many different methods do I create to do it anyway.

I thought maybe the Advanced Scene Switcher work faulty with some file format, or codec, but when I converted all the used video to the same format with the same codec and settings (also images to the same image format) to test this theory nothing has changed: the scene changes which worked before are worked after as well and those that didn't worked before, also didn't worked after.

I have attached log files from all the three computer, maybe those contains useful informations.
 

Attachments

  • Win7 log.txt
    30.8 KB · Views: 15
  • Win10_1 log.txt
    44.8 KB · Views: 16
  • Win10_2 log.txt
    33.1 KB · Views: 16

Laczkó

New Member
Quick update:
If OBS has been run as administrator on the Win10/1 machine, the 'open Advanced Scene Switcher settings kills OBS' problem disappear (but all the other problems still exist).
 

Warmuptill

Active Member
@Laczkó Sorry to hear that you are having issues with the plugin.

All the machines have the same version of OBS (27.1.3), also Advanced Scene Switcher (1.16.3)
Although I doubt that it will make much of a difference for the issues you described please update to the most recent version of the plugin.

On Win10/1 machine if I click on Advanced Scene Switcher in the tools dropdown menu, it immediately kills OBS in about 90% of the cases. In these cases OBS doesn't even make a crashlog.
That seems very strange indeed.
I have never heard about such issues before.

Can you please provide an OBS log file of such a case?
It would be best if you enable verbose logging for the plugin (if you are able to).
The option to do so can be found on the general tab.

Verbose.PNG


On Win7 machine Advanced Scene Switcher works almost as it should, but there are set some changes, which it never execute.
Unfortunately It is very difficult to say what is going on here without having more information.
Which functionality are you using exactly?
Could you maybe set up a minimal example to reproduce the problem and export the settings of the plugin.
(The option to export the plugin settings to a file can be found on the general tab)

There is a typical setup, when scene change doesn't executed: when there are two playlist in a scene and one of them sets to continously repeate while the second one isn't. In this case if there is a scene change set up based on the second one list played to end, it'll never change (the second one – the not repeated – could be media source, not just playlist, and the problem still exist)
Again here it would be best to have a minimal example to reproduce the issue on my end.
From the description alone it is very hard to judge which functionality you are using exactly and in which setup.

It seems like if it doesn't want to execute a specific scene change, than it won't and doesn't matter, how many different methods do I create to do it anyway.
Just guessing here, but maybe it is a priority issue.
So some higher priority function is continuously true and thus blocking the other functionalities from running.

In general I would recommend to rely on the macro tab as it is the most flexible in complicated scenarios.

I have attached log files from all the three computer, maybe those contains useful informations.
Unfortunately not really. :(
Without knowing when an issue occurred or what the issue was in these particular logs an analysis is almost impossible.
The only unusual part is that very frequently some "file" check seems to take extremely long amounts of time occasionally:
10:08:11.270: [adv-ss] spent 2705 ms in file condition check of macro 'Mozgó spot túlfutás kezelő'!
But without knowing the settings it is difficult to say if that is actually an issue.

In general I would recommend enabling verbose logging if you want to report issues with the plugin.

I apologize that I could not really help you yet :(
 

Laczkó

New Member
OK. I was stupid. When I converted all the medias to the same format, I forgot to change some of them to the converted ones in the playlists that I'm using. Now it solved most of the not changing scene problem (a few still exist). So it seems the plugin doesn't work with mov files. At least with codec settings like this:
Codec info.png

I'll test and log based on your solutions to provide more information, however it'll a long process, as usually I have less than one workday on every week to working on this.
 

Warmuptill

Active Member
OK. I was stupid. When I converted all the medias to the same format, I forgot to change some of them to the converted ones in the playlists that I'm using. Now it solved most of the not changing scene problem (a few still exist). So it seems the plugin doesn't work with mov files. At least with codec settings like this:
View attachment 77418
I'll test and log based on your solutions to provide more information, however it'll a long process, as usually I have less than one workday on every week to working on this.
That is very strange as the scene switcher is not even aware of the file format that is being played back in a media source.
Maybe somehow OBS is not reporting the media states for mov files but I have no clue why that would be the case.
Anyways, I will try to reproduce it on my end - thanks for the info! :)

And don't worry about it taking a while to gather the information!
Just provide whatever you can and when you find the time to do so and I will try to reproduce it on my end.
Just note that besides logs it is also rather crucial to know what you have configured :)
 

Warmuptill

Active Member
@CodeYan , @grimofdoom I now got around to extending the timer condition to allow specifying a random duration.

RandomTimer.PNG


A build with this feature should be available here in a few minutes:

@CodeYan as requested I added a condition that is always true if the plugin is running.

PluginRunning.PNG


A build is available here:

Note that as usual you have to be logged into GitHub to be able to download these builds.
If you should need builds including both of these two (or more) features that are only available in dev drops let me know.
 

CodeYan

Member
@CodeYan , @grimofdoom I now got around to extending the timer condition to allow specifying a random duration.

View attachment 77426

A build with this feature should be available here in a few minutes:

@CodeYan as requested I added a condition that is always true if the plugin is running.

View attachment 77427

A build is available here:

Note that as usual you have to be logged into GitHub to be able to download these builds.
If you should need builds including both of these two (or more) features that are only available in dev drops let me know.
oooooooohhhhhh nice, thanks for this and the screenshot feature too! I'll let you know if I notice anything unusual.

Now that I'm trying the dev builds, I noticed that when making backups of advanced scene switcher settings, there's no default file name, which is not easy to think of especially if OBS UI hasn't loaded yet and the dialog came first. I suggest making a default file name with a format like: adv-ss <scene collection name> YYYY-mm-dd hh:mm:ss.txt, as I think backups are associated with scene collections.

Thanks as usual!
 

AaronD

Active Member
...I suggest making a default file name with a format like: adv-ss <scene collection name> YYYY-mm-dd hh:mm:ss.txt...

If we're doing that, I'd recommend including the day of the week as well. Yes, it's redundant, but if you're doing it frequently, it's a big help.
Modifying the example would produce: adv-ss <scene collection name> YYYY-mm-dd dow hh:mm:ss.txt

Also, some things still don't like spaces in filenames, so replacing them with underscores or dashes might still be a good idea, at least in a default name. Windows certainly doesn't like colons.
So then we'd have something like: adv-ss_scene-collection-name_YYYY-mm-dd_dow_hh-mm-ss.txt
 

CodeYan

Member
I noticed that the screenshot feature update has the main output and all sources. I think it would also be useful to include an option to screenshot scenes (though I think you'd have to temporarily switch the preview scene for a while to load window captures?), with an option to select either scenes or sources, where the main output and preview scene will be listed under the scenes list, though I don't need it right now.

Also, in the macro action types dropdown list, "Switch preview scene" is listed between "Plugin State" and "Random" (breaks the alphabetical order).
 

CodeYan

Member
If we're doing that, I'd recommend including the day of the week as well. Yes, it's redundant, but if you're doing it frequently, it's a big help.
Modifying the example would produce: adv-ss <scene collection name> YYYY-mm-dd dow hh:mm:ss.txt

Also, some things still don't like spaces in filenames, so replacing them with underscores or dashes might still be a good idea, at least in a default name. Windows certainly doesn't like colons.
So then we'd have something like: adv-ss_scene-collection-name_YYYY-mm-dd_dow_hh-mm-ss.txt
Oh, right, I forgot about the colons as I was just typing it like I normally would. Thanks for the catch.
Regarding the spaces, I don't think it is that important to avoid spaces? OBS saves screenshots with spaces by default. But, I'm not against that idea if you guys deem it necessary to remove spaces. I just tend to like the one with spaces better as it looks cleaner to me.
OBS does have a checkbox "Generate File Name without Space" so maybe we could have that too in the general tab.
 

CodeYan

Member
Honestly I prefer the way it is done on the macro tab and don't really see the need to add milliseconds as the plugin itself will only perform checks at most every 50ms and the current way already provides enough accuracy to cover that range.

But I do get your point about the UI not being the same.

Please let me know if I am wrong and there are actually use cases where the increased precision is needed! :)
Ah, that's a pretty fair point. I also don't think that the increased precision is needed (at least, not me). I also find seconds being the default more user-friendly, I think? Like, I don't really want to explain what milliseconds are when I'm teaching others. But yeah, the UI not being the same is what I'm pointing at. Maybe you could kill milliseconds in the Media tab and add the other units? Might be a breaking change though so I'm leaving that for you to decide.
 

AaronD

Active Member
Ah, that's a pretty fair point. I also don't think that the increased precision is needed (at least, not me). I also find seconds being the default more user-friendly, I think? Like, I don't really want to explain what milliseconds are when I'm teaching others. But yeah, the UI not being the same is what I'm pointing at. Maybe you could kill milliseconds in the Media tab and add the other units? Might be a breaking change though so I'm leaving that for you to decide.

There have been a few times when I really wanted to start a YouTube video on a half-second or something like that. In offline editing, I can hit the exact frame that I want, which makes 1-second resolution rather coarse by comparison. Instead of frames or milliseconds though, maybe use decimal seconds?
 

CodeYan

Member
There have been a few times when I really wanted to start a YouTube video on a half-second or something like that. In offline editing, I can hit the exact frame that I want, which makes 1-second resolution rather coarse by comparison. Instead of frames or milliseconds though, maybe use decimal seconds?
it already allows for decimal seconds. like I can do 0.5 seconds.
 

Warmuptill

Active Member
@AaronD, @CodeYan thanks for the suggestion regarding backup file names!
I implemented the following file format as the default when exporting the settings or when the user is asking to back up their settings:
adv-ss-scenecollection-yyyy.mm.dd.hh.mm.ss.txt
So an example file name would be:
adv-ss-Untitled-2021.11.27.16.35.44.txt

A build is available here:
Although on its own there isn't really much to test there, so probably not worth checking out.

I think it would also be useful to include an option to screenshot scenes
Good point - an updated build can be found here in case you need it:

@CodeYan a build with the requested feature of running multiple macros in parallel as well a separate button to "test" macros is available here:
Parallel.PNG

I would appreciate if you could give this build in particular a try as it involved code changes in crucial sections of the plugin.
While I have tested it on my end as well I am sure I have probably missed some edge cases, so if you notice any crashes or freezes please let me know.
Thanks for your time and your suggestions! :)
 

Warmuptill

Active Member
Third: Is there a way to simple detect whether [any] media source has ended - instead of making multiple checking macros or a single macro with a dozen if checks to simply things?
I now got around to implementing the option to match any / all media sources on a specified scene.
That should hopefully allow you to simplify some of your macros.

AnyMedia.PNG

A build with this change will be available here in a few minutes:

I would appreciate if you could give this a try if you have the time to do so - thanks! :)
 
Top