Casparcg.config - help Ubuntu 20.04

I need help with my config file.
I’m running Ubuntu 20.04 Desktop with an Blackmagic Ultrastudio HD Mini on TB3.
And want to work with casparcg. I installed directly with softwaremanager in Ubuntu.
There are some threads i read about config Ubuntu and Ultrastudio.
So i customized the config-file.

The error i get is [Error] ## Invalid configuration file ###

This is my config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <paths>
    <media-path>/media/data/caspar/cmedia/</media-path>
    <log-path>/media/data/caspar/log/</log-path>
    <data-path>/media/data/caspar/cdata/</data-path>
    <template-path>/media/data/caspar/template/</template-path>
    <font-path>/media/data/caspar/font/</font-path>
  </paths>
<channels>
    <channel>
    <video-mode>720p5000</video-mode>
    <consumers>
        <decklink>
            <device>1</device>
            <embedded-audio>false</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>
    </consumers>
</channel>
  </channels>
  <controllers>
    <tcp>
      <port>5250</port>
      <protocol>AMCP</protocol>
    </tcp>
  </controllers>
  <amcp>
    <media-server>
      <host>localhost</host>
      <port>8000</port>
    </media-server>
  </amcp>
</configuration>

It would be great if someone could help me.
I also tried to build it as written in github, but there i get only errors when i try run.sh

It looks OK and validates with my config validator.

I wonder if it’s a line ending or UTF-8 issue? Or if you should be using backslashes \ instead of forward slashes / in paths.

thank you for your quick reply.
I tried backslashes, but the error is the same and another message comes up.
[fatal] At casparcg.config.0: read error. Please check the configuration file (casparcg.config) for errors.

This is the simplest valid config, does it run with it?

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <paths></paths>
  <channels></channels>
  <controllers></controllers>
</configuration>

I noticed custom-allocator in you decklink config, that is probably deprecated on the CCG version you have.

no, it doesn’t run with that simple config.

information i have forgotten the binary is located in /usr/bin and the config is located in /usr/share/casparcg-server.

In Windows the config is in the same folder as the binary. I would try this.

Then run

casparcg /usr/share/casparcg-server/casparcg.config

Hi!
With CasparCG installed over package manager, you unfortunately don’t have read privileges on the config file. Try chmoding the config file and it should work. Or if you build it from source (it’s not difficult, there are docker images that do that automatically, but I only tried it on “officialy supported” Ubuntu 18.04), you will also get html template support. Alternatively you can try running CasparCG with sudo, but I don’t recommend it longterm…

Hi, i tried all three options

  1. start casparcg /usr/share/casparcg-server/casparcg.config - the same error
  2. move casparcg into the same folder as the config - error casparcg is not installed
  3. chmod config - same error

i also tried to unistall and reinstall it. there i got the error:

1# 0x00007FD29B462210
 2# 0x00007FD29BB1424B
 3# 0x00007FD29B462210
 4# 0x00007FD29DF074E0
 5# 0x00007FD29DF02FDB
 6# 0x000055E797EFB193
 7# 0x000055E797EF8AEA
 8# 0x000055E797EF92E7
 9# 0x00007FD29DDB443B
10# 0x00007FD29BB08609
11# 0x00007FD29B53E293

Type "q" to close application.
[2020-11-16 06:18:10.391] [error]    ### Invalid configuration file. ###

in Ubuntu 20.04. building in docker i get a lot of dependency errors.

Saturday i can try to install ubuntu 18.04. and build the docker image

Do the folders that are defined in paths exist, and are readable by the user that runs casparcg?

EDIT: I didn’t realize it didn’t work even with the simplest config at the point of writing this reaction. But I just tried on Ubuntu 20.04 with freshly installed casparcg. And all I needed to do was chmoding/chowning the config file and then I got different error (“Aborted (core dumped)”), after that I changed paths to existing folders and then it worked fine.

Yes, the folders exist and are readable for the user.
Saturday is the next time i can work on the machine.
Then i will delete the folders, make new ones an rry to chown the usr/share/casparcg-server folder

Hi, i got the machine back today and tried everything you posted
the folders are directly in /usr/share/casparcg, i chmod/chowned them,
i inserted the folders with full directory and with “media/”, etc.
The error i got was

[2020-11-17 17:43:02.658428] [0x00007ffae0787380] [error]    0# 0x000055E449E27792
 1# 0x00007FD854595210
 2# 0x00007FD854C4724B
 3# 0x00007FD854595210
 4# 0x00007FD85703A4E0
 5# 0x00007FD857035FDB
 6# 0x000055E449EB815C
 7# 0x000055E449EB5AEA
 8# 0x000055E449EB602E
 9# 0x000055E449EB6238
10# 0x00007FD856EE743B
11# 0x00007FD854C3B609
12# 0x00007FD854671293

Type "q" to close application.
[2020-11-17 17:43:02.659] [error]    ### Invalid configuration file. ###

I tried starting casparcg-server a second time and got (Aborted (core dumped))

I think i’ll install the whole os again and try it again.

Hi,

i made a fresh install of Ubuntu 20.04 Desktop, did the updates, installed casparcg-server via

sudo apt install casparcg-server

added the folders media, data, etc. directly to /usr/share/casparcg-server/
chowned the folder with sudo chown user:group /usr/share/casparcg-server
did the chmod with sudo chmod -R 775 /usr/share/casparg-server/ i did the same with casparcg.config
in config file i tried with

<paths>
    <media-path>media/</media-path>
    <log-path>log/</log-path>
    <data-path>data/</data-path>
    <template-path>template/</template-path>
    <font-path>font/</font-path>
  </paths>

i also tried the full paths /usr/share/casparcg-server/media/

but nothing works. i get the error (“Aborted (core dumped)”)
when i try the full path the error is Invalid configuration file.

I really don’t know what to do…

Hi!
Try defining absolute path, or create the folder locations relative to the executable, not to the configuration file.

Hi!
i tried with creating the folder locacion relative to the executable (/usr/bin/…), chmod/chown them,
and added the absolut paths (e.g. /usr/bin/data/) to casparcg.config unfortunately without success.

As long as it says invalid config file I think that it can not open and read the file. Caspar is quite forgiving to wrong settings, by ignoring them and use defaults. So there is either something wrong with the access rights or the file is not valid XML. It could also be stored in a false encoding, should be UTF-8.

I made the config and all folders read and writeable to all users, checked it with the config validator (Config passed XML validation), checked that the config file is stored Unicode UTF-8 and restarted the machine.

it was unsuccessful. The error is still there.

Do you have the same error when you remove the config?