How to send data to CasparCG?
- Make sure you have prepared a Flash template to be used in CasparCG.
- First load the template in CasparCG using the following command (SCOREBOARD is a CasparCG template name):
CG 1-20 ADD 1 "SCOREBOARD" 1
- Choose “Caspar CG API” output option in Scoreboard OCR
- Check “Send once per second” if you are using more than one CasparCG template (because hiding template also clears field values). This functionality will force output at least once a second even if digits have not changed.
- Enter CasparCG connection details:
host:port/channel/layer/flash_layer
localhost:5250/1/20/1
- Use the same field names in Scoreboard OCR that are defined in CasparCG template. For example, If there is a field “ScoreHome” defined in CasparCG, use the same name in Scoreboard OCR.
Scoreboard OCR will send the following commands to CasparCG:
CG 1-20 UPDATE 1 "<templateData><componentData id=\"ScoreHome\"><data id=\"text\" value=\"3:47\"/></componentData></templateData>"
Here is a test Flash template that you can play around with
- Download and extract templates.rar in CasparCG templates folder
- Load the template in CasparCG using this command:
CG 1-20 ADD 1 "test3" 1
- Create field “Team1Aces” in Scoreboard OCR and add some digits
- You should be able to see the data coming from Scoreboard OCR to CasparCG
Here is a test HTML template that you can play around with
- Use HTML producer in CasparCG
- Use the following field names:
- gameClock
- shotClock
- t1Score
- t2Score
Minimizing the latency on Decklink output
Make the following changes to your CasparCG conf file
<decklink> <device>1</device> <embedded-audio>false</embedded-audio> <!-- 1 frame faster --> <latency>low</latency> <!-- fastest --> <keyer>external</keyer> <key-only>false</key-only> <buffer-depth>1</buffer-depth> <!—fastest --> <custom-allocator>true</custom-allocator> </decklink>