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
Oaktown  
#1 Posted : Friday, September 1, 2017 10:34:00 AM(UTC)
Oaktown

Rank: Member

Groups: Registered
Joined: 9/1/2017(UTC)
Posts: 16
Location: Oakland, CA

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Is there a way to control a virtual display like a PTZ camera by programming a joystick to control Pan X, Pan Y & Zoom?

I would like to use a 4K camera for a wide shot at an event and use a couple of virtual display as Cam 1 and Cam 2 but I want to be able to adjust the setting quickly without having to open the menu.

It would also be great if there was a way to limit the Pan X, Pan Y & Zoom to stay in the frame.
mjgraves  
#2 Posted : Saturday, September 2, 2017 5:01:34 PM(UTC)
mjgraves

Rank: Advanced Member

Groups: Registered
Joined: 7/1/2015(UTC)
Posts: 1,150
Man
United States
Location: Houston TX

Thanks: 319 times
Was thanked: 263 time(s) in 233 post(s)
Yes. This has been discussed quite a lot recently.

You can zoom, crop, reposition to create multiple, virtual shots based upon the 4K source. Then use the "Merge" transition to move between them as if each was a PTZ preset.

To do this yo must have a vMix 4K license, since you're using a 4K source.

It helps to be mindful of when you're zoom is going beyond 1:1 pixel resolution. That is, with a 4K source you can zoom in about 3.2x and still deliver 720p output resolution. If your output resolution is 1080p you can only zoom in about 2.1x.

Zooming in further and you're effectively doing a digital zoom, so the output quality will start to suffer.

As a practical matter, the video is being processed by any kind of zoom/crop/repo, so the process is not completely transparent.

This take me back about 20 years to when I worked for a company that sold Questech's Chrisma, high-end DVE systems. Once the video has been handled, in any way, there will filtering involved that causes some loss of quality.
SHMD  
#3 Posted : Saturday, September 2, 2017 10:39:16 PM(UTC)
SHMD

Rank: Advanced Member

Groups: Registered
Joined: 10/1/2016(UTC)
Posts: 117
Canada

Thanks: 88 times
Was thanked: 52 time(s) in 31 post(s)
We have one or two 4K inputs on most projects and do the pan and zoom on our ipad pro running touchOSC interface programmed for midi control in vMix. Here is a screen shot of the controller we created with x,y, zoom control and reset for what ever is in the queue/monitor window. Who ever is switching can make video image changes lightning fast. This is all done with midi short cuts and activators.
SHMD attached the following image(s):
IMG_0378.PNG (412kb) downloaded 73 time(s).

You cannot view/download attachments. Try to login or register.
Oaktown  
#4 Posted : Tuesday, September 12, 2017 11:59:12 AM(UTC)
Oaktown

Rank: Member

Groups: Registered
Joined: 9/1/2017(UTC)
Posts: 16
Location: Oakland, CA

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
SHMD wrote:
We have one or two 4K inputs on most projects and do the pan and zoom on our ipad pro running touchOSC interface programmed for midi control in vMix. Here is a screen shot of the controller we created with x,y, zoom control and reset for what ever is in the queue/monitor window. Who ever is switching can make video image changes lightning fast. This is all done with midi short cuts and activators.
But you're using PTZ cams, right?

mjgraves wrote:
You can zoom, crop, reposition to create multiple, virtual shots based upon the 4K source. Then use the "Merge" transition to move between them as if each was a PTZ preset.
Yes but this is still going from preset to preset. What I'm looking for is the abillity to adjust the Pan X/Y and Zoom of my virtual display live usign an XK-12 joystick so that it looks like there is an operator or it's a PTZ camera but using a wide shot on a 4K in an HD comp.
mjgraves  
#5 Posted : Wednesday, September 13, 2017 11:06:40 AM(UTC)
mjgraves

Rank: Advanced Member

Groups: Registered
Joined: 7/1/2015(UTC)
Posts: 1,150
Man
United States
Location: Houston TX

Thanks: 319 times
Was thanked: 263 time(s) in 233 post(s)
Oaktown wrote:
mjgraves wrote:
You can zoom, crop, reposition to create multiple, virtual shots based upon the 4K source. Then use the "Merge" transition to move between them as if each was a PTZ preset.
Yes but this is still going from preset to preset. What I'm looking for is the abillity to adjust the Pan X/Y and Zoom of my virtual display live usign an XK-12 joystick so that it looks like there is an operator or it's a PTZ camera but using a wide shot on a 4K in an HD comp.


If your version of vMix supports PTZ you can adjust a shot on-the-fly using the PTZ controls. I presume that these are exposed to a controller (joystick, buttons, etc) but have never had to do that.

I note that vMix even supports UVC PTZ commands, which is what lesser PTZ cameras use. The Logitech PTZ Pro, a USB conferencing camera, for example.
Oaktown  
#6 Posted : Wednesday, September 13, 2017 3:54:55 PM(UTC)
Oaktown

Rank: Member

Groups: Registered
Joined: 9/1/2017(UTC)
Posts: 16
Location: Oakland, CA

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
mjgraves wrote:
Oaktown wrote:
mjgraves wrote:
You can zoom, crop, reposition to create multiple, virtual shots based upon the 4K source. Then use the "Merge" transition to move between them as if each was a PTZ preset.
Yes but this is still going from preset to preset. What I'm looking for is the abillity to adjust the Pan X/Y and Zoom of my virtual display live usign an XK-12 joystick so that it looks like there is an operator or it's a PTZ camera but using a wide shot on a 4K in an HD comp.


If your version of vMix supports PTZ you can adjust a shot on-the-fly using the PTZ controls. I presume that these are exposed to a controller (joystick, buttons, etc) but have never had to do that.

