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
fatty  
#1 Posted : Friday, January 29, 2021 10:15:39 AM(UTC)
fatty

Rank: Member

Groups: Registered
Joined: 3/26/2020(UTC)
Posts: 19
United States
Location: Utah

Was thanked: 1 time(s) in 1 post(s)
I know that per the spec of vMix, intputs do not automatically play in anything other than the main mix.
However, I need this to happen. I've tried using a script unsuccesfully:

API.Function("Restart",Input:=0, Mix:=1)
API.Function("Play",Input:=0, Mix:=1)
API.Function("Cut",Input:=0, Mix:=1)

When I do this, the only line that actually executes is the last one.. The Restart and Play are ignored.

Any ideas for a workaround? I was thinking if maybe there's a way to find the reference to the input in the preview and then start it directly?

IE:
dim MyInput = Input.Find("Preview of Mix2)
API.Function("Play",MyInput)

Would something like that work?
fatty  
#2 Posted : Friday, January 29, 2021 11:39:27 AM(UTC)
fatty

Rank: Member

Groups: Registered
Joined: 3/26/2020(UTC)
Posts: 19
United States
Location: Utah

Was thanked: 1 time(s) in 1 post(s)
OK I've come up with this as a solution. It works but it seems REALLY clunky. Is there a better way?

Quote:
'Get preview input
dim xml as string = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)

dim mix = x.SelectNodes("//mix")
dim previewInput = mix(0).ChildNodes(0).InnerXml

Api.Function("Restart", previewInput)
sleep(100) 'prevents screen flash
Api.Function("Play", previewInput)
API.Function("Cut",Input:=0, Mix:=1)
doggy  
#3 Posted : Friday, January 29, 2021 12:17:02 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,221
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
There is no way around it , Restart and play has to be instructed on the inputs themselves
fatty  
#4 Posted : Friday, January 29, 2021 12:24:35 PM(UTC)
fatty

Rank: Member

Groups: Registered
Joined: 3/26/2020(UTC)
Posts: 19
United States
Location: Utah

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: doggy Go to Quoted Post
There is no way around it , Restart and play has to be instructed on the inputs themselves


Wow. OK. I get why they turned that off by default, to prevent confusion. But there really should be a way to enable it if you know you want to do that. Making a work around turned 3 lines of code into 9. It works. Not pretty, but it's functional at least
doggy  
#5 Posted : Friday, January 29, 2021 5:31:47 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,221
Belgium
Location: Belgium

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: fatty Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
There is no way around it , Restart and play has to be instructed on the inputs themselves


Wow. OK. I get why they turned that off by default, to prevent confusion. But there really should be a way to enable it if you know you want to do that. Making a work around turned 3 lines of code into 9. It works. Not pretty, but it's functional at least


You already worked out a way ;-)

3 or 9 lines of code , how many times do you have to type them all? (copy/paste?)

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.