vMix Forums
»
General
»
3rd Party Software and Development
»
Using a Script to Trigger an API command on a second VMIX [SOLVED]
Rank: Advanced Member
Groups: Registered
Joined: 6/16/2015(UTC) Posts: 193 Location: Milton Keynes, UK Thanks: 10 times Was thanked: 53 time(s) in 27 post(s)
|
I have two VMIX systems - and would like to add some triggers to control a second VMIX system through the API
The reason I would like to do this is because I need to send the same show to different markets, with different opening VT sequences, and title overlays.
I see that I can fire 'scripts' through the VMIX trigger systems.
How would I construct a Script that could do and API call to a second VMIX system.
In other words is there a way I can do a HTTP request from either a web or VB.net script?
Best Regards
Keith
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 6/16/2015(UTC) Posts: 193 Location: Milton Keynes, UK Thanks: 10 times Was thanked: 53 time(s) in 27 post(s)
|
OK got a vb.net script working! only issue is how do I trigger it, as there is no way to set a value (in this case name of script) against SciptStart to specify which script I want to run in the triggers setup for a particular input. i.e OnTransitionIn ScriptStart 'name of script'
Code:Dim webStream As Stream
Dim webResponse = ""
Dim req As HttpWebRequest
Dim res As HttpWebResponse
req = CType(WebRequest.Create("http://10.1.2.56:8088/API/?Function=OverlayInput1In&Input=2"), HttpWebRequest)
res = CType(req.GetResponse(), HttpWebResponse)
webStream = res.GetResponseStream() ' Get Response
Dim webStreamReader As New StreamReader(webStream)
While webStreamReader.Peek >= 0
webResponse = webStreamReader.ReadToEnd()
End While
Script is a little bit longer than it needs to be, but added in some stuff so you can actually read the response and error trap if you want. Keith
|
2 users thanked kgoodyer for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 11/17/2020(UTC) Posts: 5 Location: Villach Thanks: 4 times
|
Hi, i use this script to control the PTZ API of my AXIS Camera. e.g.: http://192.168.4.111/axis-cgi/com/ptz.cgi?rpan=-2But there are some functions, than can only be set with logging in at the Camera. Just writing http:// USER:PASSWORT@192.168.4.111/axis-cgi/com/ptz.cgi?rpan=-2 does not work. So is there a possibility to send user and password with a HttpWebRequest?Best, Thomas
|
|
|
|
vMix Forums
»
General
»
3rd Party Software and Development
»
Using a Script to Trigger an API command on a second VMIX [SOLVED]
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.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close