# Online CasparCG.config validator - check your config file

**URL:** <https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954>\
**Category:** General\
**Tags:** getting-started, config, server\
**Created:** [June 15, 2019, 3:08pm UTC](https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954 "2019-06-15T15:08:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![hreinnbeck](https://casparcgforum.org/user_avatar/casparcgforum.org/hreinnbeck/32/154_2.png) [@hreinnbeck](https://casparcgforum.org/u/hreinnbeck)\
**Post date:** [June 15, 2019, 3:08pm UTC](https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954/1 "2019-06-15T15:08:52Z")

</div>

Hi all,

We often have issues here and on Github that are related to invalid config files and users often mistakenly use sections of the examples at the end of config file.

I put together a simple online validator for CasparCG config files. You can drag-and-drop the file on the textarea or copy paste in your config to have it validated. You can also run examples of invalid and valid configs.

[CasparCG config file validator](https://casparcg.net/validator/)

For now it validates XML, verifies that only known tags are used, checks if user is using example code, verifies values of some tags (video-mode, log-level, protocols). Summary with the number of channels and configured outputs is printed if the config is valid.

The validation is all contained within a single HTML file. Source is here: [GitHub: hreinnbeck/casparcg-config-validator](https://github.com/hreinnbeck/casparcg-config-validator). All ideas and contributions to the validator would be greatly appreciated.

Cheers,  
Hreinn

---

<div class="post-metadata">

**Author:** ![fdeigiudici](https://casparcgforum.org/user_avatar/casparcgforum.org/fdeigiudici/32/410_2.png) [@fdeigiudici](https://casparcgforum.org/u/fdeigiudici)\
**Post date:** [June 15, 2019, 3:14pm UTC](https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954/2 "2019-06-15T15:14:35Z")

</div>

Thank you! really nice and helpful!!!

---

<div class="post-metadata">

**Author:** ![TheYouth](https://casparcgforum.org/user_avatar/casparcgforum.org/theyouth/32/24_2.png) [@TheYouth](https://casparcgforum.org/u/TheYouth)\
**Post date:** [June 15, 2019, 7:31pm UTC](https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954/3 "2019-06-15T19:31:39Z")

</div>

This is AMAZING! Great effort for all users. Thanks for that!

---

<div class="post-metadata">

**Author:** ![hreinnbeck](https://casparcgforum.org/user_avatar/casparcgforum.org/hreinnbeck/32/154_2.png) [@hreinnbeck](https://casparcgforum.org/u/hreinnbeck)\
**Post date:** [June 15, 2019, 7:54pm UTC](https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954/4 "2019-06-15T19:54:49Z")

</div>

Thanks.

On a side note: I’m a bit embarrassed I didn’t think of it at the start, but since it’s all contained within the single HTML file, it will actually run locally in a browser, so could in the future simply be included with CCG downloads.

---

<div class="post-metadata">

**Author:** ![hreinnbeck](https://casparcgforum.org/user_avatar/casparcgforum.org/hreinnbeck/32/154_2.png) [@hreinnbeck](https://casparcgforum.org/u/hreinnbeck)\
**Post date:** [June 15, 2019, 10:04pm UTC](https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954/5 "2019-06-15T22:04:42Z")

</div>

Just did some updates. Now validates just about all possible tags. Without any further ideas or notes, I’d say this is complete for the moment.

---

<div class="post-metadata">

**Author:** ![peedrr](https://casparcgforum.org/letter_avatar_proxy/v4/letter/p/90db22/32.png) [@peedrr](https://casparcgforum.org/u/peedrr)\
**Post date:** [June 17, 2019, 12:16am UTC](https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954/6 "2019-06-17T00:16:41Z")

</div>

This is really cool! Thanks for making the effort

---

<div class="post-metadata">

**Author:** ![jbcurler2010](https://casparcgforum.org/letter_avatar_proxy/v4/letter/j/e0b2c6/32.png) [@jbcurler2010](https://casparcgforum.org/u/jbcurler2010)\
**Post date:** [April 22, 2021, 1:43am UTC](https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954/7 "2021-04-22T01:43:15Z")

</div>

Struggling to enable NDI output. Please help!

---

<div class="post-metadata">

**Author:** ![didikunz](https://casparcgforum.org/user_avatar/casparcgforum.org/didikunz/32/7_2.png) [@didikunz](https://casparcgforum.org/u/didikunz)\
**Post date:** [April 22, 2021, 7:30am UTC](https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954/8 "2021-04-22T07:30:11Z")

</div>

Please explain, what you already tried and, at least post your caspar.config (using the \</\> button to format).

---

<div class="post-metadata">

**Author:** ![michel](https://casparcgforum.org/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@michel](https://casparcgforum.org/u/michel)\
**Post date:** [June 2, 2021, 7:33am UTC](https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954/9 "2021-06-02T07:33:20Z")

</div>

Hi hreinnbeck,

I tried to validate a simple config that I think has only 1 channel but the validator reports there’s 2 channels found…

```auto
<?xml version="1.0" encoding="utf-8"?>

<configuration>
    <paths>
        <media-path>media/</media-path>
        <log-path>log/</log-path>
        <data-path>data/</data-path>
        <template-path>template/</template-path>
    </paths>
    <lock-clear-phrase>secret</lock-clear-phrase>
    <channels>
        <channel>
            <video-mode>1080i5000</video-mode>
            <consumers>
            <decklink>
                <device>1</device>
                <embedded-audio>true</embedded-audio>
            </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>

```

result:

```auto
Config passed XML validation
First tag is: <configuration>
Found: paths
Found: paths->media-path with value: media/
Found: paths->log-path with value: log/
Found: paths->data-path with value: data/
Found: paths->template-path with value: template/
Found: lock-clear-phrase with value: secret
Found: channels
Found: channels->channel
Found: channels->channel->video-mode with value: 1080i5000
Found: channels->channel->consumers
Found: channels->channel->consumers->decklink
Found: channels->channel->consumers->decklink->device with value: 1
Found: channels->channel->consumers->decklink->embedded-audio with value: true
Found: controllers
Found: controllers->tcp
Found: controllers->tcp->port with value: 5250
Found: controllers->tcp->protocol with value: AMCP
Found: amcp
Found: amcp->media-server
Found: amcp->media-server->host with value: localhost
Found: amcp->media-server->port with value: 8000
This config has:
2 channel(s)
0 screen consumer(s)
0 system audio output(s)
1 decklink output(s)
0 bluefish output(s)
0 newtek-ivga output(s)
0 ndi output(s)
0 ffmpeg output(s)
Validation finished!

```

How should I interpret this?

Thank You.

---

<div class="post-metadata">

**Author:** ![hreinnbeck](https://casparcgforum.org/user_avatar/casparcgforum.org/hreinnbeck/32/154_2.png) [@hreinnbeck](https://casparcgforum.org/u/hreinnbeck)\
**Post date:** [June 2, 2021, 10:15am UTC](https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954/10 "2021-06-02T10:15:32Z")

</div>

You only have one channel.

Just a counting error, if there was only one channel it would count the elements of the channel (video-mode and consumers = 2). I’ve fixed it.

---

<div class="post-metadata">

**Author:** ![michel](https://casparcgforum.org/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@michel](https://casparcgforum.org/u/michel)\
**Post date:** [June 2, 2021, 10:36am UTC](https://casparcgforum.org/t/online-casparcg-config-validator-check-your-config-file/1954/11 "2021-06-02T10:36:19Z")

</div>

Ah, that’s it. Ok. 🙂

Thank You.
