vMix Forums
»
General
»
3rd Party Software and Development
»
How do you reference previewed/live clips and its attributes in VB.net
Rank: Advanced Member
Groups: Registered
Joined: 10/28/2015(UTC) Posts: 183
Thanks: 7 times Was thanked: 15 time(s) in 14 post(s)
|
I wish to write a script that will take the current inputs name split it on a bar "|" and use the first index as the Headline and the second as the Description attributes to a lower 3rd. This is mostly easy enough but the lack of documentation in the accessible classes and objects of the vMix library are making it pretty hard. Basically all I need to know is how to access preview/live inputs and their respective attributes such as title or name. I imagine it would look something like Code:
dim liveTitle As String = Input.Live.Name
dim liveTitleParts As String() = liveTitle.Split(New Char() {"|"c})
dim lowerThird = Input.Find("lower3rd.xaml")
lowerThird.Text("Headline") = liveTitleParts(0)
lowerThird.Text("Description") = liveTitleParts(1)
Overlay.Find(1).In("lower3rd.xaml")
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 10/28/2015(UTC) Posts: 183
Thanks: 7 times Was thanked: 15 time(s) in 14 post(s)
|
Well after decompiling a couple of the vMix dll's it appears that there is no such object or property (at least exposed) that contains the 'Name' of the 'Input' object. In fact the Input object appears to be abstract and only contains an extension method for running functions. Seems an unfortunate way to use the API as it cripples its usefulness. None the less a hackabout way of doing what I want is possible through the data provided in thr API XML response: Code:
Dim doc As New XmlDocument()
doc.Load("http://127.0.0.1:8088/API")
Dim activeID As String = doc.SelectSingleNode("/vmix/active").InnerText
Dim activeName As String = doc.SelectSingleNode("/vmix/inputs/input[@number='"+activeID +"']").InnerText
dim liveTitleParts As String() = activeName.Split(New Char() {"|"c})
dim lowerThird = Input.Find("AnimatedHD.xaml")
lowerThird.Text("Headline") = liveTitleParts(0)
lowerThird.Text("Description") = liveTitleParts(1)
Overlay.Find(1).In("AnimatedHD.xaml")
By using this method I can make a single push button on my controller pop up a title lower 3rd for an input provided the input is named in the "Headline|Description" format. The usefulness of this is for in my case when I have panels with multiple people but do not necessarily want to create a whole bunch of titles and bind them to a whole bunch more buttons on my controller.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 10/13/2012(UTC) Posts: 1,162 Location: Melbourne Thanks: 220 times Was thanked: 199 time(s) in 181 post(s)
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 10/28/2015(UTC) Posts: 183
Thanks: 7 times Was thanked: 15 time(s) in 14 post(s)
|
Took a look at that, saw no mention of MIDI support so thats a deal breaker for me.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 8/15/2013(UTC) Posts: 97 Location: Could be Australia could be Europe/UK! Thanks: 1 times Was thanked: 7 time(s) in 7 post(s)
|
Hi Guys, I would like to create a script that varies depending on what input is live. I have a camera and a replay input I want to reference as the condition. Code:If Input.Find("replaytest") = "Active" Then
Overlay(1).out()
Sleep(300)
API.Function("Stinger1")
Sleep(740)
Overlay(2).in("RPBug.png")
End If
If Input.Find("replaytest") = "Active" Then
Overlay(2).out()
Sleep(300)
API.Function("Stinger1")
Sleep(740)
Overlay(1).in("ultiTV SB.xaml")
End If
I can't for the life of me work out how to reference the active input to make the if statement work... any suggestions?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 8/2/2015(UTC) Posts: 364 Location: Sydney Thanks: 283 times Was thanked: 76 time(s) in 62 post(s)
|
@aircooled76 you can do that with triggers already try overlay off option when you choose stinger to go replay (scorebug overlay will turn) then when go back to live camera choose the score overlay again but not the IN and OUT options as this will make the xaml trigger its IN and Out animation if you have one.
Not sure if that's what you mean but that's what I do for replay so scorebug is not on screen during replay.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 8/15/2013(UTC) Posts: 97 Location: Could be Australia could be Europe/UK! Thanks: 1 times Was thanked: 7 time(s) in 7 post(s)
|
Thanks James, That works a treat, would still be nice to be able to trigger actions based on what the active input is.
|
1 user thanked aircooled76@gmail.com for this useful post.
|
|
|
vMix Forums
»
General
»
3rd Party Software and Development
»
How do you reference previewed/live clips and its attributes in VB.net
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