logo

Live Production Software Forums


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

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
BlammoTV  
#1 Posted : Thursday, January 16, 2020 9:29:21 PM(UTC)
BlammoTV

Rank: Member

Groups: Registered
Joined: 1/16/2020(UTC)
Posts: 12
Netherlands
Location: Amsterdam

Thanks: 1 times
Our company works with PIPs a lot, which we create via the overlay functions (more design options than multi view).

One thing we can't wrap our heads around;
How to instantly switch OverlayInput1 with OverlayInput2. Thus the input of the big bottom overlay (Overlay1) pip, becoming the small top overlay (Overlay2) and vice versa.

Question 2 would be creating a shortcut that takes the "zoom" animation to another level;
Active output zooms to become Overlay1 and preview window animates (probably wipe up) to become Overlay2

Anybody that sees how shortcuts/scripts could make this work?

Thanks!
doggy  
#2 Posted : Thursday, January 16, 2020 9:43:17 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Quote:
One thing we can't wrap our heads around;
How to instantly switch OverlayInput1 with OverlayInput2. Thus the input of the big bottom overlay (Overlay1) pip, becoming the small top overlay (Overlay2) and vice versa.


This has been addressed a few times in this forum. Key is using "merge" between multilayered inputs instead ( you will have to adapt your design options . There is even a vMix video about it
If it the case of actually switching then api functions (in a script) to switch the layers in a multiview

Quote:
Question 2 would be creating a shortcut that takes the "zoom" animation to another level;
Active output zooms to become Overlay1 and preview window animates (probably wipe up) to become Overlay2


Don't really understand , you want to let an input (active output) become an overlay ?? Think what you are looking for is similar of not same as answer above
doggy  
#3 Posted : Thursday, January 16, 2020 9:46:47 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
btw , what more design options are you referring to?
BlammoTV  
#4 Posted : Thursday, January 16, 2020 10:00:37 PM(UTC)
BlammoTV

Rank: Member

Groups: Registered
Joined: 1/16/2020(UTC)
Posts: 12
Netherlands
Location: Amsterdam

Thanks: 1 times
Originally Posted by: doggy Go to Quoted Post
btw , what more design options are you referring to?


Mainly a border (around the PIPs).

So I could make a multi view input/layer purely as a border around the video inputs (which I then also have to animate, don't know whether Merge does this too), however;

We work with 6 video inputs at least. Since we want PIP options for every combination of these 6 video inputs, if I'm correct I will have to create a lottttt (36?) of seperate multi view/merge inputs, all and all adding up to something that screans "no go"...

That's why I was asking for a script/shortcut option that just simply flips the inputs for Overlay1 and Overlay2.
doggy  
#5 Posted : Thursday, January 16, 2020 10:24:26 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
There are a few Shortcuts available to change multiview inputs and order so that might work specifically SetMultiviewOverlay to start with

in scripting one can check what layers have which input an switch them with SetMultiviewOverlay intruction for example and so on
BlammoTV  
#6 Posted : Thursday, January 16, 2020 11:00:14 PM(UTC)
BlammoTV

Rank: Member

Groups: Registered
Joined: 1/16/2020(UTC)
Posts: 12
Netherlands
Location: Amsterdam

Thanks: 1 times
Still, I think I would need to make a lot of different multi view (virtual) inputs (all combinations), while the overlay function doesn't have this problem.

I can't find scripting options for the overlay functionality, instead of multi view.
doggy  
#7 Posted : Thursday, January 16, 2020 11:28:27 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Quote:
I think I would need to make a lot of different multi view (virtual) inputs (all combinations),


No you wouldn't, just one , maybe 2 if you want nicer transitions .

just flipt the back to pip and pip to back in one go, might need multiple buttons to trigger them though ;-)

been checking with script and is possible by reading the API xml for whats in the multiview and swap them
From there there are lots of ways one can go

But hey if the main reason to use overlay PIP is the border around it well then there is no shortcut (so can't use scripting ) to do it

Veel geluk
BlammoTV  
#8 Posted : Friday, January 17, 2020 1:36:53 AM(UTC)
BlammoTV

Rank: Member

Groups: Registered
Joined: 1/16/2020(UTC)
Posts: 12
Netherlands
Location: Amsterdam

Thanks: 1 times
You are right... so maybe I will look into the multi view option.. not happyli though ;P

Thanks for the effort and congrats on your 1500th post!
doggy  
#9 Posted : Friday, January 17, 2020 4:56:56 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Hmmm,

As i always try things out i had a go at scripting to switch multiview layers of an input regardless of what these layer inputs were.
As such i think i will have to swallow some of my statements as i think there might be a way to swap output and overlay PIP in a similar fashion


Edit: .... got it !

BlammoTV  
#10 Posted : Monday, January 20, 2020 9:43:58 PM(UTC)
BlammoTV

Rank: Member

Groups: Registered
Joined: 1/16/2020(UTC)
Posts: 12
Netherlands
Location: Amsterdam

Thanks: 1 times
So the video is an overlay based solution, instead of multiview, right?

Great work, andddd; how does it work?! Haha

Because I was able to do this with multi view, but this is still not preferred for us. It would be great to know how to flip overlays (with shortcut)!
Can you let us know the solution?
doggy  
#11 Posted : Monday, January 20, 2020 10:17:29 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Quote:
andddd; how does it work?! Haha


Turned out to be pretty straightforward ... by checking with an xpath the API xml

see which input is currently in (PIP) overlay
If there isn't any exit the script

See which input is currently active

Make the overlay input an active one (API.Function("Cut",Input:=overlayinput))
Make the active input the overlay one (API.Function("OverlayInput1In",Input:=activeinput))

connect the script (scriptstart) to a shortcut and flip to your heart's content

Similar for the second part of your idea, the second PIP, check which is preview and put in overlay with a slide effect in it or similar

The zooming to PIP will have to be done with multi view and merge and maybe replace with as overlay when zoom done

btw to easily create a frame for an input: have a color input and multi view that with your regular input , zoom it out a little , use that in other multi views or overlay etc

Your company should be happy ;-)
BlammoTV  
#12 Posted : Tuesday, January 21, 2020 1:56:34 AM(UTC)
BlammoTV

Rank: Member

Groups: Registered
Joined: 1/16/2020(UTC)
Posts: 12
Netherlands
Location: Amsterdam

Thanks: 1 times
Hi Doggy,

Thanks for this work, but I guess our knowledge of this kind of scripting is too limited.

When I enter this script, it gives the error "Name: "overlayinput" is not declared. I've tried renaming both my overlay channel and/or the name in the script (to a name of one of my inputs), but to no avail..

edit: what also adds to this, is the fact that I need to flip OverlayInput1 with OverlayInput2 and vice versa, NOT "Active" output. (Active output is a set background). It is PIP + PIP on background clip, not PIP on Active input.
BlammoTV  
#13 Posted : Tuesday, January 21, 2020 2:18:20 AM(UTC)
BlammoTV

Rank: Member

Groups: Registered
Joined: 1/16/2020(UTC)
Posts: 12
Netherlands
Location: Amsterdam

Thanks: 1 times
Originally Posted by: doggy Go to Quoted Post

Make the overlay input an active one (API.Function("Cut",Input:=overlayinput))
Make the active input the overlay one (API.Function("OverlayInput1In",Input:=activeinput))


Here are our two situations, mayyybe this makes it easier to understand what I mean haha..
https://imgur.com/a/3xb8Psx
doggy  
#14 Posted : Tuesday, January 21, 2020 4:13:47 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Quote:
Here are our two situations, mayyybe this makes it easier to understand what I mean haha..


Same deal as before , just checking on 2 overlays instead of an active input

BlammoTV  
#15 Posted : Tuesday, January 21, 2020 8:24:26 PM(UTC)
BlammoTV

Rank: Member

Groups: Registered
Joined: 1/16/2020(UTC)
Posts: 12
Netherlands
Location: Amsterdam

Thanks: 1 times
This is amazing! Still having troubles with the script unfortunately.. I've tried renaming both script, as inputs etc. but it keeps saying "Name: "overlayinput" is not declared", and I know what this means, but not how to properly fix this :S
doggy  
#16 Posted : Tuesday, January 21, 2020 8:53:54 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Originally Posted by: BlammoTV Go to Quoted Post
This is amazing! Still having troubles with the script unfortunately.. I've tried renaming both script, as inputs etc. but it keeps saying "Name: "overlayinput" is not declared", and I know what this means, but not how to properly fix this :S


What do you have so far ?

BlammoTV  
#17 Posted : Wednesday, January 22, 2020 12:25:46 AM(UTC)
BlammoTV

Rank: Member

Groups: Registered
Joined: 1/16/2020(UTC)
Posts: 12
Netherlands
Location: Amsterdam

Thanks: 1 times
Dozens of different varieties. Key is I don't know which parameters vmix uses in/to speak to .NET, and there appears to be 0 documentation for this? Also

API.Function("OverlayInput1In",Input:="OverlayInput2")
API.Function("OverlayInput2In",Input:="OverlayInput1")
Doesn't work. No ideas what syntaxes Input could have etc..

Other variation:
API.Function("OverlayInput1In",Input:=Overlay2)
API.Function("OverlayInput2In",Input:=Overlay1)
Doesn't work. Same problem.

Dim X as Integer = Overlay.Find(1).Number
Dim Y as Integer = Overlay.Find(2).Number
API.Function("OverlayInput1In", Input:=Y)
API.Function("OverlayInput2In", Input:=X)
Doesn't work. As I don't know what else I should use for "Number" etc..

Also tried the same, but with :
Dim X as Integer = Overlay.Find(overlay number="1")
or
Dim X as Integer = overlay number="1"


Etc. etc. Obviously I don't have enough experience in coding. But even when I talked to programmers here, they say "where's the documentation to see what we can work with"...
doggy  
#18 Posted : Wednesday, January 22, 2020 12:53:56 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
the programmers are getting paid to much LOL

Key is you need to check if an overlay is on and which input (number) it is using , you can not just flip them if you dont know what they are

You can find this in the API xml file 127.0.0.1:8088/API which is constantly updated (its near the end of the file)

say you have the number of the input of overlay 2 in variable ovl2input (if it is "nothing"that means the overlay is not on = hint)

just change the overlay input API.Function("OverlayInput1In",Input:=ovl2input) and similar for overlay 2

there are a few examples for reading the API XML in the scripting for dummies post .
as for how to figure out the API.functions one can refer to the shortcut list (helpfiles) or the shortcuts in the setting options.

more later maybe , got to go to work
BlammoTV  
#19 Posted : Wednesday, January 22, 2020 1:15:07 AM(UTC)
BlammoTV

Rank: Member

Groups: Registered
Joined: 1/16/2020(UTC)
Posts: 12
Netherlands
Location: Amsterdam

Thanks: 1 times
Haha! The programmers were friends, not coworkers ;) I asked them as a quick favor over a coffee

