Advanced Scene Switcher
Advanced Scene Switcher | OBS Forums
The basis of Advanced scene switcher is to detect the presence (or lack thereof) of a condition in OBS and follow a set of subsequent steps
Here are some examples:
SCENE
If a Specific Scene is Displayed -> Setup something in Preview
A real world condition might be if you go to a camera that is setup as a close up some someone, perhaps you would want to automatically set the preview screen with their name at the bottom.
If Advanced scene Switcher detects a specific scene in program, it can automatically ensure a specific scene is put into the preview monitor.
Here we have 2 scenes, a closeup shot in preview (left) and a wide shot in program (right)
BUT with AsS running with the rule as above, you will get this instead happen:
If OBS detects a certain display to be part of the system, it can send a specific video to that monitor.
You can have something occur in OBS if a file is present, or contains data.
There doesn't really seem to be a lot of sensical information on how this thing works with its command structure. Not that this document is any better, but I'll put what I know to make this work.
For relevance, the examples below are using two computers with an instance of OBS on each one.
OBS 1 is the "switcher" sending video, and Websocket commands, to OBS 2 "graphics machine" to start recording.
We will be using Advanced Scene Switcher plugin.
Steps:
Activate Websockets in your Second OBS.
Set a password and check the enable box.
You create a name for this connection, and enter in the IP, port and password of the machine.
{
"d":
{
"requestData": {},
"requestId": "",
"requestType": "ToggleRecord"
},
"op": 6
}
{
"d":
{
"requestData": {},
"requestId": "",
"requestType": "XXXXX"
},
"op": 6
}
You can substitute the XXXXX with some of the following examples:
StartRecord
StopRecrod
ToggleRecord
StartReplayBuffer
StopReplayBuffer
SaveReplayBuffer
StartVirtualCam
StopVirtualCam
ToggleVirtualCam
Heres some other commands. Use this syntax
This will let you change the scene of a remote OBS.
The command is "SetCurrentProgramScene"
But substitute "XXXXX" for your Scene Name
{
"op": 6,
"d":
{
"requestType": "SetCurrentProgramScene",
"requestId": "2",
"requestData":
{
"sceneName": "XXXXXX"
}
}
}
You can verify that a connection is happening if you look at the Websockets config page on your receiving machine. You should see some references to the IP of your source computer
Here's a link to the github site with all the commands that you could potentially use.
obs-websocket/docs/generated/protocol.md at master · obsproject/obs-websocket · GitHub
WebSocket client disconnect code
UnknownReason = 4000,
The server was unable to decode the incoming websocket message
MessageDecodeError = 4001,
// The specified `messageType` was invalid
UnknownMessageType = 4002,
// The client sent a websocket message without first sending `Identify` message
NotIdentified = 4003,
// The client sent an `Identify` message while already identified
AlreadyIdentified = 4004,
// The authentication attempt (via `Identify`) failed
AuthenticationFailed = 4005,
// There was an invalid parameter the client's `Identify` message
InvalidIdentifyParameter = 4006,
// A `Request` or `RequestBatch` was missing its `requestId`
RequestMissingRequestId = 4007,
// The websocket session has been invalidated by the obs-websocket server.
SessionInvalidated = 4008,
// The server detected the usage of an old version of the obs-websocket protocol.
UnsupportedProtocolVersion = 4009,
HTML
I wanted to send a command from OBS to Vmix. In this situation, OBS is the switcher, vMIX is the replay, so during a replay, i wanted to remote trigger vmix without needing an operator to do it.
vMIX can take web requests. So in this example, I'm triggering the request using an HTTP request in the Advanced Scene Switcher.
The configuration looks like this.
No comments:
Post a Comment
Feel free to leave a comment! If you have any information that you think should be included, please do so here and I'll get it added in.