Git Product home page Git Product logo

Comments (7)

WarmUpTill avatar WarmUpTill commented on June 11, 2024

I would assume that this is a bug, unless I am misunderstanding something.

The following setup does not seem to reproduce the issue on my end:

Sequence:
scene1 -> 3s -> scene2
scene2 -> 3s -> scene3
scene3 -> 3s -> scene1

Automatically start recording on scene2.

The recording is always started when entering scene2 using the sequence or when manually switching to it.

Does a setup like this cause the issue on your end?

There is a limitation that the automatic starting of the recording will only happen once for each scene change.

if (autoStartedRecently)
return;

The reason being so you can actually stop a recording and will not be spammed with errors if there is an invalid stream / recording configuration.

Is this what you are referring to?

from sceneswitcher.

psifertex avatar psifertex commented on June 11, 2024

My desired behavior is similar to your setup above. Let me try with a fresh set of scenes to confirm and see if I can isolate why I'm not seeing the same behavior. I have very few rules in my setup. Is there a consolidated configuration file I can extract and post that might make it easier to see my settings?

from sceneswitcher.

psifertex avatar psifertex commented on June 11, 2024

Ahh, just found the export. Here's my current settings if it helps:

{
    "active": true,
    "audioSwitches": [],
    "audioTabPos": 12,
    "autoStartEnable": true,
    "autoStartSceneName": "Start Recording",
    "autoStartType": 0,
    "autoStopEnable": true,
    "autoStopSceneName": "Ending Blank",
    "defaultTransitions": [],
    "disableHints": false,
    "exeTabPos": 4,
    "executableSwitches": [],
    "fileSwitches": [],
    "fileTabPos": 7,
    "generalTabPos": 0,
    "idleEnable": false,
    "idleSceneName": "",
    "idleTabPos": 10,
    "idleTime": 60,
    "idleTransitionName": "",
    "ignoreIdleWindows": [],
    "ignoreWindows": [],
    "interval": 300,
    "mediaSwitches": [
        {
            "restriction": 0,
            "scene": "Start Recording",
            "source": "IntroMovie",
            "state": 6,
            "time": 0,
            "transition": "Fade"
        },
        {
            "restriction": 0,
            "scene": "Ending Blank",
            "source": "OutroVideo",
            "state": 6,
            "time": 0,
            "transition": "Fade"
        }
    ],
    "mediaTabPos": 6,
    "non_matching_scene": "",
    "pauseScenes": [],
    "pauseTabPos": 2,
    "pauseWindows": [],
    "priority0": 0,
    "priority1": 1,
    "priority2": 2,
    "priority3": 3,
    "priority4": 4,
    "priority5": 5,
    "priority6": 6,
    "priority7": 7,
    "priority8": 8,
    "randomSwitches": [],
    "randomTabPos": 8,
    "readEnabled": false,
    "readPath": "",
    "regionTabPos": 5,
    "sceneRoundTrip": [
        {
            "delay": 0.0,
            "delayMultiplier": 1,
            "sceneRoundTripScene1": "Start Recording",
            "sceneRoundTripScene2": "FaceCam",
            "transition": "Fade"
        }
    ],
    "sceneTransitions": [],
    "screenRegion": [],
    "sequenceTabPos": 11,
    "startHotkey": [],
    "startup_behavior": 0,
    "stopHotkey": [],
    "switch_if_not_matching": 0,
    "switches": [],
    "tansitionOverrideOverride": false,
    "threadPriority": 3,
    "timeSwitches": [],
    "timeTabPos": 9,
    "titleTabPos": 3,
    "toggleHotkey": [],
    "transitionTabPos": 1,
    "verbose": false,
    "writeEnabled": false,
    "writePath": ""
}

from sceneswitcher.

psifertex avatar psifertex commented on June 11, 2024

The flow is that the Intro scene has a media file that when completed auto-switches to Start Recording which triggers recording and immediately transitions to FaceCam. The transitions are happening but the recording isn't starting. As soon as I disable the sequence transition from Start Recording to FaceCam (or just temporarily trigger it on another unrelated scene) the recording happens but obviously i'm stuck on a black scene then.

from sceneswitcher.

WarmUpTill avatar WarmUpTill commented on June 11, 2024

I think I have now understood the problem:

As mentioned previously, there is a limitation that the automatic starting of the recording will only happen once for each scene change.
The reason being so you can actually stop a recording and will not be spammed with errors if there is an invalid stream / recording configuration.

if (autoStartedRecently)
return;

This flag limiting the automatic starting of streaming and recording is reset on receiving the OBS_FRONTEND_EVENT_SCENE_CHANGED signal which is emitted when a transition of a scene change completes.
case OBS_FRONTEND_EVENT_SCENE_CHANGED:
handleSceneChange((SwitcherData *)switcher);
break;

So you are on the Intro scene and the check for automatically starting recording / streaming finished and the flag is set to not try this again until OBS_FRONTEND_EVENT_SCENE_CHANGED resets this.
You are now switching from scene Intro to scene Start Recording using a fade transition, after the corresponding media state is reached.
To complete this transition a certain amount of time needs to pass before you are on scene Start Recording and OBS_FRONTEND_EVENT_SCENE_CHANGED is emitted.
While this transition is still going on the scene switcher notices that you are on Start Recording and checks if it should start the recording, but notices the flag to skip this step is still set.
One of the next checks is then the scene sequence one.
For this a match is found for Start Recording for which you entered a delay of 0ms so the scene switcher immediately switches to the next scene FaceCam.

So now you ended up on FaceCam but the recording was not started.

Unfortunately I do not know of a good way around this problem, if you really need this exact configuration.

To work around it you could either increase the delay from Start Recording to FaceCam to be longer than the fade transition or similarly you could increase the check interval of the scene switcher to be longer than the fade transition will last.

Does this help?

from sceneswitcher.

psifertex avatar psifertex commented on June 11, 2024

I can just use a cut transition, I don't actually need it to be a fade. Let me try that work-around.

from sceneswitcher.

WarmUpTill avatar WarmUpTill commented on June 11, 2024

I assume the work-around functioned as expected - if not please let me know.
I will close this for now as I do not see any easy solution.

from sceneswitcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.