0

Video stream

Good day.

There is a need to improve the configuration file for BrightSign 4K, and later for XT1143. It is necessary to capture video and audio stream from the HDMI IN port and transfer it to the address of the broadcast server in the local network, which subsequently broadcasts to various devices.

Unfortunately, I never managed to force the player to decode the image to a lower resolution, as well as capture and transmit the audio track. If anyone knows and can help, I will be very grateful!

Thank!

autorun.brs:

Sub Main() as Void

reg = CreateObject("roRegistrySection", "networking")

reg.write("ssh","22")

nc=CreateObject("roNetworkConfiguration", 0)

nc.SetIP4Address("192.168.101.10")

nc.SetIP4Netmask("255.255.255.0")

nc.SetIP4Broadcast("192.168.101.255")

nc.SetIP4Gateway("192.168.101.1")

nc.SetLoginPassword("master")

nc.Apply()

print "SSH enabled";

 

m = CreateObject("roMediaStreamer")

m.SetPipeline("hdmi:, encoder:vformat=720p50, udp://210.123.1.1:1234")

m.Start()

 

EnableZoneSupport(true)

v = CreateObject("roVideoPlayer")

i = CreateObject("roVideoInput")

vm = CreateObject("roVideoMode")

vm.SetMode("1024x768x60p")

 

r = CreateObject("roRectangle", 0, 0, 1024, 768)

v.SetRectangle(r)

v.SetViewMode(2)

 

v.ToFront()

v.PlayFile(i)

 

mp = CreateObject("roMessagePort")

While true

                ev = mp.WaitMessage(0)

                if type(ev) = "roHdmiInputChanged" then

                               aa = vm.GetHdmiInputStatus()

                               if type(aa) = "roAssociativeArray" then

                                               print "GetHdmiInputStatus=";aa

                                               if aa.device_present then

                                                               m.Start()

                                               end if

                               else

                                               m.Reset()

                               end if

                end if

End while

End Sub

0 comments

Please sign in to leave a comment.