CasparCG Basics

I will here try to do a short tutorial that should answer the most common questions for someone new to CasparCG

We are as example using win10-PC, nvidia GPU, and a Decklink Duo2-SDI-card. This is probably the most common CasparCG-setup. Often the PC is of HP Z-series.

When you want to begin using CasparCG the first thing is to download CasparCG Server and Client


CasparCG requires now Microsoft Visual C++ Redistributable for Visual Studio 2019
Other configuration tips can be found at
https://github.com/CasparCG/help/wiki/Server%3A-System-Requirements (there are some outdated info)

the next step is to configure your CasparCG server Outputs
We are configure BlackMagicDesign Decklink Duo2 to use

  • 1 channel with key+fill (Graphics)
  • 1 Channel with fill (100% video)
  • 1 input channel
    First you have to configure your Duo2 in Desktop video setup
    In the first Duo2-channel you separate the connectors “SDI 1” & “SDI 2”
    In the second Duo2-channel you keep the connectors “SDI 3 & SDI 4” together
    In the third Duo2-channel you should see as connector “SDI 2”
    In the fourth Duo2-channel you should see as connector “none”
    In this setup the second and third BNC will work separately and the fourth and fifth will be combine together to output synchronized key&fill (first BNC = ref)

Next to do is to changes in the “casparcg.config”-file
This example makes BNC1=REF, BNC2=INPUT, BNC3=Channel 2 FILL-OUT, BNC4=Channel 1 KEY-OUT and BNC5=Channel1 FILL-OUT


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <log-level>info</log-level>
  <paths>	<!-- Here we define all the paths to various resources the Server would need to access -->
    <media-path>D:\_media</media-path>
    <log-path>log/</log-path>
    <data-path>data/</data-path>
    <font-path>D:\_font</font-path>
    <template-path>D:\_template</template-path>
  </paths>
  <lock-clear-phrase>secret</lock-clear-phrase>
  <channels>	 <!-- Here we configure all the channels that CasparCG will run -->
     <channel> <!-- You can have multiple <channel>'s.  This would be channel number 1 -->
		<video-mode>1080i5000</video-mode>
		<straight-alpha-output>false</straight-alpha-output>
	<consumers> <!-- Consumers are the ouputs for the channel, you can only have one for each channel, but it can include multiple child-elements -->
		<ndi> <!-- NDI Consumer -->
                	<name>CasparCG 1</name>
               	 	<allow-fields>false [true|false]</allow-fields>
            	</ndi>
		<decklink> <!-- Decklink Consumer -->
			<device>2</device>  <!-- Decklink channel, in this case BNC 3 -->
			<embedded-audio>true</embedded-audio>
			<channel-layout>stereo</channel-layout>
			<latency>normal</latency>
			<keyer>external</keyer>
			<key-only>false</key-only>
			<buffer-depth>3</buffer-depth>
			<custom-allocator>true</custom-allocator>
		</decklink>  
 		<system-audio> <!-- Audio Consumer out to PC default audio device -->
                	<channel-layout>stereo</channel-layout>
                	<latency>200</latency>
            	</system-audio>
 		<screen> <!-- Screen consumer to output on PC-screen -->
                	<device>1</device>
                	<aspect-ratio>default</aspect-ratio>
                	<stretch>fill</stretch>
                	<windowed>true</windowed>
                	<key-only>false</key-only>
                	<vsync>false</vsync>
                	<borderless>false</borderless>
                	<interactive>true</interactive>
                	<always-on-top>false</always-on-top>
                	<x>1520</x>
                	<y>100</y>
                	<width>384</width>
                	<height>216</height>
                	<sbs-key>false</sbs-key>
                	<colour-space>RGB</colour-space>
            	</screen>          
	</consumers>
    </channel> <!-- CHANNEL 1 END -->
    <channel><!-- CHANNEL 2 -->
		<video-mode>1080i5000</video-mode>
		<straight-alpha-output>false</straight-alpha-output>
	<consumers>
 		<ndi>
                	<name>CasparCG 2</name>
                	<allow-fields>false</allow-fields>
            	</ndi>
		<decklink>
			<device>3</device>
			<embedded-audio>true</embedded-audio>
			<channel-layout>stereo</channel-layout>
			<latency>normal</latency>
			<keyer>default</keyer>
			<key-only>false</key-only>
			<buffer-depth>3</buffer-depth>
			<custom-allocator>true</custom-allocator>
		</decklink>
		<screen>
                	<device>1</device>
                	<aspect-ratio>default</aspect-ratio>
                	<stretch>fill</stretch>
                	<windowed>true</windowed>
                	<key-only>false</key-only>
                	<vsync>false</vsync>
                	<borderless>false</borderless>
                	<interactive>true</interactive>
                	<always-on-top>false</always-on-top>
                	<x>1520</x>
                	<y>350</y>
                	<width>384</width>
                	<height>216</height>
                	<sbs-key>false</sbs-key>
                	<colour-space>RGB</colour-space>
            	</screen>  
 		<system-audio>
                	<channel-layout>stereo</channel-layout>
                	<latency>200</latency>
            	</system-audio>
	</consumers>
    </channel>	<!-- CHANNEL 2 END -->
    </channels>	<!-- ALL CHANNELS END -->
<controllers>
    	<tcp>
      		<port>5250</port>
      		<protocol>AMCP</protocol>
    	</tcp>
</controllers>
<amcp>
    	<media-server>
      		<host>localhost</host>
      		<port>8000</port>
    	</media-server>
</amcp>
<flash>
    	<buffer-depth>auto</buffer-depth>
    	<enabled>true</enabled>
</flash>
<html>
    	<remote-debugging-port>0</remote-debugging-port>
    	<enable-gpu>false</enable-gpu>
</html>
<ffmpeg>
    	<producer>
      		<auto-deinterlace>interlaced</auto-deinterlace>
      		<threads>4</threads>
    	</producer>
</ffmpeg>
<ndi>
    	<auto-load>true</auto-load>
</ndi>
<osc>
    	<default-port>6250</default-port>
    	<disable-send-to-amcp-clients>false</disable-send-to-amcp-clients>
    	<predefined-clients />
</osc>
</configuration>

Here can you find a thorough explainer about the config-file

More information can be found in the CasparCG wiki

For making html-templates for CasparCG you can this as a guide
https://chrisryanouellette.gitbook.io/casparcg-html-template-guide/

3 Likes