Hi all. Vmix 28 has added the abillity to monitor in the API the outputs. So i thought if it is possible to make a small programm to select an input,monitor it optionally and if we change by choice or by any reason the input order,restore-match the output in correct place. The program i called it vmix output selector and it is cleary an amateur try to do something usefull. In order to work properly,choose the input from the program and not from Vmix.
Also added a button for layer selection "on the fly" by mouse clicks. Press the button route layer,select the input in which you like to send as layer any other vmix input,select the layer 1 to 10 and then the input you need to send and that`s it. A more "professional" description follows and i attach the program and visual studio code for anyone who needs changes or even take the idea and make a better idea
Edit-->I upload a 2nd version that when we close vmix before the program monitoring,it will not spam a lot of "server error" and also a added a button for start-stop realtime label info when this changes manually in Vmix by choice or accidentally.
Summary of the Code (English)
This C# Windows Forms application interacts with the local vMix API to manage and monitor various “Outputs” (e.g., Fullscreen outputs, Output2, Output3, etc.) in real time. Here’s a high-level overview of what it does:
1. Context Menu & Fetching Inputs
◦ When users click a button (e.g., button1, button2, etc.), the app displays a context menu populated with:
▪ Predefined options (e.g., “Output”, “Preview”, “Multiview”)
▪ All currently available vMix inputs (retrieved from the vMix API).
◦ Selecting an item from the menu sends a corresponding command to the vMix API (for example, “SetOutputFullscreen” or “SetOutput2”).
2. Tracking Selected Inputs
◦ The code maintains a dictionary (monitoredTitles) that stores which input is linked to each output function (e.g., SetOutputFullscreen or SetOutput3).
◦ Labels on the form are updated to reflect the user’s chosen inputs.
3. Monitoring and Auto-Recovery
◦ The application uses System.Threading.Timer objects to continuously monitor each selected output. Every second, a timer callback (CheckStatus) queries the vMix API’s XML data to see if the current output still matches the expected input.
◦ If it notices that the vMix output has changed (i.e., the actual input does not match the monitored input), it automatically re-sends the SetOutput command to restore the intended input.
4. Start/Stop Monitoring Controls
◦ Dedicated “Start Monitoring” and “Stop Monitoring” buttons (for each output) activate or disable the timers.
◦ When monitoring is switched on, the corresponding button changes its color and text to indicate that monitoring is active.
5. Additional SetLayer Example
◦ There is a separate section (triggered by button16_Click) that demonstrates a 3-step dropdown approach for choosing:
▪ An initial input,
▪ A layer number (1–10),
▪ A second input to place on that layer of the first input.
◦ The final call is SetLayer sent to the vMix API with the chosen input, layer, and secondary input.
Overall, the code showcases how to:
• Dynamically load vMix inputs via the local API,
• Provide user-friendly dropdowns to select and apply those inputs to specific outputs,
• Continuously monitor the state of each output and automatically correct any unexpected changes by re-sending commands,
• Offer a multi-step selection process for layering inputs within vMix.
Hope someone find usefull the program.
o2.png
(16kb) downloaded 0 time(s). o1.png
(10kb) downloaded 0 time(s). vmix_output_selector.zip
(26kb) downloaded 2 time(s). Vmix_output_selector_code1.zip
(148kb) downloaded 1 time(s).