Automatically play a file [html] at CasparCG start up

We have a number of CasparCG server 2.1.0 machines which sit there and happily play a html url.

We have to restart the machines periodically, but pasting in the play command / URLs for each machine is painful. For example:

play 1-100 [html] http://prod.overlays.verylongurl

Is there some way I can set a default play location (or file) when CasparCG server starts up?


You could quickly write a client that only does that. Fire it up and it sends commands to multiple servers and exits

IIRC you can do it in the NRK fork:

It’s a PLAY command so you would have something like:
<producer id="0">[html] https://longurl</producer>

1 Like

There’s also this launcher which has the ability to execute commands on startup. If you use server 2.1 you can get rid of the scanner.

1 Like

I take screenshots when interesting conversations appears. I remember the topic … “how to run a video when i restart the server”. The proposed answer was some lines about the “producer” tag into the caspar.config file. I do not know if the new server version support this instructions now.
I hope this help. (Not verified)

1 Like

I was checking the “producer” tag in server 2.3 and 2.07. It did NOT work. I will check it using the NRK fork that Hreinnbeck suggest.

1 Like

a powershell script could help you.
more about this you can find here:

I did an example:

  1. download these files:

  1. make a Link “casparcg” to your casparcg.exe

  2. add a powershell script “CasparConfig.ps1”

$link = $true
Do {

    $serverstatus = Get-Process casparcg -ErrorAction SilentlyContinue

    If (!($serverstatus)) { 
        IF ($link){ 
            $link = $false
            invoke-item 'casparcg.lnk' 
        Start-Sleep -Seconds 1 
    Else { Write-Host 'casparcg.exe is available' ; $serverstarted = $true }

Until ( $serverstarted )
add-type -path 'CasparCGNETConnector.dll'
$casparcg = new-object "CasparCGNETConnector.CasparCGConnection"

Do {

    $connection = $casparcg.connect("localhost", 5250)
    If (!($connection)) { 
        Start-Sleep -Seconds 1 

Until ( $connection )

$casparcg.sendCommand('clear 1')
$casparcg.sendCommand('PLAY 1-10 "AMB" Loop')
  1. pack all together in a folder like this


  1. unblock your downloaded files like it’s explained here:

  1. Execute the powershell script
1 Like
Privacy Policy   Terms of Service