Question / Help Advanced Scene Switcher can't help me with this need, can someone help me?

PJGHangouts

New Member
So, I have Advanced Scene Switcher configured for a few things, like going from my intro video to my live and going from my goodbye outro to offline page and then finally switch off the stream, but, I'd like to be able to hit 'Start Streaming' and then 30 seconds after being live, switch from my Offline scene to my Countdown scene. When I tried to add Offline to Countdown using Advanced Scene Switcher, it did it right away, I'd like something that will only execute once I've hit the 'Start Streaming', is this at all possible, even with another plugin I'm not aware off?

Thanks in advance.
 

Narcogen

Active Member
Advanced Scene Switcher can be configured to execute scene changes based on a evaluation of a file. Set the switcher to change to a scene when the current OBS logfile indicates that streaming has started by searching for "Streaming Start" You'd just have to choose the current logfile from the Write to File / Read From File settings before going live.

I don't think that feature includes a delay, so you'd have to do it in 2 steps-- a read from file rule that switches to a particular scene when streaming starts, and then a sequence rule that says, from that scene, go to another scene after 30 seconds.

Then make sure that the file rule takes priority over the sequence rule.
 

PJGHangouts

New Member
Oooooo, thanks for this tip, I'm so glad there are people in this world who think outside the box, I'd have never though of doing this.

Thank you, I appreciate you telling me how to do that.
 

PJGHangouts

New Member
Ok, so I must be looking at this the wrong way. So I'm coming back for a little more help =-)

With you stating it needs to look at the current log file for the words "Streaming Start" , I looked for the logs, and sure enough the log file contains "Streaming Start" but I also realized that the log file is generated/timestamped when you fire up OBS Studio.

No big deal I though, I'll just write a bat script that looks for a file with todays date and time, and copy it to a file called 'livecheck.txt' and I can use that file to check if "Streaming Start" is within it. Then end the bat script at like 15 mins after I'm live (just incase I get a ISP glitch and I start streaming again).

So, all that was set up and working and I go into Advanced Scene Switcher, and I look, the priority is set, so File is first, then Scene, Idle, etc and I go to the last tab "Write to File / Read from File" [I'm guessing that is the location] and I pick my file 'livecheck.txt' but then I can't find an option within OBS studio to say 'check this file to see if it contains Streaming Start and switch to this scene'?

Is there an option, location, etc, I need to be looking for for this? The ability to switch the scene based on finding the text?

Thanks again for any input you give me.
 

Narcogen

Active Member
The log is opened when OBS is started but it is updated as OBS runs. Maybe the scene switcher only checks at startup? Not sure. I am trying this method now and I am also unable to get it to function.

The option is in the Advanced Scene Switcher, in the "Write to File / Read From File" tab.

Switch Scene based on File Contents:

If the file (choose logfile or livecheck file here) Contains:

<string to check for, like "Streaming Start">

Switch to: <choose scene name> using <transition>

Just to be clear, I'm talking here about the optional Advanced Scene Switcher plugin, not the Automatic Scene Switcher, which is different.
 

Attachments

  • Screen Shot 2019-01-30 at 1.19.39 PM.png
    Screen Shot 2019-01-30 at 1.19.39 PM.png
    63.2 KB · Views: 34
Last edited:

PJGHangouts

New Member
Yup, I'm using the same one, I'm wondering if the theme I'm using is muxing up he options, as you can see, I can't see the choices you can see, as I'm using the Advanced Scene Switcher too

Weird.

whatIsee.jpg
 

PJGHangouts

New Member
Nope, not the theme, I've just switched default and it still doesn't show the extras, guess I'm re-installing the plugin, it must be broke.
 

PJGHangouts

New Member
Yup, plugin was borked, now I have the right options, I'll move forwards again. :) [appreciate your patience with me]

pluginwasborked.jpg
 

PJGHangouts

New Member
Hmmmm, nope, I'm wondering if I'll need to write another bat script that will check the most recent log file for the Start Streaming, if it find it, it will right out a file called switch, which could be read by the switcher, then change the scene.

I just set it up manually, i.e. had a blank file called 'sceneswitch.txt' and had the option ticked on and pointing to the blank file, I then went to the blank file and added the wording 00_Offline and saved it and OBS Studio changed scenes.

ok, back to the drawing board, but I think with a decent work around, we can get this done. :)
 

PJGHangouts

New Member
Ok, so I managed to get it done with a bat script file first.

First I created a scene copying my offline scene called 00_OnAppStart, which will be the default when I boot up OBS Studio

Basically this is what my Frankenstein code, bolted together from google search snippets does.

clear all the text files in the log folder starting with 2019*.txt
delete a few base files that I'm using and keep using and recreate them as empty [one file being the one Advanced switcher is looking at/for]

bat script now goes in a loop
[loop]
Look for text file called 2019* copy it as a file called livecheck.txt [prefer to use a copy, incase windows give that 'file is use by' issues.
search livecheck.txt for a string "Streaming Start"
is it found, nope go back to [loop]

if it is found, then copy a file containing text of my next scene "00_Offline", over the filename that the Advanced switcher is looking at, hence it see's the next scene to go to and switches.

the script is complete, so it exits.

The Advanced Scene switcher then just operates like it would do, realizing I'm on the 00_Offline scene, and then switches to my 01_Countdown after 15 seconds.

Hope this makes sense, but bottom line, I've managed to get the solution I wanted just by running a bat script in the background before I run OBS Studio.
 
Top