jshea2 / OSC-for-OBS

Control and listen to OBS via OSC
113 stars 7 forks source link
electron javascipt nodejs obs osc qlab show-control theatre websocket

OSC for OBS

Control and listen to OBS via OSC protocol

OSCforOBS copySmall

Setup

Requires: obs-websocket plugin v5.0 and above (This is included in OBS v28)

Download OSC for OBS (v3.0) Now

Screen Shot 2021-11-21 at 4 17 23 PM

-Make sure you place the application in a folder with permissions to read and write:

Application OSC -> OSC for OBS

#

OSC Command List:

Note: a space in the notated syntax indicates the separation between address and argument's

Example: /scene "Scene 1" would be...

address argument 1 argument 2 argument ect...
/scene Scene 1

#

- Trigger Scenes: -

#

by Name in Argument

/scene [scene name]

by Index as Scene

/scene [index number]

by Name in Address

/scene/[scene_name]

by TouchOSC

/scene/[scene_name] Value 0 to 1

Next Scene

/go

Previous Scene

/back

#

- Set Transition Type and Duration: -

# /[type]/transition [duration]

#

- Set Text (for FreeType 2 ONLY): -

# /[source_name]/setText [text content] [size(optional)] [font (optional)]

#

- Set Opacity: -

# /[source_name]/[color_correction_filter_name]/opacity [0 thru 1]

Contrast

/[source_name]/[color_correction_filter_name]/contrast [-2 thru 2]

Brightness

/[source_name]/[color_correction_filter_name]/brightness [-1 thru 1]

Saturation

/[source_name]/[color_correction_filter_name]/saturation [-1 thru 5]

Hue Shift

/[source_name]/[color_correction_filter_name]/hueShift [-180 thru 180]

#

- Translate Source's Position: -

# /[scene_name]/[source_name]/position [x] [y]

Unmute

/[source_name]/unmute

Toggle Audio

/[source_name]/audioToggle [0 or 1]

Volume

/[source_name]/volume [0 thru 1]

Monitor Off

/[source_name]/monitorOff

Monitor Only

/[source_name]/monitorOnly

Monitor and Output

/[source_name]/monitorAndOutput

#

- Media Controls: -

#

Play

/[source_name]/mediaPlay

Pause

/[source_name]/mediaPause

Restart

/[source_name]/mediaRestart

Stop

/[source_name]/mediaStop

Cursor

/[source_name]/mediaCursor [int]

#

- Projector Controls: -

#

/[type]/openProjector [display_number] [sceneorsource_name]

#

- Studio Mode: -

#

Set StudioMode

/setStudioMode [0 or 1]

Enable

/enableStudioMode

Disable

/disableStudioMode

Toggle

/toggleStudioMode

#

- Trigger Preview Scenes: -

#

by Name in Argument

/previewScene [scene name]

by Name in Address

/previewScene/[scene_name]

Trigger Transition to Program

/studioTransition [type(optional)] [duration(optional)]

#

- Streaming and Recording: -

#

Set Recording

/setRecording [0 or 1]

Start Recording

/startRecording

Stop Recording

/stopRecording

Toggle Recording

/toggleRecording

Pause Recording

/pauseRecording

Resume Recording

/resumeRecording

Set Streaming

/setStreaming [0 or 1]

Start Streaming

/startStreaming

Stop Streaming

/stopStreaming

Toggle Streaming

/toggleStreaming

Set VirtualCam

/setVirtualCam [0 or 1]

Start VirtualCam

/startVirtualCam

Stop VirtualCam

/stopVirtualCam

Toggle VirtualCam

/toggleVirtualCam

#

- Settings: -

#

Set Scene Collection

*/setSceneCollection [Scene Collection Name]

Set Profile

*/setProfile [Profile Name]

#

- NDI and Other Outputs -

#

List Outputs NAmes

/listOutputs

Start Output

/startOutput [name]

Stop Output

/stopOutput [name]

#

- Miscellaneous -

#

Renaming

/rename [current-name] [new-name]

Send Closed Captions

*/sendCC [text]

Set Recording File Name

*/recFileName [string]

Get Source Text (FreeType2) String Repeatedly

/[text source]/getTextFreetype [1]

Get Source Text (GDI) String Repeatedly

/[text source]/getTextGDI [1]

Set Active Scene Item Visibility by Index

-/[index]/activeSceneItemVisibility [0 or 1]

Set Specific Scene Item Visibility by Index

-/[scene_name]/[index]/activeSceneItemVisibility [0 or 1]

Take Screenshot

-/takeScreenshot

Trigger Hotkey

-/[modifier]/[key]/hotkey

Open External File / URL

Might ask to allow "OSC for OBS" access

Simulate Keypress on Front/Active Window (BETA)

(Java Run Time)[https://www.java.com/en/download/manual.jsp] is required for this feature. After downloading and installing restart computer.

~ Editing Commands While Selected in OBS: ~

# Mainly used for TouchOSC

Add Scene Item

/addSceneItem [scene_item]

Change Transition Override Type

/transOverrideType/[type]

Change Transition Override Duration

/transOverrideDuration [duration]

Change Scale

/size [float]

Change Position X and Y

/move [x] [y]

Change Position X

/movex [x]

Change Position Y

/movey [y]

Change Alignment

/align [int]

Change Rotation

/spin [int]

Change Bounds to Fit to screen

/fitToScreen

Get Source Settings

/getSourceSettings

#

OBS -> Application:

TouchOSC Feedback:

When Checked this sends OSC messages back to TouchOSC for dynamic control.

Active Scene Feedback

Use the following setup for /scene command for a push button in TouchOSC Editor:

Screen Shot 2021-04-13 at 4 44 31 PM

In OSC for OBS use the following setup:

Fader Volume Feedback

Use the following setup for /[source]/volume command for a fader in TouchOSC Editor:

Screen Shot 2021-04-19 at 8 33 29 PM

Muting/UnMuting Toggle Feedback

Use the following setup for /[source]/audioToggle command for a toggle button in TouchOSC Editor:

Screen Shot 2021-04-19 at 8 33 18 PM

Media Playback Feedback

Play

Pause

Stop

Source Visibility

Transitions

Transition Type

Transition Duration

Stats Label Feedback

When Streaming/Recording:

Screen Shot 2021-04-19 at 8 33 18 PM

Troubleshooting

OSC Tester

Screen Shot 2021-03-01 at 5 44 26 PM
Screen Shot 2021-03-01 at 5 44 26 PM

Editing The Code Yourself

OSC for OBS is an Electron application that is powered by HTML, CSS, Javascript, and Node.js. You can access and edit any of these files by doing the following:

Mac

PC

Acknowledgement

This was inspired by ObSC

#

Support The Project ❤️

If OSC for OBS helped you, consider helping the project by making a one time donation via PayPal

#

Join the Discord Community

<img src="https://img.shields.io/discord/308323056592486420?logo=discord" alt="chat on Discord">

Download OSC for OBS (v3.1) Now