Getting data from XML database and updating textfields live (dynamic text)


#1

Hey guys, new here.

Have been looking at pushing data from a database to a .ft textfield and updating it live.

Is this at all possible do get live data through to caspercg and what frequency does casperccg support. Has anyone pushed the limits here?

Have seen some pointers to XML but not pushing out data live from lets say a client.


#2

It is possible for sure. There are several ways of doing it. You can do a Flash template, that uses, for instance, a timer to pool the datasource. You could do a similar approach in HTML and JavaScript. Or you could write a custom client that updates the template from time to time.

Doing it directly in Flash/ActionScript or HTML/JavaScript is good, when you don‘t have a user interface for an operator. The second way, using a custom client is good, if you want the operator to see the data. I use this for clocks in sports, were the time is also shown in the UI.

What is your use case?


#3

Thx for the reply,

looking into e-sports. I also think the client way to do it would give me more options to what i want to do with the data. I can push it several places.

Any ideas on updaterate in caspar? Could i push data every 10 ms or 1 ms? Would this create a bottleneck?


#4

I have only tried it with 1 second updates. Keep in mind, that the frame rate in Europe 25/50 corresponds to 40ms. Humans are able to see about 10 frames per second as different frames, so everything bellow 100ms is a waste of resources anyway.


#5

Indeed! was actually thinking about this yesterday, you dont need to push data to fast through.


#6

Testet the AMCP Clear command at 100ms intervals. Seems to run, are there any heartbeat solutions yet?


#7

There is a VERSION command, that you can use for that. It gives back the servers version and as soon as the connection is lost, you get nothing back. I do live shows, that run many hours, without any heat beat, and never had any failure, as the server is very stable.


#8

Also the same here using the Update command once per second with no issues to a html template


#9

Yeah, i tried down to .1 sec and it worked fine. Without limitations in my .py script i got a overflow error. Reading in the sourcecode for the AMCP it says that exceeding 128 commands in the AMCP que and the overflow error is raised. In FPS games the amount of data is pretty big, have some concerns about raising the overflow error.
I guess the CG UPDATE command must be sent for every dynamic text in the Template? Dont know if there are any workarounds here


#10

Well you can send all the textfield updates in one command (im sending about 60 - 80 data points per command) you could also look at nodeCG which I believe was built for use with OBS from E-sport point of view?


#11

Ohh, all in one long string then? Will check out nodeCG🙂


#12

You should use websockets in the template itself for receiving the data.


#13

Yes so you send xml or json updates with each fieldname and value in one go


#14

Could You explain how it is possible to communicate via websocket in the JavaScript please?


#15

Tonnes of tutorials on websockets on the internet.


#16

Aaah. I misunderstood…:frowning:
I though, that adibub needed to communicate between his (probably .NET) application as client and CasparCG server.