/PixelMatchSwitcher

PixelMatchSwitcher plugin for OBS Studio.

Primary LanguageC++

Pixel Match Switcher

Pixel Match Switcher is an OBS Studio plugin that can trigger switching scenes, changing visibility of scene items and filters, and other actions in response to pixels of video being matched against image templates.

  • Considerable amount of options is available for customizing the matching rules and the switching behavior.
  • Significant effort has been made towards a quick and user-friendly creation of match rules.
  • An individual matching image triggers transition to a specific scene, and several match entries (each with their own scene target) can be arranged in a priority-ordered list.
  • Other actions can be triggered independently of each other:
    • scene item on/off
    • filter on/off
    • audio source mute/unmute
    • simulated hotkeys (must be assigned)
    • write to file (append or truncate)
    • frontend actions
      • streaming start/stop/pause
      • recording start/stop/pause/unpause
      • replay buffer start/save/stop
      • take screenshot
      • virtual cam start/stop

Foreseeable Use Cases

  • Streamers often like to have displays with a bigger streamer-cam and/or ads when they are in a game menu, or some other “non gameplay” area of the game.
  • Streamers often need to hide certain elements of game content, so they don’t get stream-sniped by people who want to gain an advantage by watching their stream while playing against them. Currently, streamers handle these cases manually, by manually switching scenes everytime, either with the OBS UI or by assigning hotkeys.
  • Tournament broadcasters may wish to provide video overlays to identify participants and their team, or to show the game score. These could be activated or hidden automatically, in reaction to specific in-game graphics.
  • Generally speaking, any use case where a region of a video frame will contain predictable pixels that should trigger one of the supported actions

Requires Features Implemented in the OBS Fork

Presently, the plugin requires a special atomic-effects fork of OBS to function. We provide installers of the forked OBS with the plugin included to make everything easier to try out.

Screenshot

image

User Resources

Atomic Effects Fork of OBS

Pixel Match Switcher plugin requires effect results and atomic counters to work. These precursor features are not present in the mainline of OBS Studio at the moment of writing. We provide the atomic-effects fork to introduce these key features into OBS and make our plugin possible. Effort is being made to keep the fork up-to-date with the latest OBS commits.

Changes of the atomic-effects fork have been documented, but merging into the official OBS mainline is extremely unlikely. Developers' response was that the functionality of the fork is too specific to the plugin, and does not justify maintaining atomic effects changes in the official OBS. We are very open to folks including our fork's changes and the plugin in their own forks and builds, but please contact us so that proper credits are given if you plan on wide distribution. There are no plans to discontinue maintaining the fork, but not every update will be timely.

Thought-About Expansion Features

  • Advanced matching logic: AND, OR, etc
  • Try to match an image anywhere in the video frame (not just at a fixed position) and allow show/hide of an image/mask source at the location where the match image would be found
  • More advanced image processing could be made available for identifying elements in the video, so long as it is fast (and should probably stick to being implemented in the shader). This could broaden possible uses of the plugin.

🚧 Build Resources

Special Thank You

👍 Special Thank You goes out to Exceldro for letting obs-move-transition plugin be included with our installer builds.

Related Github Projects