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
fva  
#1 Posted : Saturday, August 19, 2023 5:19:10 AM(UTC)
fva

Rank: Member

Groups: Registered
Joined: 8/17/2023(UTC)
Posts: 11
Brazil
Location: Rio de Janeiro

I am trying to write a script that when VIDEO INPUT 1 is active
overlay #1 goes on air with 1.000ms delay

but when the VIDEO INPUT 1 is out the transitions goes immediately out (not off).

Code:
do while true

Dim doc As New XmlDocument()  
doc.LoadXml(API.Xml)  
Dim root As XmlNode = doc.DocumentElement

' Select the node active input and fetch input number
Dim node As XmlNode = root.SelectSingleNode("/vmix/active")
Dim inputNumber as Integer = node.InnerXml

' Condition - if the current input number is equal to 1
If inputNumber <> 1 Then
	API.Function("OverlayInput1Out",Input:=13)
Else
      sleep(1000)
	API.Function("OverlayInput1In",Input:=13)
End If

sleep(50)
Loop


As a begginer, I wrote this code based on many searches on this forum, but I am not beeing able to find this part.
Can someone help?
doggy  
#2 Posted : Saturday, August 19, 2023 5:25:41 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 921 time(s) in 760 post(s)
Originally Posted by: fva Go to Quoted Post
I am trying to write a script that when VIDEO INPUT 1 is active
overlay #1 goes on air with 1.000ms delay

but when the VIDEO INPUT 1 is out the transitions goes immediately out (not off).


As a begginer, I wrote this code based on many searches on this forum, but I am not beeing able to find this part.
Can someone help?


Good effort for learning scripting but what is wrong wih just using a few triggers ?

Quote:


but when the VIDEO INPUT 1 is out the transitions goes immediately out (not off).



OverlayInput1Off
fva  
#3 Posted : Saturday, August 19, 2023 8:09:29 AM(UTC)
fva

Rank: Member

Groups: Registered
Joined: 8/17/2023(UTC)
Posts: 11
Brazil
Location: Rio de Janeiro

Quote:
Good effort for learning scripting but what is wrong wih just using a few triggers ?


I need to activate and deactivate this script for INPUT 01 from the companion app. I could not find a way to activate/deactivate triggers with companion. By my searches it is not possible.

I read a post saying that creating a virtual input is the way to go, but in my case, all the shortcuts and Multiview is already set to INPUT 01.

What I am trying to do is:
If the program is live, overlayinput1 every time INPUT 1 is active.

So If the program is not live I deactivate this script.

Code:
OverlayInput1Off


This performs a cut and not a fade out as I would like using ```OverlayInput1Out```. But even with your suggestion the cut is happening after the ```sleep(1000)``` and this is what I am trying to prevent.


doggy  
#4 Posted : Saturday, August 19, 2023 9:44:09 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 921 time(s) in 760 post(s)
So now it is related to companion use (ask in companion users groups or forums) ?

You havent mentioned if what you want to put in overlay is a title ( with proper animation imbedded) or a regular input

What are the transition effect settings for the overlays?

Why if using triggers work (no need for a script) why the need to decativate them ?

Why the need to deactivate the script ( if you insist on using one) ?

If all the shortcuts and Multiview are already set to INPUT 01. why not use another one

The more you try to explain the more confusing it seems to be becomming (and mixing terminology, triggers are not scripts) !

Can asure you this works just fine with a few triggers:
Screenshot 2023-08-19 014100.jpg (47kb) downloaded 0 time(s).
fva  
#5 Posted : Monday, August 28, 2023 2:00:02 AM(UTC)
fva

Rank: Member

Groups: Registered
Joined: 8/17/2023(UTC)
Posts: 11
Brazil
Location: Rio de Janeiro

Originally Posted by: doggy Go to Quoted Post
1) So now it is related to companion use (ask in companion users groups or forums) ?

2) You havent mentioned if what you want to put in overlay is a title ( with proper animation imbedded) or a regular input

3) What are the transition effect settings for the overlays?

4) Why if using triggers work (no need for a script) why the need to decativate them ?

5) Why the need to deactivate the script ( if you insist on using one) ?

6) If all the shortcuts and Multiview are already set to INPUT 01. why not use another one

7) The more you try to explain the more confusing it seems to be becomming (and mixing terminology, triggers are not scripts) !




Hello doggy, I will try to answer all your questions, maybe I can find a way to do what I want.

1) It is not related to companion. Companion or stream deck app was just a tool for me to activate the shortcut inside VMIX.
2) I want to overlay a title with a live clock in Overlay1.
3) Just a simple fade in and fade out.
4) I am running an one hour show on TV. I have around 30 inputs and 3 cameras. Whenever any of the 3 Cameras are on Program, I need the Live clock to be displayed in overlay1. If I transition to anything else other than the cameras, the show is not live, so I need this overlay to go out. The live clock is always on overlay1 because all the others overlay are being used. I also need it to be in overlay1 because I record this program without the LIVE CLOCK to be used another day.
I tried setting up your triggers with "OnTransitionIn" and "OnTransitionOut" on the 3 cameras, but when I cut from one camera to the other, the overlay1 is deactivated (and it makes sense because of the trigger)

5) I was thinking about deactivating the script, because I can make a LIVE SHOW and also a RECORDED SHOW, so the script would make overlay1 active on Input 1, 2 and 3 (3 cameras) on a LIVE show, but on a RECORDED show, it would not turn overlay 1 ON.

