vMix Forums
»
General
»
General Discussion
»
have vmix load a certain input into preview when another certain preview is loaded into preview
Rank: Newbie
Groups: Registered
Joined: 2/22/2024(UTC) Posts: 5 Location: State Thanks: 1 times
|
Problem and desired outcome: I'm using "inputs at this position" inputs with a streamdeck, one per button. I've also set buttons for up/down left/right ptz movements for the preview. When I move these to live it goes back to the preset while live. The fix is to load the original source input into preview right after the ptz input is loaded in preview. This was adding an extra step to the workflow. There is a not preview option in triggers to accomodate.
I cobbled together some script code, mainly cut and pasting from some of doggy's posts and substituting "preview" for "active"
It works but I want to know if it can be made more efficient, as it will need to run all the time, (I'll start it with a shortcut) Maybe a shorter more specific script assigned to the ptz input button as a shortcut to run once. There are four cameras each with 7 position inputs, if I follow what I've done here in this example with one camera and three "position" inputs, there are going to be a lot of "if", "end if" statements, that it will loop through constantly. What other statement to use to group each camera's "input at this position" inputs together, so that if true in preview will load the source into preview. Also, I kinda understand the end, end if statement, but have no idea what lines 2-10 are doing. Can someone explain? Thanks.
Do dim xml as string = API.XML() dim InputPreviewName as string = "" dim Previewinput as string = ""
dim x as new system.xml.xmldocument x.loadxml(xml)
Previewinput = (x.SelectSinglenode("//preview").InnerText) InputPreviewName = (x.SelectSingleNode("//input[@number='"& Previewinput &"']/@title").Value)
if InputPreviewName = "Organist" API.Function("PreviewInput",Input:="fallfest") end if if InputPreviewName = "Pianist" API.Function("PreviewInput",Input:="fallfest") end if if InputPreviewName = "Scripture" API.Function("PreviewInput",Input:="fallfest") sleep(1000) Loop
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 4/23/2017(UTC) Posts: 1,231 Location: Germany Thanks: 3 times Was thanked: 168 time(s) in 150 post(s)
|
It's not clear to me what you intend to achieve. Streamdeck for PTZ and then switch the changed position into program output?
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 2/22/2024(UTC) Posts: 5 Location: State Thanks: 1 times
|
The goal was to be able to use the streamdeck to select a ptz position and also be able to move it with the streamdeck and then fade to live. But when fading to live it would go back to the preset. The solution was to select the input source and then move it, but that workflow was not intuitive. I needed a method to automatically put the source in preview on top of the ptz input whenever the ptz input was selected for preview. The script above is working to do that, one script for each camera. I wound up replacing the end if's with elseif's and just one end if at the end, the script will then stop once it gets a true if. It does what I want, with a bunch of other shortcuts'.
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
have vmix load a certain input into preview when another certain preview is loaded into preview
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close