Rank: Newbie
Groups: Registered
Joined: 12/23/2022(UTC) Posts: 1 Location: New York
|
This may help. I wrote this script to emulate preview of Mix 1, including the ability to preview overlays. This way you don't need to burn one of the 4 outputs to look preview back in. Create a color/transparent input, and name it "Preview" and run this script. It should work. Quote:Do While True Dim doc As New XmlDocument() doc.LoadXml(API.Xml) Dim root As XmlNode = doc.DocumentElement
Dim node1 As XmlNode = root.SelectSingleNode("/vmix/preview") Dim previewNumber As Integer = node1.InnerXml API.Function("SetMultiViewOverlay","Preview", "1," & previewNumber)
' Overlay 1 Dim node2 As XmlNode = root.SelectSingleNode("/vmix/overlays/overlay[1]") If node2 IsNot Nothing And node2.Attributes("preview") IsNot Nothing Then Dim inputNumber As Integer = node2.InnerXml API.Function("SetMultiViewOverlay","Preview", "2," & inputNumber) Else API.Function("SetMultiViewOverlay","Preview", "2,None") End If
' Overlay 2 Dim node3 As XmlNode = root.SelectSingleNode("/vmix/overlays/overlay[2]") If node3 IsNot Nothing And node3.Attributes("preview") IsNot Nothing Then Dim inputNumber As Integer = node3.InnerXml API.Function("SetMultiViewOverlay","Preview", "3," & inputNumber) Else API.Function("SetMultiViewOverlay","Preview", "3,None") End If
' Overlay 3 Dim node4 As XmlNode = root.SelectSingleNode("/vmix/overlays/overlay[3]") If node4 IsNot Nothing And node4.Attributes("preview") IsNot Nothing Then Dim inputNumber As Integer = node4.InnerXml API.Function("SetMultiViewOverlay","Preview", "4," & inputNumber) Else API.Function("SetMultiViewOverlay","Preview", "4,None") End If
' Overlay 4 Dim node5 As XmlNode = root.SelectSingleNode("/vmix/overlays/overlay[4]") If node5 IsNot Nothing And node5.Attributes("preview") IsNot Nothing Then Dim inputNumber As Integer = node5.InnerXml API.Function("SetMultiViewOverlay","Preview", "5," & inputNumber) Else API.Function("SetMultiViewOverlay","Preview", "5,None") End If
Sleep(66) Loop
|