How to send data to CasparCG?

  1. Make sure you have prepared a Flash template to be used in CasparCG.
  2. First load the template in CasparCG using the following command (SCOREBOARD is a CasparCG template name):
    CG 1-20 ADD 1 "SCOREBOARD" 1
  3. Choose “Caspar CG API” output option in Scoreboard OCR
  4. 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.
  5. Enter CasparCG connection details:
    host:port/channel/layer/flash_layer
    localhost:5250/1/20/1
  6. 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

  1. Download and extract templates.rar in CasparCG templates folder
  2. Load the template in CasparCG using this command:
    CG 1-20 ADD 1 "test3" 1
  3. Create field “Team1Aces” in Scoreboard OCR and add some digits
  4. 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

  1. Use HTML producer in CasparCG
  2. Use the following field names:
    1. gameClock
    2. shotClock
    3. t1Score
    4. t2Score

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>