vMix Forums
»
General
»
Feature Requests
»
Implementing json string to title
Rank: Member
Groups: Registered
Joined: 9/24/2017(UTC) Posts: 11 Location: Willich Thanks: 2 times
|
Hi. I'm searching for somebody who can explain me how to import a json string with running time and faults (horse sports) in a title.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,218 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
have you checked datasources ?
|
|
|
|
Rank: Member
Groups: Registered
Joined: 9/24/2017(UTC) Posts: 11 Location: Willich Thanks: 2 times
|
doggy wrote:have you checked datasources ? Yes, I did. But it's not working.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,218 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Make sure your JSON file has the correct structure for vMix Datasources
from the help file:"This supports JSON data that is stored as an object array. Each element in the array will be treated as a row."
Unless you are displaying your running clock in full seconds increments and even then i doubt you will be able to show a nice running time in your title this way, to many steps involved to get the data to the title imo.
we do similar stuff by reading the clock with an external app that sends the running time by means of a httprequest to the title, manage 0.1 of a second displaying this way In fact many timers do not even send a running time but a startsignal and a stop signal with the end time hence we usually let it trigger an in app 'fake' clock for display effect purposes and at finish display the real final time receive by the official clock.
if that is not possible we aim a camera at the clock and overlay it
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 9/24/2017(UTC) Posts: 11 Location: Willich Thanks: 2 times
|
doggy wrote:Make sure your JSON file has the correct structure for vMix Datasources
from the help file:"This supports JSON data that is stored as an object array. Each element in the array will be treated as a row."
Unless you are displaying your running clock in full seconds increments and even then i doubt you will be able to show a nice running time in your title this way, to many steps involved to get the data to the title imo.
we do similar stuff by reading the clock with an external app that sends the running time by means of a httprequest to the title, manage 0.1 of a second displaying this way In fact many timers do not even send a running time but a startsignal and a stop signal with the end time hence we usually let it trigger an in app 'fake' clock for display effect purposes and at finish display the real final time receive by the official clock.
if that is not possible we aim a camera at the clock and overlay it What is the right JSON structure? Do you have a sample?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,218 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
like this works; Quote: [ { "FIELD1": 1, "FIELD2": "Patrick ", "FIELD3": "Maybe", "FIELD4": "NLD", "FIELD5": "Sheepdog", "FIELD6": "" }, { "FIELD1": 2, "FIELD2": "Masanori", "FIELD3": "Hannna", "FIELD4": "JPN", "FIELD5": "Corgi ", "FIELD6": "" } ]
|
|
|
|
Rank: Member
Groups: Registered
Joined: 9/24/2017(UTC) Posts: 11 Location: Willich Thanks: 2 times
|
Thanks. My JSON-string out of our software looks like this: [{ "Starter": { "KNR": "1", "Nation": "GER", "Reiter": "Feldmann,Clarissa", "Pferd": "Capistrano K" }, "Timing": { "Fehler": 0, "FehlerTotal": 3.75, "Zeit": 24.00, "ZeitTotal": 24.00, "Umlauf": 1, "Erstellt": 35427460, "Status": "Läuft"} }]
Protocol specification Typ: UDP Port: 29001 Format: JSON Character set: UTF8 Interval: updated while time is running (every second) Sample of „settings“ informations After each rider or in case the timekeeper reset the system a JSON string is sent with the main settings of the competition. { „TimingSettings“: { „CountDown“: 45, „Tenth“: false, „Decimal“: 2, „TimeAllowed“: 76, „Judgement“: „rvFehlerZeit“ } } Sample of „time keeping“ informations These are the data of the current loaded rider and the running time. The current state is indicated by the field „Status“. To reduce the amount of transmitted data field with a zero value are not transmitted e.g. faults (Fehler). { „Starter“: { „KNR“: „14“, „Nation“: „POR“, „Reiter“: „Mario Wilson Fernandes“, „Pferd“: „Kannan Kopf“ }, „Timing“: { „Fehler“: 4, „FehlerTotal“: 4, „Zeit“: 35.0, „ZeitTotal“: 35.06, „Umlauf“: 1, „Erstellt“: 4776, „Status“: „Läuft“ } } The field „Erstellt“ contains a increasing integer. This integer is increased by one for each JSON string. If the receiver get a JSON string with a „Erstellt“ value lower then the one before, the JSON string should be dropped and not used. Possible states („Status“) are: „Läuft“ Time is running an the rider is i the course „Gestoppt“ Time is paused by the judges „ImZiel“ Rider finished the round, the given time is the final time „Countdown“ The countdown is running „CountdownStop“ The countdown is paused by the judges Be aware the the „Läuft“ status contains the german „ä“ in UTF8.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,218 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Not familiar with the intricates of JSON files but there seem to be quite a few online json formatters and validators if one does an effort !!!! and it appears your data has plenty of syntax errors as posted (for one the quotes, due to copying ?) these can be read in vMix Quote: [ { "TimingSettings": { "CountDown": 45, "Tenth": false, "Decimal": 2, "TimeAllowed": 76, "Judgement": "rvFehlerZeit" } } ]
Quote:
[ { "Starter": { "KNR": "14", "Nation": "POR", "Reiter": "Mario Wilson Fernandes", "Pferd": "Kannan Kopf" }, "Timing": { "Fehler": 4, "FehlerTotal": 4, "Zeit": 35.0, "ZeitTotal": 35.06, "Umlauf": 1, "Erstellt": 4776, "Status": "Läuft" } } ]
when it comes ; My JSON-string out of our software looks like this: { "Starter": { "KNR": "1", "Nation": "GER", "Reiter": "Feldmann,Clarissa", "Pferd": "Capistrano K" }, "Timing": { "Fehler": 0, "FehlerTotal": 3.75, "Zeit": 24.00, "ZeitTotal": 24.00, "Umlauf": 1, "Erstellt": 35427460, "Status": "Läuft"} } it seems to be missing the [ ... ] before and after to work correctly
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,218 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Can ADMIN move this topic to General Discussion as this is not a feature request please ;-)
|
|
|
|
Rank: Member
Groups: Registered
Joined: 9/24/2017(UTC) Posts: 11 Location: Willich Thanks: 2 times
|
it seems to be missing the [ ... ] before and after to work correctly
No, there are here :-)
It's now working, but is it possible to get the JSON-string via UDP? Now I'm writing the JSON-string into data.txt and that source I get every second. The problem what we have with out structure is, that the string is sent all over the network, cause there are many clients which needs that. So it's not e.g. 192.168.0.111 but 192.168.0.255. How can I handle that?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,218 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Quote:No, there are here :-) not in your post !
|
|
|
|
Rank: Member
Groups: Registered
Joined: 9/24/2017(UTC) Posts: 11 Location: Willich Thanks: 2 times
|
It's now working, but is it possible to get the JSON-string via UDP? Now I'm writing the JSON-string into data.txt and that source I get every second. The problem what we have with out structure is, that the string is sent all over the network, cause there are many clients which needs that. So it's not e.g. 192.168.0.111 but 192.168.0.255. How can I handle that?
|
|
|
|
vMix Forums
»
General
»
Feature Requests
»
Implementing json string to title
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