vMix Forums
»
General
»
General Discussion
»
Sending TCP commands to remote computer via trigger or script
Rank: Newbie
Groups: Registered
Joined: 8/30/2021(UTC) Posts: 4 Thanks: 1 times
|
We are using VMix to stream our church services to Youtube and Facebook as well as our FM radio station.
The VMix computer and our radio automation computer clocks are synchronized.
Starting the feed to our radio automation machine is no problem.
However, since the service doesn't end at exactly the same time each week, I need a way to do the following:
When an "end credits" input starts (TransitionIn) in VMix, I need the VMix computer to send a command over our local network to a private ip address (our radio automation computer) on a user-defined TCP port that will trigger a process on that machine to play an audio "end credits" CART.
The text string I need to send over TCP is "Cart mF02" (without the quotes).
How can I get VMix to send a text string over TCP in response to a trigger?
Thank you!
Jim
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,223 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: pastorjim How can I get VMix to send a text string over TCP in response to a trigger?
Trigger calls script (ScriptStart), script does TCP send (vb.net)
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 8/30/2021(UTC) Posts: 4 Thanks: 1 times
|
Originally Posted by: doggy Originally Posted by: pastorjim How can I get VMix to send a text string over TCP in response to a trigger?
Trigger calls script (ScriptStart), script does TCP send (vb.net) I really appreciate the help. I've done some powershell scripting, but no vb.net. Could you give me an example of what the vb.net code would look like to accomplish this task: Send the text: Cart mF02 To the IP address: 192.168.128.102 Port: 5233 Thank you!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 5/20/2015(UTC) Posts: 493 Location: Copenhagen, Denmark Thanks: 389 times Was thanked: 100 time(s) in 79 post(s)
|
Try something like this... Code:' Message
Dim message as String = "Cart mF02"
' Client TCP socket
Dim client As New System.Net.Sockets.TcpClient("192.168.128.102", 5233)
' Get a client stream for reading and writing.
Dim stream As System.Net.Sockets.NetworkStream = client.GetStream()
If stream.CanWrite Then
Console.WriteLine("Can write to socket")
' Translate the passed message into ASCII and store it as a Byte array.
Dim data As [Byte]() = System.Text.Encoding.ASCII.GetBytes(message)
' Send the message to the connected TcpServer
stream.Write(data, 0, data.Length)
Console.WriteLine("Sent message to socket:")
Console.WriteLine(message)
Else
Console.WriteLine("Sorry. You cannot write to this NetworkStream.")
End If
|
3 users thanked stigaard for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 8/30/2021(UTC) Posts: 4 Thanks: 1 times
|
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Sending TCP commands to remote computer via trigger or script
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