I note that vMix even supports UVC PTZ commands, which is what lesser PTZ cameras use. The Logitech PTZ Pro, a USB conferencing camera, for example.


If you read my original post, I want to be able to control the Pan X, Pan Y & Zoom of a virtual display like I would a PTZ camera. The idea is that is that I don't want to use a PTZ camera. I want to use a 4K camera set to a wide shot of the event and have access to a virtual display that I can control like a PTZ camera by moving a frame inside of my 4K input.

Right now, I can setup multiple virtual displays from the 4K input but I have to go from one to the next to change shots and if I want to change the framking, i have to change the preset or add a new virtual display.

mjgraves  
#7 Posted : Wednesday, September 13, 2017 4:09:44 PM(UTC)
mjgraves

Rank: Advanced Member

Groups: Registered
Joined: 7/1/2015(UTC)
Posts: 1,150
Man
United States
Location: Houston TX

Thanks: 319 times
Was thanked: 263 time(s) in 233 post(s)
PTZ controls do something specific. PTZ instructions are relayed by vMix to source device, where they cause some result.

What you ask is dynamic control of the source attributes (XYZ & cropping) within vMix. That's not the same as traditional PTZ. Admittedly, the results may look similar.

It's unclear to me if you can use a joystick to dynamically control the XYZ attributes of a source. You can certainly do this using the vMix UI when you have the source settings open.
sinc747  
#8 Posted : Wednesday, September 13, 2017 5:17:46 PM(UTC)
sinc747

Rank: Advanced Member

Groups: Registered
Joined: 8/2/2013(UTC)
Posts: 1,018
Man
United States
Location: Fairhope, Alabama USA

Thanks: 540 times
Was thanked: 194 time(s) in 160 post(s)
Try using a Blank Virtual Set input and setting the 4K camera source as Layer 1. Then edit the four different camera shots to show the four "PTZ presets" and it will pan smoothly from one to the next.

- Tom
Oaktown  
#9 Posted : Friday, September 15, 2017 8:20:30 AM(UTC)
Oaktown

Rank: Member

Groups: Registered
Joined: 9/1/2017(UTC)
Posts: 16
Location: Oakland, CA

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Quote:
PTZ controls do something specific. PTZ instructions are relayed by vMix to source device, where they cause some result.
I understand that which is I titled the post "Using Virtual Display like a PTZ camera" since Pan is Pan X, Tilt is Pan Y and Zoom is Zoom in the advanced output position settings.

Quote:
Try using a Blank Virtual Set input and setting the 4K camera source as Layer 1. Then edit the four different camera shots to show the four "PTZ presets" and it will pan smoothly from one to the next.

- Tom
Thanks Tom, I'm trying to not use presets.



I guess let me try to reframe what I want/need. I would like the ability to map shortcuts to the following parameters:

- Zoom In
- Zoom Out
- Pan X Right
- Pan X Left
- Pan Y Up
- Pan Y Down

Ideally these would be mapped to a X-keys XK-12 using the USB joystick with X, Y, and Z axis (twist for Z)

I would also like the ability to set min/max limits to these parameters so that I can safely keep my frame within the composition.

If all this was available, one would be able to turn a 4K (or more) camera into a virtual PTZ (P & T would of course be limited in motion to the boundaries of the original frame).


madness  
#10 Posted : Friday, September 15, 2017 8:58:10 PM(UTC)
madness

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2013(UTC)
Posts: 406
Man
Location: Iowa

Thanks: 281 times
Was thanked: 32 time(s) in 29 post(s)
I have a PTZ camera that is not controlled by the PTZ capabilities in the vMix 4K. However, I am experienced in writing macros, and have done so with this camera in AutoHotkey. I use the TCP/IP capability of AutoHotkey to control as if auk were a web browser, and control the camera via the numpad on the keyboard. If you have scripting (4K and Pro editions) then you can actually call out these scripts. with vb.net scripting.

https://www.dotnetperls.com/process-vbnet
thanks 1 user thanked madness for this useful post.
mjgraves on 9/15/2017(UTC)
madness  
#11 Posted : Monday, September 18, 2017 8:50:10 PM(UTC)
madness

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2013(UTC)
Posts: 406
Man
Location: Iowa

Thanks: 281 times
Was thanked: 32 time(s) in 29 post(s)
I've been trying to figure out how to do this directly in VB.net, but cannot seem to get it sussed.

My current configuration is creating a script in vMix with the following code that launches my AHK script.

Code:
Process.Start("C:\Users\jeff_\Desktop\PTZ\Amcrest PTZ Preset 1.ahk")


The AHK script then runs the following code.

Code:
#SingleInstance, Force
    HttpGet("http://username:password@xxx.xxx.xxx.xxx/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=1&arg3=0")    
return

HttpGet(URL) {
	static req := ComObjCreate("Msxml2.XMLHTTP")
	req.open("GET", URL, false)
	req.send()
}


Anyone here good at converting this to VB.net code?

Whenever I try to use the VB code, I get a return of 401 unauthorized.
madness  
#12 Posted : Monday, September 18, 2017 9:46:39 PM(UTC)
madness

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2013(UTC)
Posts: 406
Man
Location: Iowa

Thanks: 281 times
Was thanked: 32 time(s) in 29 post(s)
So after some further research, I did find how to do it and make it work in vMix via vb.net...

The following code is used for the Amcrest IP2M841B PTZ camera, and is commanding it to use Preset 1 position.

Code:
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://xxx.xxx.xxx.xxx/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=1&arg3=0")

' NB! Use the following line ONLY if the website is protected
request.Credentials = New System.Net.NetworkCredential("username", "password")

' Call the remote site, and parse the data in a response object
Dim response As System.Net.HttpWebResponse = request.GetResponse()
Users browsing this topic
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.