-
Notifications
You must be signed in to change notification settings - Fork 81
Macros
Macros allow you to perform a list of actions when a given set of conditions is met:
The plugin supports various types of conditions and actions:
Conditions
- Audio
- Clipboard
- Cursor
- Date and time
- Display
- File
- Filter
- Folder watch
- Hotkey
- Idle detection
- MIDI
- Macro
- Media
- OBS statistics
- OpenVR
- Plugin state
- Process
- Profile
- Queue
- Recording
- Replay buffer
- Run
- Scene
- Scene item order
- Scene item transform
- Scene item visibility
- Slide Show
- Source
- Streaming
- Studio mode
- Timer
- Transition
- Twitch
- USB
- Variable
- Video
- Virtual camera
- Websocket
- Window title
Actions
- Audio
- Clipboard
- File
- Filter
- Http
- Hotkey
- MIDI
- Macro
- Media
- Open Sound Control
- Plugin state
- Profile
- Projector
- Queue
- Random
- Recording
- Replay buffer
- Run
- Scene collection
- Scene item lock
- Scene item order
- Scene item transform
- Scene item visibility
- Screenshot
- Sequence
- Source
- Streaming
- Studio mode
- Switch scene
- System tray notification
- Timer
- Transition
- Twitch
- Variable
- Virtual camera
- Wait
- Websocket
- Window
The "Macro" tab is the second tab of the settings window.
The macro tab is mainly divided into three sections:
- The list of available macros.
Each macro can be paused by unticking the checkbox next to its name. - The conditions of the currently selected macro.
- The actions of the currently selected macro.
With version 1.24.0 another section was introduced.
The "else action" section, which allows you to define actions to be executed in case the conditions are not met.
You can access it by moving the other sections up.
In the following example we will create a macro to automatically switch to a scene "End Scene" if the output of a video source has not changed for a specified amount of time.
First we switch to the Macro tab if you have not done so already. Here we add a new macro by clicking the plus symbol on the lower left and enter a name for our new macro.
Now we have to add the condition we want to trigger the automated scene switch by clicking the corresponding plus symbol (1) and selecting the type of the condition we want to use. As we want use video based scene switching we select the type "Video".
The next step is to configure the settings of this condition. We select the video source we want to monitor (Media Source) and the type of monitoring we want to take place ("has not changed"). Finally we add a duration modifier by pressing the small clock icon and configure it to our liking.
As a last step we have to specify the action that has to be performed if the condition we specified above is true.
To do this we have to add a new action to our macro by pressing the plus button in the lower middle of the macro tab.
The default action that is chose is already our desired one - "Switch scene" - so we do not have to adjust the type of the action. However, we have to select the scene we want to switch to and the transition type we want to use.
The macro is now set up and will be active if the plugin is running.
Here is a quick demo:
You can use the "Run Macro" button to test the actions of the currently selected macro.
If the macro has actions in the "else" section, you can hold down the Shift key to run them instead of the regular actions.
If you check this box, the actions of the currently selected macro will be executed in parallel to the actions of other macros.
This can be useful if you have long running actions which would otherwise block the execution of other macros until they complete.
If this option is checked, the actions or else-actions of the currently selected macro will only be executed when the overall condition result changed.
So for example, if you have set up the following macro the "mute" and "unmute" of the microphone will only take place when the scene was changed to or away from to the "BRB Scene" scene.
So, you can manually mute or unmute the microphone after the fact.
With the option unchecked you will not be able to manually mute or unmute the microphone as it will immediately muted or unmuted again.
Additional macro settings can be found under the gear icon in the top right of the macro tab.
The macros are executed from the top to the bottom of the macro list.
So assuming you have the following macros set up and all their conditions are met ...
... first the actions of Macro 1
would be executed, followed by Macro 2
, and finally Macro 3
.
The conditions are checked from the top to the bottom.
So assuming you have the following conditions set up in a given macro ...
... they would be evaluated as (((Scene) or File) and Audio)
.
- Show webcam only when speaking
- Twitch Category Changer
- Show text source with latest Twitch follower
- Detect elements on screen and hide them automatically
- Motion detection
- Start other programs when starting OBS
- Crossfading audio during scene changes
- Switch scenes randomly
- Re-shuffle VLC source
- Automatically switch scene if a game capture's target window no longer exists
- Audio based scene switching in podcast setting
- Switching scenes based on portrait or landscape mode resolution of a window capture source
- Set up a hotkey to start and stop recording with a fade from and to black
- Automatically cycle through a list of scenes
- Toggle visibility of scene items on a timer
- Advance through a list of scenes by hotkey
- Performing actions only when transitioning from A to B
- Media playlist with commercial interruptions
- Split recording of stream into chunks
- Switching scenes for Aitum Vertical plugin
- Using MIDI devices
- Change capture window of Window Capture source
- Show URLs in clipboard in browser source
- General tab overview
- Starting and stopping the plugin
- Macros explained
- Creating a macro
- Pausing macros
- Macro duration modifiers
- Exporting and importing individual macros
- Audio condition
- Cursor condition
- Date condition
- Hotkey condition
- Media condition
- Process condition
- Scene item transform condition
- Slide Show condition
- Video condition
- Audio action
- Http action
- Hotkey action
- Random action
- Scene item visibility
- Sequence action
- Action Queue example
- Variables
- Websockets
- Scripting
- Troubleshooting
- Saving and loading settings