obs-websocket icon indicating copy to clipboard operation
obs-websocket copied to clipboard

Feature Request: Hydrate some events with additional data in comparison to the v4 counterparts

Open BarryCarlyon opened this issue 3 years ago • 8 comments

Feature Request Type

RPC Event

Feature Request Type (Other)

No response

Requested Feature

Comparing v4 to v5 a number of events are "dry" on the data they send.

For example SceneTransitionStarted only decalres the kind of transition that is occuring.

The v4 equivalent being TransitionBegin decarles additional information with the event including the duration and from/to scenes

I imaging there are similar "problems" with other events being "dry" on data when compared to their v4 counter parts. But I'm just getting started on planning my OBS 27 to 28 migration paths.

I will likely update this issue with other "dry" events as I poke around

Requested Feature Usage Scenario

In the example of SceneTransitionStarted.

I detect the duration of the event and the destination scene. Half way thru the transition I run actions or tasks based on the destination scene.

So I need this information as the transitions starts

BarryCarlyon avatar Aug 15 '22 17:08 BarryCarlyon

I agree with this - I set up some events for an obs scene collection to show or hide certain elements of a nested scene depending on the live scene, and because of that setup, anything other than a cut transition looks awkward using the SwitchScenes (4.x) or CurrentProgramSceneChanged (5.x) events due to the source visibility change happening after the transition is over.

deeoncomms avatar Sep 04 '22 03:09 deeoncomms

Same for SceneTransitionEnded, lacks the toScene

ChristopheCVB avatar Oct 22 '22 22:10 ChristopheCVB

Okay, another +1 for this. Getting the fromScene and toScene is rather important to me as well. I used this very frequently and stops me from upgrading to the latest version.

tinodo avatar Oct 25 '22 19:10 tinodo

Actually kind of insane this still hasn't been updated an entire year later. Why was fromScene and toScene even removed in the first place?

cai-tan avatar Sep 02 '23 10:09 cai-tan

Should this issue be broken down into more issues? Did @BarryCarlyon find any more issues in migration? I'm currently migrating and would really like to have at least the to/from scenes in SceneTransitionStarted. 4.x did that with a custom function, GetTransitionData, but I think the data/APIs it uses do still exist in OBS, just not sure how hacky this custom function was.

zoton2 avatar Jan 16 '24 19:01 zoton2

Created a PR for this functionality, still looking into setting the duration on the response properly but the current patch works like a charm https://github.com/obsproject/obs-websocket/pull/1229

duncte123 avatar Jun 05 '24 17:06 duncte123

Little update from my side, here are windows and linux binaries if you want to use this already. These are the binary files only since the language files have not updated (you can always compile the PR yourself if you don't trust these downloads)

obs-websocket-linux.zip obs-websocket-windows-x64.zip

duncte123 avatar Jun 07 '24 05:06 duncte123