It is currently 28 Jun 2017, 08:17

AMCP Data Question

CasparCG Server, Client and development

Moderators: Macey, Jonas Hummelstrand, didikunz

AMCP Data Question

Postby AntonZdz » 15 Dec 2016, 09:55

Hey Guys and Gals

I am currently working on a custom C# CasparCG controller. I have been reading through the AMCP documentation, specifically in regards to templates.

I have a question in regards to the syntax when including data in my string.

If I want to ADD a template, according to the documentation the string should be "CG 1 ADD 10 svtnews/info 1".

The documentation then says that data should be included as the last entry in the string, but if I have multiple variables I want to set, say f0 = a,f1 = 1,f2 = b and f3 = 2 all in the same add call, how is this done?

I presume I need to define the variable name somewhere, but I wasn't sure how this was done in the context of this call!


Posts: 7
Joined: 12 Dec 2016, 19:27

Re: AMCP Data Question

Postby didikunz » 15 Dec 2016, 11:26

That is documented in the 2.0 version wiki (don't know why it did not make it to the 2.1 wiki). See here: Be sure to encode the XML string in UTF-8 otherways it will not work.
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland
Problems? Guide to posting Bug reports & Feature requests
User avatar
Posts: 3479
Joined: 10 May 2010, 09:08
Location: Aarau, Switzerland

Re: AMCP Data Question

Postby mcdikki » 15 Dec 2016, 11:44

By the way, there are a few ready to use NET libraries in the FAQ section which you can use to connect with CCG.
I implemented the CasparCGNetConnector which is a strong typed object to AMCP mapping. Instead of handling the AMCP commands your self, there are command objects, connection objects and media objects you can handle.

See viewtopic.php?f=11&t=3697&p=25263#p25263 for a list of known libs for ccg.

mcdikki - Wir teilen Begeisterung
User avatar
Posts: 1059
Joined: 11 Dec 2012, 15:48
Location: Germany

Return to Tech and Development

Who is online

Users browsing this forum: No registered users and 1 guest