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
VasaA-V  
#1 Posted : Tuesday, January 3, 2023 7:54:59 AM(UTC)
VasaA-V

Rank: Newbie

Groups: Registered
Joined: 12/21/2022(UTC)
Posts: 8
United States
Location: Minnesota

Thanks: 4 times
I often have situations where I want a shortcut to do something based on what input is at the Preview. For instance, assume a side-by-side view is desired at the output where the left image is a fixed input, but the right image can change from one camera or video to another. This can be set up with an input containing layers or overlays. I would like the vMix operator to bring up the desired input in the Preview, then press a shortcut key to transition the input at the Preview to the (in this case) right-side muti-view layer or overlay.

I have a VB.NET script that does this by querying the vMix XML status to see what input is at the Preview. But this is rather complex and hides what is going on when you view the list of shortcuts.

It occurs to me that the fancy XML script would not be needed if there was a variable similar to DynamicInput and DynamicValue that held the input currently at the Preview. Maybe call it InputAtPreview or something. Then the shortcut to make this assignment would be something simple like:
Function=OverlayInput1In&Input=InputAtPreview
or
API.Function("LayerOn", Input:="InputAtPreview", Value:="2")
dmwkr  
#2 Posted : Tuesday, January 3, 2023 9:16:49 PM(UTC)
dmwkr

Rank: Advanced Member

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

Thanks: 62 times
Was thanked: 119 time(s) in 108 post(s)
From the help files:
https://www.vmix.com/help25/DeveloperAPI.html

"Input can be used to specify the Input in one of three ways:

1. By number starting from 1.

0 can be used for Preview and -1 for Active."

Also, when creating a shortcut, one can select "Preview" as input.
VasaA-V  
#3 Posted : Wednesday, January 4, 2023 6:52:42 AM(UTC)
VasaA-V

Rank: Newbie

Groups: Registered
Joined: 12/21/2022(UTC)
Posts: 8
United States
Location: Minnesota

Thanks: 4 times
Dmwkr,
Thanks for the advice. The 0-input value does what I want, sort of.

Let's say we have the following:
Input 4 is an NDI feed
Input 5 is camera A
Input 6 is camera B
Input 7 is a blank input with several layers. One layer is set to position the NDI feed on the left.
Overlay 1 is set/sized to position one of the camera feeds to the right of the NID feed.

Then, when a side by side presentation is desired, you can make Input 7 active and turn on Overlay 1 for one of the camera inputs. But this is a clunky two-step process. To make it smooth, lets define shortcuts or a script.
API.Function("Fade", Input:=7, Duration="600")
API.Function("Overlay1In", Input:="0")
To run this, make one of the cameras the Preview and call the script. But this doesn't work! What gets overlaid is not Input 5 or 6, but Input 7.

But...your post got me thinking. If I swap the function calls, we get what we want.
API.Function("Overlay1In", Input:="0")
API.Function("Fade", Input:=7, Duration="600")
In this case the camera at the preview is the input with the overlay enabled. Yeah.

However, what if we want a delay between the left and right feeds? Then we want the original sequence with a Sleep() command between the two function calls. In this case, I'm back to wanting a variable that indicates the input at the preview.
API.Function("Fade", Input:=7, Duration="600")
Sleep(600)
API.Function("Overlay1In", Input:="InputAtPreview")
dmwkr  
#4 Posted : Wednesday, January 4, 2023 6:50:50 PM(UTC)
dmwkr

Rank: Advanced Member

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

Thanks: 62 times
Was thanked: 119 time(s) in 108 post(s)
I don't really understand the difference between the "0" and your "InputAtPreview". Please bear in mind, that every (regular) transition is performed through Preview, i.e. even if input 7 is not in Preview, when you hit your transition button, vMix will send it to Preview and perform the transition from there. That's why Input 7 is put on Overlay 1. (Actually, the former active input is transitioned out to Preview and might be the one overlayed, depending on the timing of the functions.) The "CutDirect" transition will be performed without the input being send to Preview.
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.