Created Video condition (markdown)

WarmUpTill
2022-03-13 20:54:23 +01:00
parent 7a7ce3ba51
commit 42c1d47bcb

84
Video-condition.md Normal file

@@ -0,0 +1,84 @@
The "Video" macro condition allows you to trigger actions when a video source ...
* is similar to a provided pattern or exactly matches it
* contains certain objects
* has changed
* has no output
These different options will be described in more detail below.
### Important note
If a video source is currently not being rendered by OBS (e.g. if every instance the source is hidden) some check types might not work as you would expect.
You can work around this limitation by opening a "Windowed Projector" of the source by right-clicking on the particular source and choosing the "Windowed Projector (Source)" entry in the context menu.
![WindowedProjector](https://user-images.githubusercontent.com/19472752/158076406-dbc9b97a-a5cc-4605-911a-805fbeb600ae.PNG)
## General settings
This section will cover the general settings which are available regardless of which video condition type is chosen.
### Video source selection
All video condition types require you to select which video source you want to analyze.
You can select the source by clicking on the desired entry in the combobox.
![SourceSelection](https://user-images.githubusercontent.com/19472752/158075705-a6061b0f-71ef-4d0e-9875-27899080ec7f.PNG)
### Condition type selection
You can select which type of check you want to perform in the highlighted combobox.
![ConditionType](https://user-images.githubusercontent.com/19472752/158075785-fd270546-dc40-496e-b1b3-454fcbefa2e9.png)
### Image selection
Most condition types require specifying a reference image or pattern the video source's output has to be compared to.
The path can be entered in the highlighted text input field (2) or you can press the "Browse" button to select the file in OS' file explorer.
In some cases you also have the option to create a screenshot of the current output of the video source when pressing the "Browse" button.
![ImageInput](https://user-images.githubusercontent.com/19472752/158076628-72135629-a417-49db-8bf1-a84406e49731.PNG)
### Area selection
Most check types of the video condition support only matching a specified area of the video output source.
This can be useful if you want to ignore certain areas of the video source.
Another reason to use this option is if you try to apply the video condition checks to a very high resolution source and want to reduce the performance impact of running this condition's checks. (Especially the object detection and pattern matching can become very resource intensive)
![Area](https://user-images.githubusercontent.com/19472752/158075506-31a42adf-35d8-40ad-ab33-35b9f599c61a.PNG)
To select enable this functionality first tick the corresponding checkbox. (1)
Next either manually enter the area you want to focus on by typing in the desired X coordinate, Y coordinate, width and height. (2)
Alternatively press the "Select area" button to open a preview window of the source and mark the area by drawing a rectangle over it. (3)
## Condition types
### Exactly matches
When selecting this type of check the video source or the sub-area that was selected to be checked needs to match for every single pixel.
That means if resolution of the video source / selected area and the provided input image do not match the condition will always be false.
### Does not match
This condition type is the inverse to "exactly matches".
Meaning, if only a single pixel does not match or the resolution of the checked source / area differs to the provided image this condition will be true.
### Has changed
This condition type is true if the video source or the selected area has changed.
As the name would suggest, it is most useful if you do not really care about the exact content of a video source but want to trigger actions if something changed.
![Changed](https://user-images.githubusercontent.com/19472752/158076101-5f1b0873-87a1-4da8-9f6e-e44c73569fb7.PNG)
If you want to ignore minor changes in the image you can enable "pattern matching". (1)
### Has not changed
This condition type is the inverse of the "has changed" condition type.
### Has no output
This condition is true if the video source has no output at all.
This is *not* the same as the video source having a black image as video output.
An example of a video source having no output would be if all instances of the source are currently hidden. (Eye icon next to source)