-
Notifications
You must be signed in to change notification settings - Fork 81
Media condition
The "Media" macro condition allows you to check the state and current playback time of various media source types.
Supported source types are:
- Media Source
- VLC Video Source
- Image Slide Show
The source to test can be selected at (1).
The states that can be checked for are the following:
- Playing
- Opening
- Buffering
- Paused
- Stopped
- Ended
- Ended (Playlist)
- Any
The state to check for can be selected at (2).
-
Select "Any" if you would like to only test for conditions in the time selection.
-
The "Ended" will trigger when individual playlist items end when using VLC Video Sources.
-
The "Ended (Playlist)" state is intended to be used in combination with VLC Video Source playlists.
It is not a media state natively supported by OBS and thus comes with some drawbacks. It works by checking if the selected media source reports the "ended" state for an extended period of time.
Thus if VLC Video Source is configured to be continuously looping this state will not trigger.You can work around this limitation by using a macro to do the looping of the playlist instead and disabling the "Loop Playlist" of the VLC video source.
-
"Stopped" and "Ended" behave differently.
The former is trigger if the playback is manually stopped using the media controls, the latter if the playback ended on its own. -
Prior to OBS version 28.0.2 the media state reported by the Image Slide show was very inconsistent with what the source was actually doing. (E.g. would remain in Ended state even though the playback was restarted)
-
The different source types might behave sightly differently in regard to when which state is active so you might have to experiment a bit.
You will be able to check the total length of the media source and the remaining time of the current playback using the time selection at (3).
- Select "None" if you would like to only test for conditions in the state selection.
- 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