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
pastorjim  
#1 Posted : Monday, August 30, 2021 8:43:23 AM(UTC)
pastorjim

Rank: Newbie

Groups: Registered
Joined: 8/30/2021(UTC)
Posts: 4
United States

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
doggy  
#2 Posted : Monday, August 30, 2021 4:46:48 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 288 times
Was thanked: 947 time(s) in 782 post(s)
Originally Posted by: pastorjim Go to Quoted Post

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)
pastorjim  
#3 Posted : Tuesday, August 31, 2021 1:54:44 AM(UTC)
pastorjim

Rank: Newbie

Groups: Registered
Joined: 8/30/2021(UTC)
Posts: 4
United States

Thanks: 1 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: pastorjim Go to Quoted Post

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!
stigaard  
#4 Posted : Tuesday, August 31, 2021 6:21:00 AM(UTC)
stigaard

Rank: Advanced Member

Groups: Registered
Joined: 5/20/2015(UTC)
Posts: 493
Man
Denmark
Location: Copenhagen, Denmark

Thanks: 383 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
thanks 3 users thanked stigaard for this useful post.
doggy on 8/31/2021(UTC), pastorjim on 8/31/2021(UTC), studiodelta on 12/11/2022(UTC)
pastorjim  
#5 Posted : Tuesday, August 31, 2021 9:15:59 AM(UTC)
pastorjim

Rank: Newbie

Groups: Registered
Joined: 8/30/2021(UTC)
Posts: 4
United States

Thanks: 1 times
Thank you very much!
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.