logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
jhebbel  
#1 Posted : Friday, November 27, 2015 11:43:31 AM(UTC)
jhebbel

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")
jhebbel  
#2 Posted : Friday, November 27, 2015 8:24:34 PM(UTC)
jhebbel

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.
ask  
#3 Posted : Saturday, November 28, 2015 1:11:04 AM(UTC)
ask

Rank: Advanced Member

Groups: Registered
Joined: 10/13/2012(UTC)
Posts: 1,162
Australia
Location: Melbourne

Thanks: 220 times
Was thanked: 199 time(s) in 181 post(s)
Or you could use SmartTitler to do the same thing. http://shop.njastad.com/...roduct&product_id=65
jhebbel  
#4 Posted : Saturday, November 28, 2015 8:41:19 AM(UTC)
jhebbel

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.
aircooled76@gmail.com  
#5 Posted : Friday, September 30, 2016 3:50:41 AM(UTC)
aircooled76@gmail.com

Rank: Advanced Member

Groups: Registered
Joined: 8/15/2013(UTC)
Posts: 97
Man
Australia
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?
corporatejames  
#6 Posted : Friday, September 30, 2016 4:25:13 AM(UTC)
corporatejames

Rank: Advanced Member

Groups: Registered
Joined: 8/2/2015(UTC)
Posts: 364
Man
Australia
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.
aircooled76@gmail.com  
#7 Posted : Monday, October 3, 2016 8:48:43 AM(UTC)
aircooled76@gmail.com

Rank: Advanced Member

Groups: Registered
Joined: 8/15/2013(UTC)
Posts: 97
Man
Australia
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.
thanks 1 user thanked aircooled76@gmail.com for this useful post.
corporatejames on 10/4/2016(UTC)
Users browsing this topic
Guest (2)
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.