I know how to read the API xml, output says:

Example A

<overlays>
<overlay number="1">5</overlay>
<overlay number="2">2</overlay>
<overlay number="3"></overlay>
<overlay number="4"></overlay>
<overlay number="5"></overlay>
<overlay number="6"></overlay>
</overlays>

But, two minutes later Example B

<overlays>
<overlay number="1">3</overlay>
<overlay number="2">4</overlay>
<overlay number="3"></overlay>
<overlay number="4"></overlay>
<overlay number="5"></overlay>
<overlay number="6"></overlay>
</overlays>

I need to be able to flip all of them. So in example A 5 and 2 need to flip, and in example B 3 needs to switch with (cam) input 4 etc.

You talk about "ovl2input", you named this variable yourself I presume. So my problem is I don't know with what code I should "fill" that variable with the right input number, and then how I execute that variable afterwards.

Thanks and good luck at work!

doggy  
#20 Posted : Wednesday, January 22, 2020 4:04:12 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
As i have mentioned before and noted in the video comment changing the content of an overlay is as one normally would , you put the wanted input in that overlay by selecting the overlay of that input. (by mouse, clicking on the overlay number under the input or shortcut) or turn on or off

the switching between the 2 overlays being displayed is only needed when the 2 overlays are shown not to change them !

I have pointed to the "scripting for dummies" post where there are a few examples of how to check something in the API xml

Code:
dim xml = API.XML()
dim ovl2input as string = ""

dim x as new system.xml.xmldocument
x.loadxml(xml)

ovl2input = (x.SelectSingleNode("//overlays//overlay[2]").InnerText)



I have mentioned how to execute the code to replace the input in the overlay in my previous response but i will repeat!

Code:
API.Function("OverlayInput1In",Input:=ovl2input)


or one can find the structure (parts needed) if one would create a shortcut to do this or from the Shortcut Function Reference page in the help files





thanks 1 user thanked doggy for this useful post.
BlammoTV on 1/23/2020(UTC)
Users browsing this topic
Guest
2 Pages12>
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.