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
mtone  
#1 Posted : Tuesday, August 25, 2020 1:55:28 AM(UTC)
mtone

Rank: Advanced Member

Groups: Registered
Joined: 8/9/2020(UTC)
Posts: 156

Thanks: 3 times
Was thanked: 20 time(s) in 19 post(s)
this is a total novice question but does anyone know how i get this PTZ Zoom working on whatever is in the vMix output window ?

API.Function("PTZZoomIn",Input:="Video1")

when i have "Video1" it works but if i change it to Input:="Active" it doesnt do anything ? I thought the output window was called "Active" but i also tried "Output" and still nothing ?? I also tried Input:="Preview" to see if it worked in the preview window but no luck there either... not sure where im going wrong ??

appreciate any help..
doggy  
#2 Posted : Tuesday, August 25, 2020 2:04:04 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
in your script check which (PTZ)camera is active and put that as your input in the function
mtone  
#3 Posted : Tuesday, August 25, 2020 2:44:58 AM(UTC)
mtone

Rank: Advanced Member

Groups: Registered
Joined: 8/9/2020(UTC)
Posts: 156

Thanks: 3 times
Was thanked: 20 time(s) in 19 post(s)
i dont want the PTZ to only work on one Input source though i want it to work with whatever Input is in the output window..

if i use this web command instead... Function=PTZZoomIn then it will always zoom the Preview window no matter which Input is displayed.. but i cant get it to work for the output..

if i use Function=PTZZoomIn&Input=Active it does nothing ??
doggy  
#4 Posted : Tuesday, August 25, 2020 3:03:08 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: mtone Go to Quoted Post
i dont want the PTZ to only work on one Input source though i want it to work with whatever Input is in the Active window..



an input has to be connected as a (Virtual) PTZ first n order to even respond to a PTZ command
a good idea is to check if it actually works as a shortcut first (thye are the same functions anyway)

and why not use a regular zoom command?
mtone  
#5 Posted : Tuesday, August 25, 2020 3:30:03 AM(UTC)
mtone

Rank: Advanced Member

Groups: Registered
Joined: 8/9/2020(UTC)
Posts: 156

Thanks: 3 times
Was thanked: 20 time(s) in 19 post(s)
it works fine as regular shortcut.. I have zoom in and zoom out mapped to two joystick buttons on the output window and any inputs that are showing in the output window zoom perfectly when i press those buttons..

do you see any problem with this command ?

API.Function("PTZZoomIn",Input:="Active")

Are you allowed to specify "Active" as the input to send the function to the main output window ?
doggy  
#6 Posted : Tuesday, August 25, 2020 3:40:48 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
where is the speed value ? ( check what is needed when you create it as a shortcut)
mtone  
#7 Posted : Tuesday, August 25, 2020 12:59:37 PM(UTC)
mtone

Rank: Advanced Member

Groups: Registered
Joined: 8/9/2020(UTC)
Posts: 156

Thanks: 3 times
Was thanked: 20 time(s) in 19 post(s)
the speed value doesnt matter.. if you leave it out it uses the default setting.. but i have put it in also and it makes no difference..


when i use this command it zooms "Video1" whether it is in the preview or output windows (like you would expect)
API.Function("PTZZoomIn",Input:="Video1")

when i use this to try and specify only zoom for the output window it does nothing..
API.Function("PTZZoomIn",Input:="Active")

If i use this to try and specify zoom for the preview window it also does nothing..
API.Function("PTZZoomIn",Input:="Preview")

however when i use this command it will zoom whatever is showing in preview window.
Function=PTZZoomIn

But then if i use this to try and specify zoom for the output window it again does nothing..
Function=PTZZoomIn&Input=Active



so when i set the command... Function=PTZZoomIn

it works exactly how i would like but its in the preview window whereas i want the zoom to work exclusively on the output window..
dmwkr  
#8 Posted : Tuesday, August 25, 2020 3:16:20 PM(UTC)
dmwkr

Rank: Advanced Member

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

Thanks: 62 times
Was thanked: 130 time(s) in 118 post(s)
Does it work if you use 0 for preview and -1 for active?

https://www.vmix.com/help23/DeveloperAPI.html
thanks 1 user thanked dmwkr for this useful post.
mtone on 8/25/2020(UTC)
mtone  
#9 Posted : Tuesday, August 25, 2020 4:52:19 PM(UTC)
mtone

Rank: Advanced Member

Groups: Registered
Joined: 8/9/2020(UTC)
Posts: 156

Thanks: 3 times
Was thanked: 20 time(s) in 19 post(s)
Originally Posted by: dmwkr Go to Quoted Post
Does it work if you use 0 for preview and -1 for active?

https://www.vmix.com/help23/DeveloperAPI.html


Awesome, that works! thank you.. i had been getting nowhere for hours.

I actually skimmed over that page of the user guide a week or two ago but totally missed the 0 and -1 settings. so thanks for letting me know... :)
Users browsing this topic
Guest (2)
Similar Topics
Goal Scripting question (General Discussion)
by Salleman 3/21/2023 10:01:15 PM(UTC)
Quick Scripting Question (General Discussion)
by gmillward 4/1/2021 5:55:14 AM(UTC)
Vmix Call Scripting Question (vMix Call)
by Chris Daum 2/10/2021 7:52:36 PM(UTC)
Very Easy Scripting Question - Text removal! (3rd Party Software and Development)
by mcook75 12/9/2020 8:19:43 PM(UTC)
vMix'AMCP Scripting Question (General Discussion)
by TFMG 6/22/2018 7:53:45 AM(UTC)
PTZ scripting question (General Discussion)
by julianlee 3/10/2017 6:42:45 AM(UTC)
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.