6) I said that multiview is set to INPUT 1 because that is my main camera, and sometimes I need to use multiview with the show presenter (camera 1) and a guest via skype. This is also another problem with the triggers I used. If I set triggers on INPUT1 (camera 1) and I transition to a virtual set in INPUT10, the trigger to remove overlay1 on transition out will take effect.

7) I know triggers are not scripts, I was hoping to achieve what I wanted with a script because I wasnt getting it right with triggers.
fva  
#6 Posted : Monday, August 28, 2023 2:22:31 AM(UTC)
fva

Rank: Member

Groups: Registered
Joined: 8/17/2023(UTC)
Posts: 11
Brazil
Location: Rio de Janeiro

After thinking for some days and reading many others forums, I saw someone making texts and images invisible.

So this is what I am thinking. I will put the 3 cameras on layer 4 inside a virtual set, I will add the triggers "OnTransitionIn" and "OnTransitionOut"
to the virtual set input.

When the show is live, the text and images will be visible and when the show is recorded, I will set both to invisible.

I will test this tomorrow and hope it works well, the only problem is that I will not be able to use overlay 1 to anything else if needed.
Hypohamish  
#7 Posted : Monday, August 28, 2023 8:30:28 AM(UTC)
Hypohamish

Rank: Advanced Member

Groups: Registered
Joined: 12/19/2020(UTC)
Posts: 54
United Kingdom
Location: London

Thanks: 2 times
Was thanked: 3 time(s) in 3 post(s)
Doggy alluded to, and I don't think you got his point, about the Overlay settings, in the bottom right of vMix.

Your Overlay 1 is probably set to Cut rather than Fade. If you set it to Fade, then 'OverlayInput1Out' will fade it in and out, rather than cutting it in and out.


I'm still a bit confused as to what you're trying to achieve and why it can't just be achieved with the triggers 'OnTransitionIn' and 'OnTransitionOut' on the input you want to bring an overlay in/out on.


And when you create the trigger you also define specifically what input it'll bring in/out on Overlay 1 too, meaning your overlay 1 would be free to use the 'rest of the show'.
fva  
#8 Posted : Monday, August 28, 2023 9:33:25 AM(UTC)
fva

Rank: Member

Groups: Registered
Joined: 8/17/2023(UTC)
Posts: 11
Brazil
Location: Rio de Janeiro

Originally Posted by: Hypohamish Go to Quoted Post
Doggy alluded to, and I don't think you got his point, about the Overlay settings, in the bottom right of vMix.

Your Overlay 1 is probably set to Cut rather than Fade. If you set it to Fade, then 'OverlayInput1Out' will fade it in and out, rather than cutting it in and out.


I'm still a bit confused as to what you're trying to achieve and why it can't just be achieved with the triggers 'OnTransitionIn' and 'OnTransitionOut' on the input you want to bring an overlay in/out on.


And when you create the trigger you also define specifically what input it'll bring in/out on Overlay 1 too, meaning your overlay 1 would be free to use the 'rest of the show'.


My overlay 1 in the bottom right is set to fade, and it is working fine.
My case is that I have 3 cameras and it is set like this:
Camera 01 (input 1) = 'OnTransitionIn > OverlayInput1 > Input Live Show' and 'OnTransitionOut > OverlayInput1Out > Input Live Show'
Camera 02 (input 2) = 'OnTransitionIn > OverlayInput1 > Input Live Show' and 'OnTransitionOut > OverlayInput1Out > Input Live Show'
Camera 03 (input 3) = 'OnTransitionIn > OverlayInput1 > Input Live Show' and 'OnTransitionOut > OverlayInput1Out > Input Live Show'

When I cut from any other input to camera 1 (input 1) the overlay gets activated.
When I cut from camera 01 (input 1) to camera 2 (input 2) the overlays gets deactivated because of camera 01 (input 1) trigger
but it does not gets activated again with the trigger on input 2.
dmwkr  
#9 Posted : Monday, August 28, 2023 11:50:26 PM(UTC)
dmwkr

Rank: Advanced Member

Groups: Registered
Joined: 2/23/2019(UTC)
Posts: 520

Thanks: 62 times
Was thanked: 119 time(s) in 108 post(s)
Originally Posted by: fva Go to Quoted Post


My overlay 1 in the bottom right is set to fade, and it is working fine.
My case is that I have 3 cameras and it is set like this:
Camera 01 (input 1) = 'OnTransitionIn > OverlayInput1 > Input Live Show' and 'OnTransitionOut > OverlayInput1Out > Input Live Show'
Camera 02 (input 2) = 'OnTransitionIn > OverlayInput1 > Input Live Show' and 'OnTransitionOut > OverlayInput1Out > Input Live Show'
Camera 03 (input 3) = 'OnTransitionIn > OverlayInput1 > Input Live Show' and 'OnTransitionOut > OverlayInput1Out > Input Live Show'

When I cut from any other input to camera 1 (input 1) the overlay gets activated.
When I cut from camera 01 (input 1) to camera 2 (input 2) the overlays gets deactivated because of camera 01 (input 1) trigger
but it does not gets activated again with the trigger on input 2.


1) Put a delay to "OnTransitionIn" that is longer than the out transition of the overlay, but the Overlay will move out and in again on transitions between camera inputs.

or

2) Remove the "OnTransitionOut" on the camera inputs and use it as "OnTransitionIn" on the other inputs.

or

3) Describe your problem with your script from the first post better. I, at least, haven't understood the issue.
Users browsing this topic
Guest
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.